Class OAuthIssuerKeySnapshot
java.lang.Object
com.revetsec.oauth.server.OAuthIssuerKeySnapshot
Immutable application declaration of active, published and retained public keys. The active projection is
always included. Identifiers must never be reused for different material. A new generation has a strictly
later publication instant; keep its published keys available for the configured public metadata HTTP cache max-age
before signing. Retirement boundaries cannot precede outstanding token expiries plus skew, deadline and cache margins.
Applications persist these obligations across nodes, restarts and restores; an initial snapshot is a trusted
declaration, not evidence of external distribution. At most 100 keys and 128 KiB of aggregate configuration
are accepted; response limits apply separately. No provider lookup or signing occurs during construction.
A fresh lifecycle instance conservatively waits from this generation's publication instant before signing,
even when another process remembers an earlier staging observation for the same public key.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds a checked immutable declaration without signing or provider lookup. -
Method Summary
Modifier and TypeMethodDescriptionReturns the active signing holder.Returns the application lifecycle generation declaration.Returns the declared publication instant for this generation.Returns the declared earliest removal instants for retained public keys.Returns the published and retained public verification keys.toString()withActiveKey(@NonNull OAuthIssuerSigningKey activeKey) Starts a builder around the required active signing key.
-
Method Details
-
withActiveKey
@CheckReturnValue public static @NonNull OAuthIssuerKeySnapshot.Builder withActiveKey(@NonNull OAuthIssuerSigningKey activeKey) Starts a builder around the required active signing key.- Parameters:
activeKey- required immutable signing key- Returns:
- a new builder
- Throws:
NullPointerException- if activeKey is null- Since:
- 1.0.0
-
getActiveKey
Returns the active signing holder.- Returns:
- the active signing holder
- Since:
- 1.0.0
-
getVerificationKeys
-
getGeneration
Returns the application lifecycle generation declaration.- Returns:
- the exact application lifecycle generation
- Since:
- 1.0.0
-
getPublishedAt
Returns the declared publication instant for this generation.- Returns:
- when this generation was published to independent resources
- Since:
- 1.0.0
-
getRetirementNotBefore
-
toString
-