Class AccessTokenRepository

java.lang.Object
org.apache.drill.exec.store.http.oauth.AccessTokenRepository

public class AccessTokenRepository extends Object
  • Constructor Details

  • Method Details

    • getOAuthConfig

      public OAuthConfig getOAuthConfig()
    • getTokenType

      public String getTokenType()
    • getAccessToken

      public String getAccessToken()
      Returns the current access token. Does not perform an HTTP request.
      Returns:
      The current access token.
    • getExpiresIn

      public String getExpiresIn()
    • refreshAccessToken

      public String refreshAccessToken()
      Refreshes the access token using the code and other information from the HTTP OAuthConfig. This executes a POST request. This method will throw exceptions if any of the required fields are empty. This plugin also updates the configuration in the storage plugin registry. In the event that a user submits a request and the access token is expired, the API will return a 401 non-authorized response. In the event of a 401 response, the AccessTokenAuthenticator will create additional calls to obtain an updated token. This process should be transparent to the user.
      Returns:
      String of the new access token.