PendingAuth

@Serializable
data class PendingAuth(val state: String, val codeVerifier: String, val redirectUri: String, val flowOrigin: String, val authServerNonce: String?, val dpopPrivateKey: ByteArray, val dpopPublicKey: ByteArray, val issuer: String, val authorizationEndpoint: String, val tokenEndpoint: String, val parEndpoint: String, val revocationEndpoint: String? = null, val pdsUrl: String? = null, val did: String? = null, val handle: String? = null, val promptValuesSupported: List<String> = emptyList(), val createdAtEpochMillis: Long = 0)

The in-flight half of an OAuth login, captured between beginLogin / beginSignup and AtOAuth.completeLogin.

This exists as a persistable type because the authorization step happens in a different process — a browser or Custom Tab. On Android the OS is free to kill the app while the user is typing a password on the authorization page, and it routinely does on low-memory devices. If the PKCE verifier and CSRF state only lived in memory, that kill would strand the login permanently: the callback returns to a fresh process that has no idea a login was ever started, and the user sees an error no amount of retrying can clear.

The DPoP keypair is serialized as raw byte arrays (PKCS8 private key + X509 public key), exactly as OAuthSession does. The consumer's PendingAuthStore implementation is responsible for encrypting these at rest — this record briefly holds key material and a PKCE verifier, so it deserves the same protection as a session.

The auth-server metadata is flattened rather than nested so the stored shape stays a flat, forward-compatible JSON object.

Constructors

Link copied to clipboard
constructor(state: String, codeVerifier: String, redirectUri: String, flowOrigin: String, authServerNonce: String?, dpopPrivateKey: ByteArray, dpopPublicKey: ByteArray, issuer: String, authorizationEndpoint: String, tokenEndpoint: String, parEndpoint: String, revocationEndpoint: String? = null, pdsUrl: String? = null, did: String? = null, handle: String? = null, promptValuesSupported: List<String> = emptyList(), createdAtEpochMillis: Long = 0)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

stamped at save time so AtOAuth can discard a pending login that is older than its TTL. Authorization codes expire server-side in minutes; a pending record that outlives that is never going to complete, and keeping key material on disk past its usefulness is needless exposure.

Link copied to clipboard
val did: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Serialized AtOAuth's internal FlowOrigin"Login" or "Signup".

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int