AuthenticationHandlerAbstractMaprAuthenticationHandler, BasicAuthHandler, JWTAuthHandler, JWTRedirectAuthenticationHandler, KerberosAuthHandlerpublic class MultiMechsAuthenticationHandler extends java.lang.Object implements AuthenticationHandler
| Modifier and Type | Class | Description |
|---|---|---|
static class |
MultiMechsAuthenticationHandler.AuthHandlerEnum |
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
MTYPE |
WWW_AUTHENTICATE| Constructor | Description |
|---|---|
MultiMechsAuthenticationHandler() |
| Modifier and Type | Method | 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(java.lang.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
|
java.lang.String |
getType() |
Returns the authentication type of the authentication handler.
|
void |
init(java.util.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 static final java.lang.String MTYPE
public void init(java.util.Properties config)
throws javax.servlet.ServletException
AuthenticationHandler
This method is invoked by the AuthenticationFilter.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 java.io.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).java.io.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 java.io.IOException, AuthenticationException
request - response - java.io.IOExceptionAuthenticationExceptionpublic void destroy()
AuthenticationHandler
This method is invoked by the AuthenticationFilter.destroy() method.
destroy in interface AuthenticationHandlerprotected MultiMechsAuthenticationHandler getAuthBasedEntity(java.lang.String authorization)
authorization - public java.lang.String getType()
AuthenticationHandlergetType in interface AuthenticationHandlerpublic boolean managementOperation(AuthenticationToken token, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.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.java.io.IOException - thrown if an IO error occurred.AuthenticationException - thrown if an Authentication error occurred.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.