Class AccessTokenProvider
java.lang.Object
org.apache.hadoop.hdfs.web.oauth2.AccessTokenProvider
- All Implemented Interfaces:
Configurable
- Direct Known Subclasses:
ConfRefreshTokenBasedAccessTokenProvider,CredentialBasedAccessTokenProvider
Provide an OAuth2 access token to be used to authenticate http calls in
WebHDFS.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringObtain the access token that should be added to http connection's header.getConf()Return the conf.voidsetConf(Configuration configuration) Set the conf.
-
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
Return the conf.- Specified by:
getConfin interfaceConfigurable- Returns:
- the conf.
-
setConf
Set the conf.- Specified by:
setConfin interfaceConfigurable- Parameters:
configuration- New configuration.
-