Class OAuthStoreEntry

java.lang.Object
com.revetsec.oauth.server.OAuthStoreEntry

@Immutable @CheckReturnValue public final class OAuthStoreEntry extends Object
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 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 address
      version - the canonical base64url encoding of a 32-byte version nonce
      retainUntil - physical cleanup horizon, distinct from credential expiry
      sealedForm - encrypted ASCII envelope, at most 16,384 characters
      Returns:
      the bounded storage carrier
      Throws:
      NullPointerException - if an argument is null
      IllegalArgumentException - 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

      Redacts all persisted fields.
      Overrides:
      toString in class Object
      Returns:
      a fixed description
      Since:
      1.0.0