Class CredentialBasedAccessTokenProvider
java.lang.Object
org.apache.hadoop.hdfs.web.oauth2.AccessTokenProvider
org.apache.hadoop.hdfs.web.oauth2.CredentialBasedAccessTokenProvider
- All Implemented Interfaces:
Configurable
- Direct Known Subclasses:
ConfCredentialBasedAccessTokenProvider
@Public
@Evolving
public abstract class CredentialBasedAccessTokenProvider
extends AccessTokenProvider
Obtain an access token via the credential-based OAuth2 workflow. This
abstract class requires only that implementations provide the credential,
which the class then uses to obtain a refresh token.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionObtain the access token that should be added to http connection's header.abstract StringvoidsetConf(Configuration conf) Set the conf.Methods inherited from class org.apache.hadoop.hdfs.web.oauth2.AccessTokenProvider
getConf
-
Field Details
-
OAUTH_CREDENTIAL_KEY
- See Also:
-
-
Method Details
-
getCredential
-
setConf
Description copied from class:AccessTokenProviderSet the conf.- Specified by:
setConfin interfaceConfigurable- Overrides:
setConfin classAccessTokenProvider- Parameters:
conf- New configuration.
-
getAccessToken
Description copied from class:AccessTokenProviderObtain 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.- Specified by:
getAccessTokenin classAccessTokenProvider- Returns:
- Access token to be added to connection header.
- Throws:
IOException
-