Class OAuth2Options
java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.OAuth2Options
Represents various configuration parameters for the OAuth2 destination creation.
- Since:
- 5.5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder implementation that helps with creating customizedOAuth2Optionsinstances.static classConfiguration for the token response cache used byOAuth2Service.static classConfigure the timeout applied to token retrieval. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OAuth2OptionsThe defaultOAuth2Optionsinstance that does not alter the token retrieval process and does not use mTLS for the target system connection.static final ResilienceConfiguration.TimeLimiterConfigurationThe default timeout of 10 seconds for token retrieval.static final OAuth2Options.TokenCacheParametersDefault token cache configuration used byOAuth2Service. -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth2Options.Builderbuilder()Returns a newOAuth2Options.Builderinstance that can be used to create a customizedOAuth2Optionsinstance.booleanReturns additional parameters for the OAuth2 token flow.TheKeyStoreto use for building an mTLS connection towards the target system.A timeout to be applied for token retrieval.Configuration for caching OAuth2 tokens.inthashCode()booleanIndicates whether to skip the OAuth2 token flow.
-
Field Details
-
DEFAULT_TIMEOUT
The default timeout of 10 seconds for token retrieval.- Since:
- 5.12.0
-
DEFAULT_TOKEN_CACHE_PARAMETERS
Default token cache configuration used byOAuth2Service. Effective defaults: 1 hour duration, 1000 entries, 30 seconds delta and cache statistics disabled.- Since:
- 5.21.0
- See Also:
-
TokenCacheConfiguration.DEFAULT
-
DEFAULT
The defaultOAuth2Optionsinstance that does not alter the token retrieval process and does not use mTLS for the target system connection.
-
-
Method Details
-
skipTokenRetrieval
public boolean skipTokenRetrieval()Indicates whether to skip the OAuth2 token flow.- Returns:
trueif the token retrieval should be skipped,falseotherwise.
-
getAdditionalTokenRetrievalParameters
Returns additional parameters for the OAuth2 token flow. These parameters will be put into the URL-form-encoded body in addition to the regular authentication information (such as the clientid).- Returns:
- Additional parameters for the OAuth2 token request.
-
builder
Returns a newOAuth2Options.Builderinstance that can be used to create a customizedOAuth2Optionsinstance.- Returns:
- A new
OAuth2Options.Builder.
-
equals
-
hashCode
public int hashCode() -
getTimeLimiter
A timeout to be applied for token retrieval.- Since:
- 5.12.0
-
getClientKeyStore
-
getTokenCacheParameters
Configuration for caching OAuth2 tokens.- Since:
- 5.21.0
-