security - Can not login into my grails application -


i have grails application in bootstrap.groovy file creating user 1 admin , normal user. using spring security plugin security.

my problem able login user created in bootstrap.groovy bt while creating new user application not able login user.

i getting following error message :

debug dao.daoauthenticationprovider  - authentication failed: password not match stored value 

here domain encode password function

def beforeinsert() {          super.beforeinsert()         encodepassword()     }      def beforeupdate() {         if (isdirty('password')) {             encodepassword()         }     } protected void encodepassword() {     password = springsecurityservice.encodepassword(password) } 

here user insertion code values coming login form

user user = user.findbyemail(email) ?: new user(firstname: fname, lastname: lname, email: email,                 password: password, enabled: true, accountlocked: false, accountexpired: false).save() 

here bootstrap.groovy init function

user user = user.findbyemail('systemuser@gmail.com') ?: new user(firstname: 'system', lastname: 'user', email: 'systemuser@gmail.com',                 password: 'user', enabled: true, accountlocked: false, accountexpired: false).save() 

i using password algorithm encoding

grails.plugin.springsecurity.password.algorithm='bcrypt' 


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -