You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for the DPoP-bound `attest_jwt_client_auth_dpop` client authentication method (draft 09 §5.2): a new `clientAuthenticationClientAttestationJwtDpop` client-auth callback that emits a single DPoP proof doubling as the Client Attestation PoP (client instance key == DPoP key), plus authorization-server verification of the combined method (attestation JWT + DPoP proof with a mandatory `cnf` JWK to DPoP key match).
// Ensure the client id matches with the client id from the session
354
-
thrownewOauth2ServerErrorResponseError(
355
-
{
356
-
error: Oauth2ErrorCodes.InvalidClient,
357
-
error_description: `The client id '${verifiedClientAttestation.clientAttestation.payload.sub}' in the client attestation does not match the client id for the authorization.`,
358
-
},
359
-
{
360
-
status: 401,
361
-
}
378
+
// Ensure the client id matches with the client id from the session
// The DPoP proof is the Client Attestation PoP in this method, so a valid DPoP proof is required.
399
+
if(!dpopJwkThumbprint){
400
+
thrownewOauth2ServerErrorResponseError({
401
+
error: Oauth2ErrorCodes.InvalidClient,
402
+
error_description: `Client attestation provided without an '${oauthClientAttestationPopHeader}' header, but no valid DPoP proof is present. The '${SupportedClientAuthenticationMethod.ClientAttestationJwtDpop}' method requires a DPoP proof.`,
'Expected the DPoP JWK thumbprint value to match the JWK thumbprint of the client attestation confirmation JWK. Ensure both DPoP and client attestation use the same key.',
'Expected the DPoP JWK thumbprint value to match the JWK thumbprint of the client attestation confirmation JWK. Ensure both DPoP and client attestation use the same key.',
467
+
},
468
+
{
469
+
status: 401,
470
+
}
471
+
)
472
+
}
387
473
}
388
474
389
475
asyncfunctionverifyAccessTokenRequestDpop(
@@ -406,6 +492,7 @@ async function verifyAccessTokenRequestDpop(
0 commit comments