ros wrote:
>
> Is it possible to place User pojo as principal on successful signup.
> Currently there is user name placed on signup and User pojo on login.
>
I just ran into exactly the same thing. This means that the following code
from UserSecurityAdvice will not always work:
private User getCurrentUser(Authentication auth) {
User currentUser;
if (auth.getPrincipal() instanceof UserDetails) {
currentUser = (User) auth.getPrincipal();
} else if (auth.getDetails() instanceof UserDetails) {
currentUser = (User) auth.getDetails();
} else {
throw new AccessDeniedException("User not properly
authenticated.");
}
return currentUser;
}
Shouldn't this be normalized?
Thank you,
A.
--
View this message in context:
http://www.nabble.com/after-user-signup-there-is-username-placed-as-principal%2C-why-not-user-pojo--tf4366000s2369.html#a12558742
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]