public static class OAuth2CredentialsWithRefresh.Builder extends OAuth2Credentials.Builder
Methods
build()
public OAuth2CredentialsWithRefresh build()
Returns | |
---|---|
Type | Description |
OAuth2CredentialsWithRefresh |
setAccessToken(AccessToken token)
public OAuth2CredentialsWithRefresh.Builder setAccessToken(AccessToken token)
Sets the AccessToken to be consumed. It must contain an expiration time otherwise an IllegalArgumentException will be thrown.
Parameter | |
---|---|
Name | Description |
token | AccessToken |
Returns | |
---|---|
Type | Description |
OAuth2CredentialsWithRefresh.Builder |
setRefreshHandler(OAuth2CredentialsWithRefresh.OAuth2RefreshHandler handler)
public OAuth2CredentialsWithRefresh.Builder setRefreshHandler(OAuth2CredentialsWithRefresh.OAuth2RefreshHandler handler)
Sets the OAuth2RefreshHandler to be used for token refreshes.
Parameter | |
---|---|
Name | Description |
handler | OAuth2CredentialsWithRefresh.OAuth2RefreshHandler |
Returns | |
---|---|
Type | Description |
OAuth2CredentialsWithRefresh.Builder |