Package com.oracle.bmc.auth
Class RequestSignerCacheConfiguration
- java.lang.Object
-
- com.oracle.bmc.auth.RequestSignerCacheConfiguration
-
public final class RequestSignerCacheConfiguration extends Object
Configuration object used byBasicAuthenticationDetailsProviderimplementations to influence how request signer metadata should be cached.The cache settings are interpreted by
DefaultRequestSignerFactorywhen creating per-request suppliers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequestSignerCacheConfiguration.BuilderBuilder forRequestSignerCacheConfiguration.
-
Field Summary
Fields Modifier and Type Field Description static DurationDEFAULT_KEY_ID_TTLDefaulting to 1 minute will prevent frequent calls under heavy traffic and avoid long propagation in case of key rotationstatic DurationDEFAULT_PRIVATE_KEY_ID_TTL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RequestSignerCacheConfiguration.Builderbuilder()Creates a new builder with caching disabled.Optional<Duration>getKeyIdTimeToLive()Returns the optional time-to-live for cached key identifiers.Optional<Duration>getPrivateKeyTimeToLive()Returns the optional time-to-live for cached private keys.booleanisKeyIdCachingEnabled()Indicates whether the key identifier value should be cached.booleanisPrivateKeyCachingEnabled()Indicates whether the parsed private key should be cached.
-
-
-
Method Detail
-
isKeyIdCachingEnabled
public boolean isKeyIdCachingEnabled()
Indicates whether the key identifier value should be cached.- Returns:
- true if key identifiers may be cached, otherwise false.
-
isPrivateKeyCachingEnabled
public boolean isPrivateKeyCachingEnabled()
Indicates whether the parsed private key should be cached.- Returns:
- true if private keys may be cached, otherwise false.
-
getKeyIdTimeToLive
public Optional<Duration> getKeyIdTimeToLive()
Returns the optional time-to-live for cached key identifiers.- Returns:
- The optional time-to-live duration.
-
getPrivateKeyTimeToLive
public Optional<Duration> getPrivateKeyTimeToLive()
Returns the optional time-to-live for cached private keys.- Returns:
- The optional time-to-live duration.
-
builder
public static RequestSignerCacheConfiguration.Builder builder()
Creates a new builder with caching disabled.Enable individual caches (and optionally TTLs) using the builder’s configuration methods.
- Returns:
- A new builder instance.
-
-