*/
protected void completeAuthentication(LoginContext loginContext, HttpServletRequest httpRequest,
HttpServletResponse httpResponse) {
*/
protected void completeAuthentication(LoginContext loginContext, HttpServletRequest httpRequest,
HttpServletResponse httpResponse) {
// We check if the principal name was already set in the login context
// if not attempt to pull it from where login handlers are supposed to provide it
// We check if the principal name was already set in the login context
// if not attempt to pull it from where login handlers are supposed to provide it
loginContext.setPrincipalAuthenticated(false);
loginContext.setAuthenticationFailure(new AuthenticationException(
"No principal name returned from authentication handler."));
loginContext.setPrincipalAuthenticated(false);
loginContext.setAuthenticationFailure(new AuthenticationException(
"No principal name returned from authentication handler."));
// We allow a login handler to override the authentication method in the event that it supports multiple methods
String actualAuthnMethod = DatatypeHelper.safeTrimOrNullString((String) httpRequest
.getAttribute(LoginHandler.AUTHENTICATION_METHOD_KEY));
// We allow a login handler to override the authentication method in the event that it supports multiple methods
String actualAuthnMethod = DatatypeHelper.safeTrimOrNullString((String) httpRequest
.getAttribute(LoginHandler.AUTHENTICATION_METHOD_KEY));