jwk
).htm
) and URI (htu
).jti
) for replay prevention.ath
) of the access token.nonce
claim to ensure the client application recently generated the DPoP Proof JWT.Grant type | Description |
---|---|
authorization_code | Authorization Code Grant |
client_credentials | Client Credentials Grant |
password | Resource Owner Password Grant |
refresh_token | Refresh Token Grant |
urn:ietf:params:oauth:grant-type:device_code | Device Authorization Grant |
http://auth0.com/oauth/grant-type/password-realm | Use an extension grant similar to the Resource Owner Password Grant that includes the ability to indicate a specific realm |
http://auth0.com/oauth/grant-type/passwordless/otp | Passwordless Grant Request |
http://auth0.com/oauth/grant-type/mfa-oob | Multi-factor Authentication OOB Grant Request |
http://auth0.com/oauth/grant-type/mfa-otp | Multi-factor Authentication OTP Grant Request |
http://auth0.com/oauth/grant-type/mfa-recovery-code | Multi-factor Authentication Recovery Grant Request |
urn:ietf:params:oauth:grant-type:token-exchange | Custom Token Exchange Grant Request |
urn:okta:params:oauth:grant-type:webauthn | WebAuthn Grant Request |
/token
endpoint, your client application must create a DPoP Proof JWT. A DPoP Proof JWT is a JSON Web Token (JWT) signed by your client’s private key that serves as the “proof of possession.”
The DPoP Proof JWT consists of a JWT header and payload that contains claims linked to the token request:
DPoP Proof JWT Claim | Description |
---|---|
typ | Set to dpop+jwt . |
alg | The asymmetric signing algorithm used, such as RS256 or ES256 . |
jwk | A JSON Web Key (JWK) representation of your client’s public key. |
DPoP Proof JWT Claim | Description |
---|---|
jti | A unique identifier for the JWT to prevent replay attacks. |
htm | The HTTP method of the request the DPoP proof is for, such as POST for token requests and GET for API calls. |
htu | The HTTP URI of the request the DPoP Proof JWT is for, without the fragment and query parameters. For example: https://api.example.com/data?param=1#section1 becomes https://api.example.com/data . |
iat | The creation timestamp of the JWT. |
ath | For API calls with an access token, a base64url-encoded SHA-256 hash of the access token. |
nonce | For public clients requiring a nonce , a server-provided nonce value. |
/token
endpoint, it includes the DPoP Proof JWT in the HTTP header of the request:
/token
endpoint./token
request and doesn’t include a nonce
value in the DPoP HTTP header, Auth0 responds with an HTTP 400
code and an error message like the following:
DPoP-Nonce
header in the response headers. You must use the value of the DPoP-Nonce
header and regenerate the DPoP proof (as in Step 2), include a nonce
claim with that value, and resubmit the request to the /token
endpoint.
The following code sample shows the end-to-end flow when making and then retrying a /token
request with a nonce claim from a public client:
htm
, htu
, jti,
and iat
claims.cnf
, in the access token. The cnf
claim contains the thumbprint (hash) of the public key taken from the DPoP Proof JWT. By including it in the access token, the Auth0 Authorization Server binds the access token to that specific public key, or “sender-constrains” the access token.token_type
in the Authorization
header to DPoP
instead of Bearer
in the token response. Traditionally, when the access token is passed in the Authorization
header, it is set to Bearer
. However, because we’re passing an access token bound to a public key using DPoP, it is set to DPoP
instead.htm
claim is the API request’s HTTP
method, such as GET
or POST
.htu
claim is the API request’s URI.ath
claim is the base64url-encoded SHA-256 hash of the DPoP-bound access token you received in Step 3.Authorization
header using the DPoP
authentication scheme:
DPoP
HTTP header:DPoP
HTTP header must include an additional ath
claim. The ath
claim is a base64url encoded SHA256 hash of the issued access token.
The resource server:
jwk
header.htm
, htu
, jti
, iat
, and ath
claims.jwk
header matches the public key bound to the access token via the cnf.jkt
claim in the access token./userinfo
endpoint using a DPoP-bound access token:
/token
endpoint.htm
as POST
and htu
as the URI).DPoP
HTTP header.jti
and dpop-nonce
****): The jti
claim in the DPoP Proof JWT helps prevent replay attacks for protected resources, such as the /userinfo
endpoint. The Auth0 Authorization Server currently does not check jti
reuse on the /userinfo
endpoint. The Auth0 Authorization Server issues a DPoP-Nonce
HTTP header in its response, which public clients must include as a nonce
claim in subsequent DPoP Proof JWTs for enhanced replay protection.invalid_dpop_proof
or use_dpop_nonce
.IndexedDB
or a mobile app’s secure storage.