Class OAuth2CredentialsWithRefresh.Builder (1.3.0)

public static class OAuth2CredentialsWithRefresh.Builder extends OAuth2Credentials.Builder

Inheritance

java.lang.Object > OAuth2Credentials.Builder > OAuth2CredentialsWithRefresh.Builder

Methods

build()

public OAuth2CredentialsWithRefresh build()
Returns
TypeDescription
OAuth2CredentialsWithRefresh
Overrides

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
NameDescription
tokenAccessToken
Returns
TypeDescription
OAuth2CredentialsWithRefresh.Builder
Overrides

setRefreshHandler(OAuth2CredentialsWithRefresh.OAuth2RefreshHandler handler)

public OAuth2CredentialsWithRefresh.Builder setRefreshHandler(OAuth2CredentialsWithRefresh.OAuth2RefreshHandler handler)

Sets the OAuth2RefreshHandler to be used for token refreshes.

Parameter
NameDescription
handlerOAuth2CredentialsWithRefresh.OAuth2RefreshHandler
Returns
TypeDescription
OAuth2CredentialsWithRefresh.Builder