Class OAuthClientMetadataCacheEntry
java.lang.Object
com.revetsec.oauth.server.OAuthClientMetadataCacheEntry
Immutable bounded encrypted cache carrier. This is storage data, never authenticated metadata or
a fresh-fetch proof. Core authentication and current policy/time checks are required before use.
Providers preserve all fields exactly. The expiry is a storage cleanup hint, not permission to
use a document; provider TTL may only shorten retention.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionfromStoredForm(@NonNull OAuthClientMetadataCacheKey key, @NonNull String version, @NonNull Instant expiresAt, @NonNull String sealedForm) Reconstructs syntax-bounded storage fields without authenticating their contents.Returns the unauthenticated storage expiry hint.getKey()Returns the exact address.Returns the exact comparison nonce, not a freshness ordering value.Releases the encrypted envelope for persistence; never log it or render it in a browser response.toString()Redacts every field.
-
Method Details
-
fromStoredForm
public static @NonNull OAuthClientMetadataCacheEntry fromStoredForm(@NonNull OAuthClientMetadataCacheKey key, @NonNull String version, @NonNull Instant expiresAt, @NonNull String sealedForm) Reconstructs syntax-bounded storage fields without authenticating their contents.- Parameters:
key- the exact addressversion- a canonical base64url 32-byte nonce; core writes use a fresh version on every replacementexpiresAt- a finite whole-second UTC expiry hint, distinct from authenticated freshnesssealedForm- the exact nonempty ASCII encrypted envelope, at most 16384 characters- Returns:
- the bounded carrier
- Throws:
NullPointerException- if an argument is nullIllegalArgumentException- if a field is invalid- Since:
- 1.0.0
-
getKey
Returns the exact address.- Returns:
- the address
- Since:
- 1.0.0
-
getVersion
Returns the exact comparison nonce, not a freshness ordering value.- Returns:
- the opaque version
- Since:
- 1.0.0
-
getExpiresAt
Returns the unauthenticated storage expiry hint.- Returns:
- the expiry hint
- Since:
- 1.0.0
-
toSealedForm
Releases the encrypted envelope for persistence; never log it or render it in a browser response.- Returns:
- the exact envelope
- Since:
- 1.0.0
-
toString
-