I've tried to sign in user with springSecurityService.reauthenticate(username) but springSecurityService.currentUser is null anyway
How to trigger a sign in with username and password and also get result on springSecurityService.currentUser?
I've tried to sign in user with springSecurityService.reauthenticate(username) but springSecurityService.currentUser is null anyway
How to trigger a sign in with username and password and also get result on springSecurityService.currentUser?
springSecurityService.reauthenticate(username) should set springSecurityService.currentUser at once - at least it does in my application (I'm using spring-security-core:2.0-RC4 and Grails 2.4.4).
Please check if you are passing in an existing username, it looks as though the user cannot be found. Try something along the lines of println User.findByUsername(username) before trying to reauthenticate to debug whether the user can actually be found.
Also check that you are not hitting this problem.