public class PseudoAuthenticator extends Object implements Authenticator
PseudoAuthenticator
implementation provides an authentication equivalent to Hadoop's
Simple authentication, it trusts the value of the 'user.name' Java System property.
The 'user.name' value is propagated using an additional query string parameter USER_NAME
('user.name').限定符和类型 | 字段和说明 |
---|---|
static String |
USER_NAME
Name of the additional parameter that carries the 'user.name' value.
|
构造器和说明 |
---|
PseudoAuthenticator() |
限定符和类型 | 方法和说明 |
---|---|
void |
authenticate(URL url,
AuthenticatedURL.Token token)
Performs simple authentication against the specified URL.
|
protected String |
getUserName()
Returns the current user name.
|
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
在接口中 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()
Copyright © 2009 The Apache Software Foundation