public class KerberosAuthHandler extends MultiMechsAuthenticationHandler
MultiMechsAuthenticationHandler.AuthHandlerEnum| Modifier and Type | Field and Description |
|---|---|
protected GSSManager |
gssManager |
protected String |
keytab |
protected LoginContext |
loginContext |
protected String |
principal |
WWW_AUTHENTICATE| Constructor and Description |
|---|
KerberosAuthHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(javax.servlet.http.HttpServletResponse response)
Children must override this method with supplying corresponding header
|
void |
destroy()
Destroys the authentication handler instance.
|
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
|
protected String |
getKeytab()
Returns the keytab used by the authentication handler.
|
protected String |
getPrincipal()
Returns the Kerberos principal used by the authentication handler.
|
void |
init(Properties config)
Initializes the authentication handler instance.
|
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
|
authenticate, getType, managementOperationprotected GSSManager gssManager
protected LoginContext loginContext
protected String principal
protected String keytab
public void init(Properties config) throws javax.servlet.ServletException
AuthenticationHandler
This method is invoked by the AuthenticationFilter.init(javax.servlet.FilterConfig) method.
init in interface AuthenticationHandlerinit in class MultiMechsAuthenticationHandlerconfig - configuration properties to initialize the handler.javax.servlet.ServletException - thrown if the handler could not be initialized.public AuthenticationToken postauthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, AuthenticationException
MultiMechsAuthenticationHandlerpostauthenticate in class MultiMechsAuthenticationHandlerIOExceptionAuthenticationExceptionpublic void destroy()
AuthenticationHandler
This method is invoked by the AuthenticationFilter.destroy() method.
destroy in interface AuthenticationHandlerdestroy in class MultiMechsAuthenticationHandlerpublic void addHeader(javax.servlet.http.HttpServletResponse response)
MultiMechsAuthenticationHandleraddHeader in class MultiMechsAuthenticationHandlerpublic MultiMechsAuthenticationHandler getAuthBasedEntity(String authorization)
MultiMechsAuthenticationHandlergetAuthBasedEntity in class MultiMechsAuthenticationHandlerprotected String getPrincipal()
protected String getKeytab()
Copyright © 2015 Apache Software Foundation. All Rights Reserved.