Class AccessTokenProvider
java.lang.Object
org.apache.hadoop.hdfs.web.oauth2.AccessTokenProvider
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
- Direct Known Subclasses:
ConfRefreshTokenBasedAccessTokenProvider,CredentialBasedAccessTokenProvider
@Public
@Evolving
public abstract class AccessTokenProvider
extends Object
implements org.apache.hadoop.conf.Configurable
Provide an OAuth2 access token to be used to authenticate http calls in
WebHDFS.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AccessTokenProvider
public AccessTokenProvider()
-
-
Method Details
-
getAccessToken
Obtain the access token that should be added to http connection's header. Will be called for each connection, so implementations should be performant. Implementations are responsible for any refreshing of the token.- Returns:
- Access token to be added to connection header.
- Throws:
IOException
-
getConf
public org.apache.hadoop.conf.Configuration getConf()Return the conf.- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable- Returns:
- the conf.
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration configuration) Set the conf.- Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable- Parameters:
configuration- New configuration.
-