|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.security.authentication.client.PseudoAuthenticator
public class PseudoAuthenticator
The PseudoAuthenticator
implementation provides an authentication equivalent to Hadoop's
Simple authentication, it trusts the value of the 'user.name' Java System property.
USER_NAME
('user.name').
Field Summary | |
---|---|
static String |
USER_NAME
Name of the additional parameter that carries the 'user.name' value. |
Constructor Summary | |
---|---|
PseudoAuthenticator()
|
Method Summary | |
---|---|
void |
authenticate(URL url,
AuthenticatedURL.Token token)
Performs simple authentication against the specified URL. |
protected String |
getUserName()
Returns the current user name. |
void |
setConnectionConfigurator(ConnectionConfigurator configurator)
Sets a ConnectionConfigurator instance to use for
configuring connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String USER_NAME
Constructor Detail |
---|
public PseudoAuthenticator()
Method Detail |
---|
public void setConnectionConfigurator(ConnectionConfigurator configurator)
ConnectionConfigurator
instance to use for
configuring connections.
setConnectionConfigurator
in interface Authenticator
configurator
- the ConnectionConfigurator
instance.public void authenticate(URL url, AuthenticatedURL.Token token) throws IOException, AuthenticationException
OPTIONS
request injecting an additional
parameter USER_NAME
in the query string with the value returned by the getUserName()
method.
If the response is successful it will update the authentication token.
authenticate
in interface Authenticator
url
- the URl to authenticate against.token
- the authencation token being used for the user.
IOException
- if an IO error occurred.
AuthenticationException
- if an authentication error occurred.protected String getUserName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |