Configuration options for token request verification
A promise that resolves with verified client attestation and DPoP information
const result = await verifyAccessTokenRequest({
accessTokenRequest: parsedRequest,
authorizationServerMetadata: metadata,
callbacks: { hash, verifyJwt },
clientAttestation: { jwt: "...", popJwt: "..." },
codeExpiresAt: new Date(Date.now() + 600000),
dpop: {
allowedSigningAlgs: ["ES256"],
expectedNonce: "server-issued-nonce",
jwt: dpopJwt,
},
expectedCode: "auth_code_123",
grant: parsedGrant,
pkce: { codeChallenge, codeChallengeMethod: "S256", codeVerifier },
request: httpRequest,
});
Verifies an authorization code token request by validating PKCE, DPoP, and client attestation.
This function performs comprehensive validation of an OAuth 2.0 authorization code token request according to Italian IT-Wallet specifications, including: