public static class OAuth2CredentialsWithRefresh.Builder extends OAuth2Credentials.Builder
Modifier and Type | Method and Description |
---|---|
OAuth2CredentialsWithRefresh |
build() |
OAuth2CredentialsWithRefresh.Builder |
setAccessToken(AccessToken token)
Sets the
AccessToken to be consumed. |
OAuth2CredentialsWithRefresh.Builder |
setRefreshHandler(OAuth2CredentialsWithRefresh.OAuth2RefreshHandler handler)
Sets the
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler to be used for token refreshes. |
getAccessToken, getExpirationMargin, getRefreshMargin, setExpirationMargin, setRefreshMargin
public OAuth2CredentialsWithRefresh.Builder setAccessToken(AccessToken token)
AccessToken
to be consumed. It must contain an expiration time otherwise an
IllegalArgumentException
will be thrown.setAccessToken
in class OAuth2Credentials.Builder
public OAuth2CredentialsWithRefresh.Builder setRefreshHandler(OAuth2CredentialsWithRefresh.OAuth2RefreshHandler handler)
OAuth2CredentialsWithRefresh.OAuth2RefreshHandler
to be used for token refreshes.public OAuth2CredentialsWithRefresh build()
build
in class OAuth2Credentials.Builder
Copyright © 2023 Google. All rights reserved.