Interface OAuth2ServiceProvider.OAuth2ServiceProviderBuilder
- Enclosing interface:
- OAuth2ServiceProvider
public static interface OAuth2ServiceProvider.OAuth2ServiceProviderBuilder
Builder type to customize OAuth2 service specific settings.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Finilize builder, instantiate the object.platform(CloudPlatform platform) Set a static platform object.serviceSettings(OAuth2ServiceSettings serverSettings) Set custom OAuth service settings.staticAccessToken(com.auth0.jwt.interfaces.DecodedJWT accessToken) Set a static access token.staticCredentials(Credentials credentials) Set a static credentials object.Set a token service cache.
-
Method Details
-
build
Finilize builder, instantiate the object.- Returns:
- A new instance of
OAuth2ServiceProvider.
-
staticCredentials
@Nonnull OAuth2ServiceProvider.OAuth2ServiceProviderBuilder staticCredentials(@Nullable Credentials credentials) Set a static credentials object. The client identity will not be derived automatically any longer.- Parameters:
credentials- TheCredentialsobject.- Returns:
- The same builder.
-
serviceSettings
@Nonnull OAuth2ServiceProvider.OAuth2ServiceProviderBuilder serviceSettings(@Nullable OAuth2ServiceSettings serverSettings) Set custom OAuth service settings. Use this method to customize service endpoints.- Parameters:
serverSettings- TheOAuth2ServiceSettingsobject, containing base url and OAuth related paths.- Returns:
- The same builder.
-
staticAccessToken
@Nonnull OAuth2ServiceProvider.OAuth2ServiceProviderBuilder staticAccessToken(@Nullable com.auth0.jwt.interfaces.DecodedJWT accessToken) Set a static access token. The current user access token will no longer be used to derive service binding.- Parameters:
accessToken- TheDecodedJWTobject.- Returns:
- The same builder.
-
platform
@Nonnull OAuth2ServiceProvider.OAuth2ServiceProviderBuilder platform(@Nullable CloudPlatform platform) Set a static platform object. When using this method, the platform will no longer be derived automatically.- Parameters:
platform- TheCloudPlatformobject.- Returns:
- The same builder.
-
tokenServiceCache
@Nonnull OAuth2ServiceProvider.OAuth2ServiceProviderBuilder tokenServiceCache(@Nullable OAuth2TokenServiceCache cache) Set a token service cache. If this property remains null, then a new cache will be instantiated by default.- Parameters:
cache- TheOAuth2TokenServiceCacheobject.- Returns:
- The same builder.
-