Class CredentialBasedAccessTokenProvider

java.lang.Object
org.apache.hadoop.hdfs.web.oauth2.AccessTokenProvider
org.apache.hadoop.hdfs.web.oauth2.CredentialBasedAccessTokenProvider
All Implemented Interfaces:
org.apache.hadoop.conf.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 Details

  • Method Details

    • getCredential

      public abstract String getCredential()
    • setConf

      public void setConf(org.apache.hadoop.conf.Configuration conf)
      Description copied from class: AccessTokenProvider
      Set the conf.
      Specified by:
      setConf in interface org.apache.hadoop.conf.Configurable
      Overrides:
      setConf in class AccessTokenProvider
      Parameters:
      conf - New configuration.
    • getAccessToken

      public String getAccessToken() throws IOException
      Description copied from class: AccessTokenProvider
      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.
      Specified by:
      getAccessToken in class AccessTokenProvider
      Returns:
      Access token to be added to connection header.
      Throws:
      IOException