DPoPKeyManager
Properties
RFC 9449 token type string. Canonical casing — compare via isDPoPTokenType since RFC 6749 §5.1 does not mandate casing; servers may return "dpop", "DPoP", or any variant.
Functions
Idempotently deletes the key pair for alias.
Drops the cached key handle for alias without deleting its AndroidKeyStore entry. Use when signing with a cached handle fails — e.g. the backing keystore entry was evicted out-of-band — so the next loadKeyPair re-reads from the keystore and converges on the correct state (reload the real key, or null → fail fast to re-auth) instead of repeatedly signing with a dead handle.
Mints a new key pair on a miss. Use ONLY on the binding paths (/authorize, native login) where a DPoP key is supposed to be created. On the refresh / resource-decoration paths the key is already bound at login, so use loadKeyPair instead — minting there would sign a proof with a thumbprint the server never bound.
Returns whether the persisted fields required to use tokenType are internally consistent. A DPoP-bound credential must identify the key pair used for its proof; Bearer and transitional credentials do not require that identifier.
Returns true iff a key pair is already present in the AndroidKeyStore for the given alias. Side-effect-free — does NOT mint a key pair on miss.
Convenience overload — computes the alias for credentialsIdentifier and calls hasKeyPair.
Returns true iff tokenType matches "DPoP" case-insensitively (RFC 6749 §5.1). Handles null/empty safely — never returns true for those.
Returns true only for Android KeyStore failures that prove the bound key can never be used.
Load-only lookup: returns the key pair already bound for alias, or null if no key is present. Unlike generateOrLoadKeyPair this NEVER mints a key on a miss — it is the side-effect-free primitive the refresh and request-decoration paths must use so a credential whose bound key has gone missing (device restore, keystore eviction) fails fast and routes to re-auth instead of silently signing with a non-bound key.
Decides whether a DPoP proof should be attached to a request for a credential identified by credentialsIdentifier.