Class JwksPublisher.Builder
java.lang.Object
com.revetsec.jose.JwksPublisher.Builder
- Enclosing class:
JwksPublisher
Configures an immutable public key snapshot. Optional setters replace previous values; null restores defaults.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an immutable snapshot and its bounded JSON representation and entity tag.httpCacheMaxAge(@Nullable Duration httpCacheMaxAge) Replaces the max-age advertised in outgoing HTTP Cache-Control headers.toString()Returns a description without public key metadata.
-
Method Details
-
httpCacheMaxAge
@CanIgnoreReturnValue public @NonNull JwksPublisher.Builder httpCacheMaxAge(@Nullable Duration httpCacheMaxAge) Replaces the max-age advertised in outgoing HTTP Cache-Control headers. It must be zero through 24 hours inclusive, expressed in whole seconds. This setting does not expire or reload the immutable key snapshot, and does not affectJwksPublisher.toJson()orJwksPublisher.toJsonObject().- Parameters:
httpCacheMaxAge- the HTTP cache max-age, or null to restore 60 seconds- Returns:
- this builder
- Throws:
IllegalArgumentException- if the max-age is negative, fractional or over 24 hours- Since:
- 1.0.0
-
build
Builds an immutable snapshot and its bounded JSON representation and entity tag.- Returns:
- the publisher
- Throws:
IllegalArgumentException- if identifiers repeat or the document exceeds 256 KiB- Since:
- 1.0.0
-
toString
-