Class OidcSessionReference

java.lang.Object
com.revetsec.oidc.OidcSessionReference

@Immutable public final class OidcSessionReference extends Object
Continuity reference for refresh and future logout. It holds original continuity claims, client binding and a SHA-256 nonce digest and the original flow's ACR acceptance set. It is not proof of identity and contains no access, refresh or compact ID token. Persist it in trusted application storage or seal it; parsing a serialized reference does not authenticate its fields.
Since:
1.0.0
Author:
Mark Allen
  • Method Details

    • getRequiredAcrValues

      Returns the original flow's immutable local ACR acceptance set. An empty set imposes no ACR acceptance requirement. This is comparison policy from trusted storage, never authenticated identity or current assurance.
      Returns:
      saved acceptable ACR values
      Since:
      1.0.0
    • toSerializedForm

      Explicitly serializes the original continuity fields and nonce digest for trusted storage. This discloses issuer, subject and session data; do not log it. It neither authenticates fields nor creates an identity.
      Returns:
      versioned, bounded JSON storage form
      Since:
      1.0.0
    • fromSerializedFormResult

      @CheckReturnValue public static @NonNull OidcSessionReferenceParseResult fromSerializedFormResult(@NonNull String serializedForm)
      Parses a bounded version-2 reference from trusted application storage, returning a fixed rejection for invalid structure. Version 1 lacks the original acceptance policy and is rejected; authenticate again rather than infer it. This supplies no identity. Untrusted browser storage must use fromSealedFormResult(String, StateSealer, String).
      Parameters:
      serializedForm - versioned storage form
      Returns:
      parsed reference or fixed rejection
      Since:
      1.0.0
    • toSealedForm

      Seals a reference under the OIDC-session type, an application-specific context and explicit lifetime. The sealer's lifetime and size bounds apply. The application owns session lifetime and refresh-token storage.
      Parameters:
      sealer - application sealer
      context - application-specific OIDC session context
      lifetime - how long the sealed reference opens
      Returns:
      sealed storage form
      Since:
      1.0.0
    • fromSealedFormResult

      @CheckReturnValue public static @NonNull OidcSessionReferenceParseResult fromSealedFormResult(@NonNull String sealedForm, @NonNull StateSealer sealer, @NonNull String context)
      Opens a sealed reference under its original context. Invalid sealed state and invalid reference structure return the same fixed, value-free rejection. No identity is created by opening a reference.
      Parameters:
      sealedForm - sealed storage form
      sealer - application sealer
      context - original OIDC session context
      Returns:
      parsed reference or fixed rejection
      Since:
      1.0.0
    • getSessionId

      Returns the original session ID, if present. This reference is not proof of identity.
      Returns:
      session ID
      Since:
      1.0.0
    • toString

      Redacts all session continuity fields.
      Overrides:
      toString in class Object
      Returns:
      a redacted description
      Since:
      1.0.0