Class OidcLogoutHint

java.lang.Object
com.revetsec.oidc.OidcLogoutHint

@Immutable public final class OidcLogoutHint extends Object
An explicitly retained logout credential bound to the original OIDC continuity reference. It is not an identity proof. The compact ID token is emitted only inside explicit trusted-storage serialization or a prepared logout request. Parsing checks structure and continuity, without signature validation or rejecting an expired ID token. Immutable strings and parser/provider-owned copies cannot be erased; owned temporary byte arrays are cleared.
Since:
1.0.0
Author:
Mark Allen
  • Method Details

    • toSerializedForm

      Emits a credential-bearing versioned JSON envelope for trusted application storage. Never log this value.
      Returns:
      bounded serialized hint; parsing it creates no identity
      Throws:
      OidcLogoutException - if the selected representation cannot fit
      Since:
      1.0.0
    • toSealedForm

      Seals under a dedicated logout-hint type and the sealer's configured clock/lifetime profile. Valid large hints can exceed the unchanged sealer size ceiling; no truncation or chunking is performed.
      Parameters:
      sealer - application-owned sealer
      context - fixed application context
      lifetime - explicit sealing lifetime
      Returns:
      typed sealed credential for trusted storage
      Throws:
      NullPointerException - if a required argument is null
      OidcLogoutException - if size/configuration, interruption or the provider prevents sealing
      Since:
      1.0.0
    • fromSerializedFormResult

      @CheckReturnValue public static @NonNull OidcLogoutHintParseResult fromSerializedFormResult(@NonNull String serializedForm)
      Restores a structurally consistent credential from trusted application storage. No identity is authenticated.
      Parameters:
      serializedForm - credential-bearing storage form; never log it
      Returns:
      parsed credential or one value-free rejection
      Throws:
      NullPointerException - if serializedForm is null
      Since:
      1.0.0
    • fromSealedFormResult

      @CheckReturnValue public static @NonNull OidcLogoutHintParseResult fromSealedFormResult(@NonNull String sealedForm, @NonNull StateSealer sealer, @NonNull String context)
      Opens only a typed logout hint using the sealer's configured clock. Invalid/tampered/cross-purpose/expired sealed state releases no hint. Provider and interruption failures remain distinct fixed exceptions.
      Parameters:
      sealedForm - received typed sealed credential
      sealer - application-owned sealer
      context - original application context
      Returns:
      restored credential or value-free rejection, never authenticated identity
      Throws:
      NullPointerException - if a required argument is null
      OidcLogoutException - if the provider or interruption prevents opening
      Since:
      1.0.0
    • toString

      Redacts every credential and continuity field.
      Overrides:
      toString in class Object
      Returns:
      redacted description
      Since:
      1.0.0