public class OAuth2CredentialsWithRefresh extends OAuth2Credentials
A refreshable alternative to OAuth2Credentials.
To enable automatic token refreshes, you must provide an OAuth2RefreshHandler.
Constructors
OAuth2CredentialsWithRefresh(AccessToken accessToken, OAuth2CredentialsWithRefresh.OAuth2RefreshHandler refreshHandler)
protected OAuth2CredentialsWithRefresh(AccessToken accessToken, OAuth2CredentialsWithRefresh.OAuth2RefreshHandler refreshHandler)
Name | Description |
accessToken | AccessToken |
refreshHandler | OAuth2CredentialsWithRefresh.OAuth2RefreshHandler |
Methods
getRefreshHandler()
public OAuth2CredentialsWithRefresh.OAuth2RefreshHandler getRefreshHandler()
Returns the provided OAuth2RefreshHandler.
Type | Description |
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler |
newBuilder()
public static OAuth2CredentialsWithRefresh.Builder newBuilder()
Type | Description |
OAuth2CredentialsWithRefresh.Builder |
refreshAccessToken()
public AccessToken refreshAccessToken()
Refreshes the access token using the provided OAuth2RefreshHandler.
Type | Description |
AccessToken |
Type | Description |
IOException |