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, managementOperation
protected GSSManager gssManager
protected LoginContext loginContext
protected String principal
protected String keytab
public void init(Properties config) throws javax.servlet.ServletException
AuthenticationHandler
AuthenticationFilter.init(javax.servlet.FilterConfig)
method.init
in interface AuthenticationHandler
init
in class MultiMechsAuthenticationHandler
config
- 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
MultiMechsAuthenticationHandler
postauthenticate
in class MultiMechsAuthenticationHandler
IOException
AuthenticationException
public void destroy()
AuthenticationHandler
AuthenticationFilter.destroy()
method.destroy
in interface AuthenticationHandler
destroy
in class MultiMechsAuthenticationHandler
public void addHeader(javax.servlet.http.HttpServletResponse response)
MultiMechsAuthenticationHandler
addHeader
in class MultiMechsAuthenticationHandler
public MultiMechsAuthenticationHandler getAuthBasedEntity(String authorization)
MultiMechsAuthenticationHandler
getAuthBasedEntity
in class MultiMechsAuthenticationHandler
protected String getPrincipal()
protected String getKeytab()
Copyright © 2015 Apache Software Foundation. All Rights Reserved.