Class AccessTokenRepository
java.lang.Object
org.apache.drill.exec.store.http.oauth.AccessTokenRepository
-
Constructor Summary
ConstructorDescriptionAccessTokenRepository
(HttpProxyConfig proxyConfig, HttpStoragePluginConfig pluginConfig, PersistentTokenTable tokenTable) -
Method Summary
Modifier and TypeMethodDescriptionReturns the current access token.Refreshes the access token using the code and other information from the HTTP OAuthConfig.
-
Constructor Details
-
AccessTokenRepository
public AccessTokenRepository(HttpProxyConfig proxyConfig, HttpStoragePluginConfig pluginConfig, PersistentTokenTable tokenTable)
-
-
Method Details
-
getOAuthConfig
-
getTokenType
-
getAccessToken
Returns the current access token. Does not perform an HTTP request.- Returns:
- The current access token.
-
getExpiresIn
-
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.
-