|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.security.authentication.server.PseudoAuthenticationHandler
public class PseudoAuthenticationHandler
The PseudoAuthenticationHandler
provides a pseudo authentication mechanism that accepts
the user name specified as a query string parameter.
true|false
, default value is false
Field Summary | |
---|---|
static String |
ANONYMOUS_ALLOWED
Constant for the configuration property that indicates if anonymous users are allowed. |
static String |
TYPE
Constant that identifies the authentication mechanism. |
Constructor Summary | |
---|---|
PseudoAuthenticationHandler()
|
Method Summary | |
---|---|
AuthenticationToken |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authenticates an HTTP client request. |
void |
destroy()
Releases any resources initialized by the authentication handler. |
protected boolean |
getAcceptAnonymous()
Returns if the handler is configured to support anonymous users. |
String |
getType()
Returns the authentication type of the authentication handler, 'simple'. |
void |
init(Properties config)
Initializes the authentication handler instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TYPE
public static final String ANONYMOUS_ALLOWED
Constructor Detail |
---|
public PseudoAuthenticationHandler()
Method Detail |
---|
public void init(Properties config) throws javax.servlet.ServletException
AuthenticationFilter.init(javax.servlet.FilterConfig)
method.
init
in interface AuthenticationHandler
config
- configuration properties to initialize the handler.
javax.servlet.ServletException
- thrown if the handler could not be initialized.protected boolean getAcceptAnonymous()
public void destroy()
destroy
in interface AuthenticationHandler
public String getType()
getType
in interface AuthenticationHandler
public AuthenticationToken authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, AuthenticationException
PseudoAuthenticator.USER_NAME
parameter from the query string and creates
an AuthenticationToken
with it.
If the HTTP client request does not contain the PseudoAuthenticator.USER_NAME
parameter and
the handler is configured to allow anonymous users it returns the AuthenticationToken.ANONYMOUS
token.
If the HTTP client request does not contain the PseudoAuthenticator.USER_NAME
parameter and
the handler is configured to disallow anonymous users it throws an AuthenticationException
.
authenticate
in interface AuthenticationHandler
request
- the HTTP client request.response
- the HTTP client response.
IOException
- thrown if an IO error occurred.
AuthenticationException
- thrown if HTTP client request was not accepted as an authentication request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |