Class PendingAuthorization

java.lang.Object
com.revetsec.oauth.PendingAuthorization

@Immutable public final class PendingAuthorization extends Object
One pending browser authorization, including secret state, PKCE verifier and an OIDC nonce slot. The public accessors expose only descriptive fields. The complete record can be placed in a sealed cookie or saved in a browser-bound store; neither path exposes a free-standing serializer. A sealed cookie can be replayed concurrently: use a durable shared atomic store when client-side single use is required across callbacks, nodes or restarts.
Since:
1.0.0
Author:
Mark Allen
  • Method Details

    • getIssuer

      Returns the initiating authorization-server issuer.
      Returns:
      the issuer
      Since:
      1.0.0
    • getClientId

      Returns the initiating client ID.
      Returns:
      the client ID
      Since:
      1.0.0
    • getRedirectUri

      Returns the exact registered redirect URI sent at begin.
      Returns:
      the redirect URI
      Since:
      1.0.0
    • getRequestedScopes

      Returns the requested scope set.
      Returns:
      scopes
      Since:
      1.0.0
    • getCreatedAt

      Returns the creation instant.
      Returns:
      creation
      Since:
      1.0.0
    • getExpiresAt

      Returns the expiry bound by the sealed form or trusted-store integrity.
      Returns:
      expiry
      Since:
      1.0.0
    • getApplicationData

      Returns application data bound by the seal or trusted-store integrity, still subject to application redirect allowlisting.
      Returns:
      data
      Since:
      1.0.0
    • toSealedForm

      Seals the complete record under the pending-authorization label and exact application context.
      Parameters:
      sealer - the active and verification keys
      context - an application-chosen fixed context
      Returns:
      the sealed form for a secure browser cookie
      Since:
      1.0.0
    • saveToResult

      Saves plaintext protocol state with an unkeyed digest of the browser binding. The trusted store must protect confidentiality and integrity; the digest is a comparison value, not cryptographic authentication. It receives the exact expiry and must consume atomically. This convenience overload supplies a five-second budget.
      Parameters:
      store - the store
      browserBinding - a browser-specific secret
      Returns:
      the fixed storage outcome
      Since:
      1.0.0
    • saveToResult

      Saves the complete browser-bound record within the supplied operation budget. Continue the browser authorization flow only after SAVED. A late, failed or possibly completed provider call returns INDETERMINATE; it must not be treated as an absent record or an instruction to retry.
      Parameters:
      store - the store
      browserBinding - browser-specific secret
      remaining - positive time left for this operation
      Returns:
      the fixed storage outcome
      Since:
      1.0.0
    • toString

      Redacts all pending secrets and application data.
      Overrides:
      toString in class Object
      Returns:
      a redacted description
      Since:
      1.0.0