Class OAuthStoreEntry
java.lang.Object
com.revetsec.oauth.server.OAuthStoreEntry
Immutable encrypted persistence carrier, not an authenticated authorization proof.
The engine authenticates its address, version, retention and schema before using it.
Backends preserve all fields exactly and never substitute retention for credential expiry.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull OAuthStoreEntryfromStoredForm(@NonNull OAuthStoreKey key, @NonNull String version, @NonNull Instant retainUntil, @NonNull String sealedForm) Reconstructs bounded persisted transport fields; this does not validate the encrypted payload.getKey()Returns the storage address.Returns physical cleanup authority only.Returns the opaque version for exact CAS comparison.Releases the encrypted storage envelope.toString()Redacts all persisted fields.
-
Method Details
-
fromStoredForm
public static @NonNull OAuthStoreEntry fromStoredForm(@NonNull OAuthStoreKey key, @NonNull String version, @NonNull Instant retainUntil, @NonNull String sealedForm) Reconstructs bounded persisted transport fields; this does not validate the encrypted payload. Permanent issuer/subject fences require the whole-second Instant.MAX sentinel and must never be TTL deleted. Other kinds require a finite whole-second retention instant.- Parameters:
key- the persisted addressversion- the canonical base64url encoding of a 32-byte version nonceretainUntil- physical cleanup horizon, distinct from credential expirysealedForm- encrypted ASCII envelope, at most 16,384 characters- Returns:
- the bounded storage carrier
- Throws:
NullPointerException- if an argument is nullIllegalArgumentException- if a transport field is invalid- Since:
- 1.0.0
-
getKey
Returns the storage address.- Returns:
- the address
- Since:
- 1.0.0
-
getVersion
Returns the opaque version for exact CAS comparison.- Returns:
- the version
- Since:
- 1.0.0
-
getRetainUntil
Returns physical cleanup authority only.- Returns:
- the retention horizon
- Since:
- 1.0.0
-
toSealedForm
Releases the encrypted storage envelope. Keep it out of diagnostics and browser responses.- Returns:
- the exact encrypted envelope
- Since:
- 1.0.0
-
toString
-