IdPDevCustomExtension login method is called twice per authentication
Johnny Yang
johnny.yang at auckland.ac.nz
Mon Feb 15 16:38:30 EST 2016
I am coding a IdPDevCustomExtension, basically it passes all the authentication (set the principal_name to an existing one for all the request).
In my log it shows the login method is called twice per authentication request but the httpRequest's hashcode is different, what could cause this problem?
Here is my code in the login handler:
public class MyLoginHandler extends AbstractLoginHandler {
private final Logger log = LoggerFactory.getLogger(MyLoginHandler.class);
private String authenticationMethod;
public MyLoginHandler() {
setSupportsPassive(true);
setSupportsForceAuthentication(false);
}
public void login(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
log.debug("login is called with httpRequest code: " + httpRequest.hashCode());
httpRequest.setAttribute("principal_name", "abc");
httpRequest.setAttribute("authnMethod", this.authenticationMethod);
AuthenticationEngine.returnToAuthenticationEngine(httpRequest, httpResponse);
}
public void setAuthenticationMethod(String authenticationMethod) {
if (log.isDebugEnabled()) {
log.debug("authenticationMethod is set to: " + authenticationMethod);
}
this.authenticationMethod = authenticationMethod;
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20160215/e7cf3f01/attachment-0001.html>
More information about the users
mailing list