The verification options
Optionaldpop?: VerifyAuthorizationRequestDPoPOptionalnow?: DateThe current time to use when verifying the JWTs. If not provided current time will be used.
A promise resolving to verification results containing:
dpop - Verified DPoP information including JWK and thumbprint (if DPoP was provided)clientAttestation - Verified client attestation JWTs (if client attestation was provided)When DPoP and client attestation keys don't match (if ensureConfirmationKeyMatchesDpopKey is true)
const result = await verifyAuthorizationRequest({
authorizationRequest: { client_id: 'client-123' },
authorizationServerMetadata: { issuer: 'https://auth.example.com' },
callbacks: { hash: hashCallback, verifyJwt: verifyJwtCallback },
dpop: {
jwt: dpopJwtFromHeaders,
required: true,
allowedSigningAlgs: ['ES256']
},
clientAttestation: {
walletAttestationJwt: clientAttJwtFromHeaders,
clientAttestationPopJwt: clientAttPopJwtFromHeaders,
required: true,
ensureConfirmationKeyMatchesDpopKey: true
},
request: httpRequest
});
console.log(result.dpop?.jwkThumbprint);
console.log(result.clientAttestation?.clientAttestation.payload.sub);
Verifies an authorization request by validating DPoP and client attestation credentials.
This function performs cryptographic verification of DPoP proofs and client attestation JWTs extracted from authorization request headers. It validates signatures, checks expiration times, and optionally ensures that DPoP and client attestation use the same key.
Important: This function performs verification only. Use
parseAuthorizationRequestfirst to extract the necessary JWTs from request headers.