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 |
| 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
AuthenticationHandlerAuthenticationFilter.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()
AuthenticationHandlerAuthenticationFilter.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 © 2014 Apache Software Foundation. All Rights Reserved.