Interface OAuthIssuerKeyProvider
Trusted application-owned durable key lifecycle and distribution callback. Implementations must be thread-safe,
return promptly on the calling thread, cooperate with interruption and the remaining original operation budget,
and preserve published-key retention through all issued token expiries and configured margins across nodes and
restarts. Returning a snapshot declares that its generation was actually published at its publication instant.
Construction does not call the provider. Ordinary key rotation does not invalidate grants; compromise or store
restoration requires an explicit issuer revocation fence before reopening traffic.
The callback receives no candidate expiry or durable issuance acknowledgement. Persist conservative
retention promises before enabling dependent issuance; process-local observations cannot recover missing
publication history. A well-formed initial snapshot cannot prove that an omitted prior key is safe to remove.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull OAuthIssuerKeyProviderfromSnapshot(@NonNull OAuthIssuerKeySnapshot snapshot) Supplies one fixed immutable declaration without I/O.getSnapshot(@NonNull Duration remainingBudget) Returns the current immutable declaration, preserving in-flight signing and public verification overlap.
-
Method Details
-
getSnapshot
Returns the current immutable declaration, preserving in-flight signing and public verification overlap.- Parameters:
remainingBudget- positive time left in the original operation- Returns:
- one immutable snapshot
- Since:
- 1.0.0
-
fromSnapshot
@CheckReturnValue static @NonNull OAuthIssuerKeyProvider fromSnapshot(@NonNull OAuthIssuerKeySnapshot snapshot) Supplies one fixed immutable declaration without I/O. This convenience provider adds no durable publication history or cross-node rotation coordination.- Parameters:
snapshot- required snapshot- Returns:
- a thread-safe fixed provider
- Throws:
NullPointerException- if snapshot is null- Since:
- 1.0.0
-