ConfRefreshTokenBasedAccessTokenProvider (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.web.oauth2, class: ConfRefreshTokenBasedAccessTokenProvider

Package org.apache.hadoop.hdfs.web.oauth2

# Class ConfRefreshTokenBasedAccessTokenProvider

java.lang.Object
org.apache.hadoop.hdfs.web.oauth2.AccessTokenProvider
org.apache.hadoop.hdfs.web.oauth2.ConfRefreshTokenBasedAccessTokenProvider

All Implemented Interfaces:
  `org.apache.hadoop.conf.Configurable`

@Public @Evolving public class ConfRefreshTokenBasedAccessTokenProvider extends AccessTokenProvider
Supply a access token obtained via a refresh token (provided through the Configuration using the second half of the Authorization Code Grant workflow.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `OAUTH_REFRESH_TOKEN_EXPIRES_KEY`
  `static final String`
  `OAUTH_REFRESH_TOKEN_KEY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConfRefreshTokenBasedAccessTokenProvider()`
  `ConfRefreshTokenBasedAccessTokenProvider(org.apache.hadoop.util.Timer timer)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getAccessToken()`
  Obtain the access token that should be added to http connection's header.
  `String`
  `getRefreshToken()`
  `void`
  `setConf(org.apache.hadoop.conf.Configuration conf)`
  Set the conf.

  ### Methods inherited from class org.apache.hadoop.hdfs.web.oauth2.AccessTokenProvider

  `getConf`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### OAUTH_REFRESH_TOKEN_KEY

    public static final String OAUTH_REFRESH_TOKEN_KEY
    See Also:
      - Constant Field Values

  - ### OAUTH_REFRESH_TOKEN_EXPIRES_KEY

    public static final String OAUTH_REFRESH_TOKEN_EXPIRES_KEY
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ConfRefreshTokenBasedAccessTokenProvider

    public ConfRefreshTokenBasedAccessTokenProvider()

  - ### ConfRefreshTokenBasedAccessTokenProvider

    public ConfRefreshTokenBasedAccessTokenProvider(org.apache.hadoop.util.Timer timer)

- ## Method Details

  - ### 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`

  - ### getRefreshToken

    public String getRefreshToken()