Preface
This article describes how to support “RFC 9449: OAuth 2.0 Demonstrating Proof-of-Possession (DPoP) ” with Authlete APIs.This feature is available in Authlete version 2.2 or later.
Instructions
Authorization servers and resource servers support DPoP by following these steps.-
Receiving a request that includes a “DPoP Proof JWT”
- A endpoint (EP) of an authorization server (e.g., Token EP, PAR EP, UserInfo EP) or a resource server receives a request, with “DPoP Proof JWT” as one of HTTP headers, from a client.
-
Extracting DPoP-related information
- The server extracts DPoP-related information (DPoP Proof JWT, HTTP method and HTTP target URI) from the request.
-
Making a request to Authlete’s APIs
- The server make a request, that includes the content of the client’s request and the above DPoP-related information as request parameters, to Authlete APIs (/auth/token, /auth/introspection, etc.)
Example
The following is an example of how to support DPoP in an authorization server’s token EP.
1. Receiving a request that includes a “DPoP Proof JWT”
Let us assume that the authorization server’s token EP receives the following HTTP request. (wrapped for readability)2. Extracting DPoP-related information
The authorization server detects a DPoP header in the request, and extracts HTTP method, HTTP target URI and DPoP Proof JWT. These values are then included in a request to Authlete’s /auth/token API , as htm, htu and dpop respectively. The following table shows the values in this example.| Item | Value | |||
|---|---|---|---|---|
| Method (htm) | POST | |||
| Target URI (htu) | https://as.example.com/token | DPoP Proof JWT (dpop) | text<br />eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IlJTMjU2IiwidHlwIjoiYXQrand0In0.eyJraWQ<br />iOiJvOGpsc1IydXBkcnRjZ280NU5CejFrdDJ6aWg4cHNKV09KUU1lQ3E5OVdGIiwic2lnbm<br />F0dXJlIjoiZ3Z0MmFNRXJsV0RqVk5ST3U1WlA4R2h3dnBJa0tLVTRjN3hwU1ZyT3ciLCJlb<br />mMiOiJBMjU2R0NNIiwia2lkIjoib3A4cTNIaUNPVHQtejBmUE1kanZsV21WN2QwS2FxVG9x<br />cDNlZF9wdHA1USJ9.eyJqdGkiOiItQndDM0VTYzZhY2MybFRjIiwiaHRtIjoiUE9TVCIsIm<br />h0dSI6Imh0dHBzOi8vYXMuZXhhbXBsZS5jb20vdG9rZW4iLCJpYXQiOjE2NzkzMDg3NDN9.<br />VOoyMJVR5RwyOWDGF42Oc_AElsGf6x2ZLW-X Y8g8xXbH7WMdGKeSY0Mm8YIXblviyBCgD0<br />y6oQH07Ds5uEtH0GSO15z5brawJmivrU yiIiaH6UK2GKE42HNHrQ29Ln66cEqbDYxizN4h<br />fu9yqoQgGEw6oRhiQaOLDLyzGEQQRMKB PEz2LwhfsUhSzWPjtyhj2WBobH5WaNCybo6SBI<br />2eGj1Pj97PdREK0luR7rn3AU_N-PtI DFNeXbtYjRcE6NNrfSCWcrkLcuOHuKgPv61-OuqQ<br />0jRbLpkyhTWjxtmjzOuzWspfvg8l n8bOaw_y4VOspvUL5FBGI6P-RXBlBUrKow<br /> |