Class JwksClientConfigurationProperties
java.lang.Object
io.micronaut.security.token.jwt.signature.jwks.JwksClientConfigurationProperties
- All Implemented Interfaces:
JwksClientConfiguration
@ConfigurationProperties("micronaut.security.token.jwt.signatures.jwks-client")
public class JwksClientConfigurationProperties
extends Object
implements JwksClientConfiguration
ConfigurationProperties implementation of JwksClientConfiguration.- Since:
- 5.5.2
- Author:
- Sergio del Amo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull DurationHow long a remote JWK Set is not requested again after a retrieval failed or returned no keys.@NonNull DurationHow long a remote JWK Set retrieval may take before it is given up and treated as a failure.voidsetFailureBackoff(@NonNull Duration failureBackoff) How long a remote JWK Set is not requested again after a retrieval failed (for example, connection refused, non-2xx response or unparseable body) or returned no keys.voidsetRetrievalTimeout(@NonNull Duration retrievalTimeout) How long a remote JWK Set retrieval may take before it is given up and treated as a failure, which starts the failure back-off.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_FAILURE_BACKOFF
The default failure back-off: 10 seconds. -
DEFAULT_RETRIEVAL_TIMEOUT
The default retrieval timeout: 30 seconds.
-
-
Constructor Details
-
JwksClientConfigurationProperties
public JwksClientConfigurationProperties()
-
-
Method Details
-
getFailureBackoff
Description copied from interface:JwksClientConfigurationHow long a remote JWK Set is not requested again after a retrieval failed or returned no keys. A zero or negative duration disables the back-off.- Specified by:
getFailureBackoffin interfaceJwksClientConfiguration- Returns:
- The failure back-off duration.
-
getRetrievalTimeout
Description copied from interface:JwksClientConfigurationHow long a remote JWK Set retrieval may take before it is given up and treated as a failure. It bounds the retrieval shared by concurrent callers even when the underlyingJwksClienthas no timeout of its own. A zero or negative duration disables the timeout.- Specified by:
getRetrievalTimeoutin interfaceJwksClientConfiguration- Returns:
- The retrieval timeout.
-
setRetrievalTimeout
How long a remote JWK Set retrieval may take before it is given up and treated as a failure, which starts the failure back-off. Concurrent callers share one retrieval per signature configuration and url, so without this timeout a retrieval which never completes (for example a JWKS client without timeouts of its own) would block every token for that configuration. Set it to 0 to disable the timeout. Default value (30 seconds).- Parameters:
retrievalTimeout- The retrieval timeout.
-
setFailureBackoff
How long a remote JWK Set is not requested again after a retrieval failed (for example, connection refused, non-2xx response or unparseable body) or returned no keys. While the back-off lasts, tokens which cannot be verified with another signature configuration are rejected without contacting the JWKS endpoint again. Set it to 0 to disable the back-off. Default value (10 seconds).- Parameters:
failureBackoff- The failure back-off duration.
-