public class MultiMechsAuthenticationHandler extends Object implements AuthenticationHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiMechsAuthenticationHandler.AuthHandlerEnum |
| Constructor and Description |
|---|
MultiMechsAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHeader(javax.servlet.http.HttpServletResponse response)
Children must override this method with supplying corresponding header
|
AuthenticationToken |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authenticate main method:
In step 1.
|
void |
destroy()
Destroys the authentication handler instance.
|
protected MultiMechsAuthenticationHandler |
getAuthBasedEntity(String authorization)
Children must override this method to essentially return "this" based on the request header
or null if request header is not suitable to a given auth mechanism
|
String |
getType()
Returns the authentication type of the authentication handler.
|
void |
init(Properties config)
Initializes the authentication handler instance.
|
boolean |
managementOperation(AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns true by default.
|
protected AuthenticationToken |
postauthenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Children must override this method to perform real authentication based on the information received
in the request header
|
public void init(Properties config) throws javax.servlet.ServletException
AuthenticationHandlerAuthenticationFilter.init(javax.servlet.FilterConfig) method.init in interface AuthenticationHandlerconfig - configuration properties to initialize the handler.javax.servlet.ServletException - thrown if the handler could not be initialized.public AuthenticationToken authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, AuthenticationException
authenticate in interface AuthenticationHandlerrequest - the HTTP client request.response - the HTTP client response.AuthenticationToken if the HTTP client request has been authenticated,
null otherwise (in this case it must take care of the response).IOException - thrown if an IO error occurred.AuthenticationException - thrown if an Authentication error occurred.protected void addHeader(javax.servlet.http.HttpServletResponse response)
response - protected AuthenticationToken postauthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, AuthenticationException
request - response - IOExceptionAuthenticationExceptionpublic void destroy()
AuthenticationHandlerAuthenticationFilter.destroy() method.destroy in interface AuthenticationHandlerprotected MultiMechsAuthenticationHandler getAuthBasedEntity(String authorization)
authorization - public String getType()
AuthenticationHandlergetType in interface AuthenticationHandlerpublic boolean managementOperation(AuthenticationToken token, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, AuthenticationException
managementOperation in interface AuthenticationHandlertoken - the authentication token if any, otherwise NULL.request - the HTTP client request.response - the HTTP client response.TRUE if the request should be processed as a regular
request,
FALSE otherwise.IOException - thrown if an IO error occurred.AuthenticationException - thrown if an Authentication error occurred.Copyright © 2014 Apache Software Foundation. All Rights Reserved.