|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.security.authentication.server.MultiMechsAuthenticationHandler
public class MultiMechsAuthenticationHandler
| Nested Class Summary | |
|---|---|
static class |
MultiMechsAuthenticationHandler.AuthHandlerEnum
|
| Constructor Summary | |
|---|---|
MultiMechsAuthenticationHandler()
|
|
| Method Summary | |
|---|---|
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)
Performs an authentication management operation. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiMechsAuthenticationHandler()
| Method Detail |
|---|
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 -
IOException
AuthenticationExceptionpublic void destroy()
AuthenticationHandlerAuthenticationFilter.destroy() method.
destroy in interface AuthenticationHandlerprotected MultiMechsAuthenticationHandler getAuthBasedEntity(String authorization)
authorization -
public String getType()
AuthenticationHandler
getType in interface AuthenticationHandler
public boolean managementOperation(AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
AuthenticationException
AuthenticationHandlerTRUE the request will continue normal
processing, this means the method has not produced any HTTP response.
If the method returns FALSE the request will end, this means
the method has produced the corresponding HTTP response.
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||