Class OAuth2CredentialsWithRefresh.Builder (1.27.0)

public static class OAuth2CredentialsWithRefresh.Builder extends OAuth2Credentials.Builder

Inheritance

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

Methods

build()

public OAuth2CredentialsWithRefresh build()
Returns
Type Description
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
Name Description
token AccessToken
Returns
Type Description
OAuth2CredentialsWithRefresh.Builder
Overrides

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