public class OAuth2CredentialsWithRefresh extends OAuth2Credentials
OAuth2Credentials
.
To enable automatic token refreshes, you must provide an OAuth2CredentialsWithRefresh.OAuth2RefreshHandler
.
Modifier and Type | Class and Description |
---|---|
static class |
OAuth2CredentialsWithRefresh.Builder |
static interface |
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler
Interface for the refresh handler.
|
OAuth2Credentials.CredentialsChangedListener
Modifier | Constructor and Description |
---|---|
protected |
OAuth2CredentialsWithRefresh(AccessToken accessToken,
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler refreshHandler) |
protected |
OAuth2CredentialsWithRefresh(OAuth2CredentialsWithRefresh.Builder builder) |
Modifier and Type | Method and Description |
---|---|
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler |
getRefreshHandler()
Returns the provided
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler . |
static OAuth2CredentialsWithRefresh.Builder |
newBuilder() |
AccessToken |
refreshAccessToken()
Refreshes the access token using the provided
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler . |
addChangeListener, create, equals, getAccessToken, getAdditionalHeaders, getAuthenticationType, getFromServiceLoader, getRequestMetadata, getRequestMetadata, getRequestMetadataInternal, hashCode, hasRequestMetadata, hasRequestMetadataOnly, newInstance, refresh, refreshIfExpired, removeChangeListener, toBuilder, toString
blockingGetToCallback, getRequestMetadata
protected OAuth2CredentialsWithRefresh(OAuth2CredentialsWithRefresh.Builder builder)
protected OAuth2CredentialsWithRefresh(AccessToken accessToken, OAuth2CredentialsWithRefresh.OAuth2RefreshHandler refreshHandler)
public AccessToken refreshAccessToken() throws IOException
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler
.refreshAccessToken
in class OAuth2Credentials
IOException
public OAuth2CredentialsWithRefresh.OAuth2RefreshHandler getRefreshHandler()
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler
.public static OAuth2CredentialsWithRefresh.Builder newBuilder()
Copyright © 2023 Google. All rights reserved.