Frage

I am using Grails Spring Security Core with Persistent Logins. Thus, the login information of a user are stored in my database. My problem is the following case:

A user is logged in and his username will change from x to y. This means I have to reauthenticate the user with:

springSecurityService.reauthenticate y

rememberMeServices.loginSuccess(request, response, springSecurityService.authentication)

In my database the username for the persistent token remains x. How can I set a new entry for a persistent token with the new username y?

War es hilfreich?

Lösung

You should find the existing database entry for the user. This can be done by username. Then you can set a new database entry as a persistent token with rememberMeServices.loginSuccess. Finally, you have to reauthenticate your user.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top