org.apache.hadoop.hbase.security.token
Class TokenProvider
java.lang.Object
org.apache.hadoop.hbase.coprocessor.BaseEndpointCoprocessor
org.apache.hadoop.hbase.security.token.TokenProvider
- All Implemented Interfaces:
- Coprocessor, CoprocessorProtocol, VersionedProtocol, AuthenticationProtocol
public class TokenProvider
- extends BaseEndpointCoprocessor
- implements AuthenticationProtocol
Provides a service for obtaining authentication tokens via the
AuthenticationProtocol coprocessor protocol.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION
public static final long VERSION
- See Also:
- Constant Field Values
TokenProvider
public TokenProvider()
start
public void start(CoprocessorEnvironment env)
- Specified by:
start in interface Coprocessor- Overrides:
start in class BaseEndpointCoprocessor
getAuthenticationToken
public org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> getAuthenticationToken()
throws IOException
- Description copied from interface:
AuthenticationProtocol
- Obtains a token capable of authenticating as the current user for future
connections.
- Specified by:
getAuthenticationToken in interface AuthenticationProtocol
- Returns:
- an authentication token for the current user
- Throws:
IOException - If obtaining a token is denied or encounters an error
whoami
public String whoami()
- Description copied from interface:
AuthenticationProtocol
- Returns the currently authenticated username.
- Specified by:
whoami in interface AuthenticationProtocol
getProtocolVersion
public long getProtocolVersion(String protocol,
long clientVersion)
throws IOException
- Description copied from interface:
VersionedProtocol
- Return protocol version corresponding to protocol interface.
- Specified by:
getProtocolVersion in interface VersionedProtocol- Overrides:
getProtocolVersion in class BaseEndpointCoprocessor
- Parameters:
protocol - The classname of the protocol interfaceclientVersion - The version of the protocol that the client speaks
- Returns:
- the version that the server will speak
- Throws:
IOException - if any IO error occurs
Copyright © 2013 Cloudera. All Rights Reserved.