public abstract class BaseAuthenticationHandler extends Object implements AuthenticationHandler
| Modifier and Type | Field and Description |
|---|---|
static WinstoneResourceBundle |
AUTH_RESOURCES |
protected SecurityConstraint[] |
constraints |
protected AuthenticationRealm |
realm |
protected String |
realmName |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseAuthenticationHandler(Node loginConfigNode,
List constraintNodes,
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,
String pathRequested) |
boolean |
processAuthentication(ServletRequest inRequest,
ServletResponse inResponse,
String pathRequested)
Evaluates any authentication constraints, intercepting if auth is
required.
|
protected abstract void |
requestAuthentication(HttpServletRequest request,
HttpServletResponse response,
String pathRequested)
The actual auth request implementation.
|
protected void |
setNoCache(HttpServletResponse response) |
protected abstract boolean |
validatePossibleAuthenticationResponse(HttpServletRequest request,
HttpServletResponse response,
String pathRequested)
Handling the (possible) response
|
protected SecurityConstraint[] constraints
protected AuthenticationRealm realm
protected String realmName
public static final WinstoneResourceBundle AUTH_RESOURCES
protected BaseAuthenticationHandler(Node loginConfigNode, List constraintNodes, Set rolesAllowed, AuthenticationRealm realm)
public boolean processAuthentication(ServletRequest inRequest, ServletResponse inResponse, String pathRequested) throws IOException, ServletException
processAuthentication in interface AuthenticationHandlerIOExceptionServletExceptionprotected boolean doRoleCheck(HttpServletRequest request, HttpServletResponse response, String pathRequested) throws IOException, ServletException
IOExceptionServletExceptionprotected void setNoCache(HttpServletResponse response)
protected abstract void requestAuthentication(HttpServletRequest request, HttpServletResponse response, String pathRequested) throws IOException, ServletException
IOExceptionServletExceptionprotected abstract boolean validatePossibleAuthenticationResponse(HttpServletRequest request, HttpServletResponse response, String pathRequested) throws ServletException, IOException
ServletExceptionIOExceptionCopyright © 2014. All rights reserved.