Class PendingAuthorization
java.lang.Object
com.revetsec.oauth.PendingAuthorization
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 Summary
Modifier and TypeMethodDescriptionReturns application data bound by the seal or trusted-store integrity, still subject to application redirect allowlisting.Returns the initiating client ID.Returns the creation instant.Returns the expiry bound by the sealed form or trusted-store integrity.Returns the initiating authorization-server issuer.Returns the exact registered redirect URI sent at begin.Returns the requested scope set.saveToResult(@NonNull PendingAuthorizationStore store, @NonNull BrowserBinding browserBinding) Saves plaintext protocol state with an unkeyed digest of the browser binding.saveToResult(@NonNull PendingAuthorizationStore store, @NonNull BrowserBinding browserBinding, @NonNull Duration remaining) Saves the complete browser-bound record within the supplied operation budget.toSealedForm(@NonNull StateSealer sealer, @NonNull String context) Seals the complete record under the pending-authorization label and exact application context.toString()Redacts all pending secrets and application data.
-
Method Details
-
getIssuer
-
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
-
getExpiresAt
Returns the expiry bound by the sealed form or trusted-store integrity.- Returns:
- expiry
- Since:
- 1.0.0
-
getApplicationData
-
toSealedForm
Seals the complete record under the pending-authorization label and exact application context.- Parameters:
sealer- the active and verification keyscontext- an application-chosen fixed context- Returns:
- the sealed form for a secure browser cookie
- Since:
- 1.0.0
-
saveToResult
@CheckReturnValue public @NonNull PendingAuthorizationSaveResult saveToResult(@NonNull PendingAuthorizationStore store, @NonNull BrowserBinding browserBinding) 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 storebrowserBinding- a browser-specific secret- Returns:
- the fixed storage outcome
- Since:
- 1.0.0
-
saveToResult
@CheckReturnValue public @NonNull PendingAuthorizationSaveResult saveToResult(@NonNull PendingAuthorizationStore store, @NonNull BrowserBinding browserBinding, @NonNull Duration remaining) 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 storebrowserBinding- browser-specific secretremaining- positive time left for this operation- Returns:
- the fixed storage outcome
- Since:
- 1.0.0
-
toString
-