Closed stefanhuber closed 10 years ago
My mistake was that I used the UsernamePasswordAuthUser within my implementation of the UsernamePasswordAuthProvider inside the buildLoginAuthUser. The UsernamePasswordAuthUser generated new ids on every call of getId() (Password salt ...). I am using the DefaultUsernamePasswordAuthUser, which is using retrieves the email after calling getId().
I am trying to figure out an important question...
I have integrated the Play-authenticate Framework 0.5.0-SNAPSHOT into an Play 2.2.0 application. For now I am using only the password provider. Everything works fine so far.
While logging in the AuthUser Id and Email is outputted to the Logger and returns an Id and the Email from the form:
Later on in my code a have a controller action, which has the following code and logging ouput:
The first log returns something like this: $2a$10$H0Ua7GrkV.XRjH6/SGv13.9o2G3/h4UH7mO/x5lPFGkDpP8kATaqq somebody@test.com
The second returns something like this: $2a$10$1ii4bHYDvlKkun9enPpDjODwdlxNSQFvHFU017N83zQ4i.aVtpNNG $2a$10$1ii4bHYDvlKkun9enPpDjODwdlxNSQFvHFU017N83zQ4i.aVtpNNG
The problem which I face right now is how do I get the user model from the database (or cache) if the identifier is changing or rather the email is not storted in the session... Is there a point where i can tell the framework it should also store the email?
Would be great if you can help me! If my question is not clear please tell me, i'll try my best to clearify!