public abstract class BaseAuthenticationHandler extends java.lang.Object implements AuthenticationHandler
Modifier and Type | Field and Description |
---|---|
static WinstoneResourceBundle |
AUTH_RESOURCES |
protected SecurityConstraint[] |
constraints |
protected AuthenticationRealm |
realm |
protected java.lang.String |
realmName |
Modifier | Constructor and Description |
---|---|
protected |
BaseAuthenticationHandler(org.w3c.dom.Node loginConfigNode,
java.util.List constraintNodes,
java.util.Set rolesAllowed,
AuthenticationRealm realm)
Factory method - this parses the web.xml nodes and builds the correct
subclass for handling that auth type.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
doRoleCheck(HttpServletRequest request,
HttpServletResponse response,
java.lang.String pathRequested) |
boolean |
processAuthentication(ServletRequest inRequest,
ServletResponse inResponse,
java.lang.String pathRequested)
Evaluates any authentication constraints, intercepting if auth is
required.
|
protected abstract void |
requestAuthentication(HttpServletRequest request,
HttpServletResponse response,
java.lang.String pathRequested)
The actual auth request implementation.
|
protected void |
setNoCache(HttpServletResponse response) |
protected abstract boolean |
validatePossibleAuthenticationResponse(HttpServletRequest request,
HttpServletResponse response,
java.lang.String pathRequested)
Handling the (possible) response
|
protected SecurityConstraint[] constraints
protected AuthenticationRealm realm
protected java.lang.String realmName
public static final WinstoneResourceBundle AUTH_RESOURCES
protected BaseAuthenticationHandler(org.w3c.dom.Node loginConfigNode, java.util.List constraintNodes, java.util.Set rolesAllowed, AuthenticationRealm realm)
public boolean processAuthentication(ServletRequest inRequest, ServletResponse inResponse, java.lang.String pathRequested) throws java.io.IOException, ServletException
processAuthentication
in interface AuthenticationHandler
java.io.IOException
ServletException
protected boolean doRoleCheck(HttpServletRequest request, HttpServletResponse response, java.lang.String pathRequested) throws java.io.IOException, ServletException
java.io.IOException
ServletException
protected void setNoCache(HttpServletResponse response)
protected abstract void requestAuthentication(HttpServletRequest request, HttpServletResponse response, java.lang.String pathRequested) throws java.io.IOException, ServletException
java.io.IOException
ServletException
protected abstract boolean validatePossibleAuthenticationResponse(HttpServletRequest request, HttpServletResponse response, java.lang.String pathRequested) throws ServletException, java.io.IOException
ServletException
java.io.IOException
Copyright © 2013. All Rights Reserved.