Also register the principal in the current session, if any.

This commit is contained in:
Allan Saddi 2012-03-07 16:42:22 -08:00
parent bbcd532924
commit c4d63f74ca
2 changed files with 2 additions and 4 deletions

View File

@ -154,8 +154,7 @@ public abstract class AbstractAuthenticator extends AuthenticatorBase implements
// Authentication sets the response headers for status and redirect if needed
principal = this.delegate.authenticate(request.getRequest(), response);
if (principal != null) {
request.setAuthType(getAuthenticationMethod());
request.setUserPrincipal(principal);
register(request, response, principal, getAuthenticationMethod(), null, null);
result = true;
}
} else {

View File

@ -163,8 +163,7 @@ public abstract class AbstractAuthenticator extends AuthenticatorBase implements
// Authentication sets the response headers for status and redirect if needed
principal = this.delegate.authenticate(request.getRequest(), response);
if (principal != null) {
request.setAuthType(getAuthenticationMethod());
request.setUserPrincipal(principal);
register(request, response, principal, getAuthenticationMethod(), null, null);
result = true;
}
} else {