Skip to content

Commit

Permalink
feat: add a helper to DPoPHandle to calculate dpop_jkt
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 18, 2025
1 parent 087f1d9 commit e99a9d9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
17 changes: 17 additions & 0 deletions docs/interfaces/DPoPHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,20 @@ from [getDPoPHandle](../functions/getDPoPHandle.md)
## See

[RFC 9449 - OAuth 2.0 Demonstrating Proof of Possession (DPoP)](https://www.rfc-editor.org/rfc/rfc9449.html)

## Methods

### calculateThumbprint()

**calculateThumbprint**(): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>

Calculates the JWK Thumbprint of the DPoP public key using the SHA-256 hash function for use as
the optional `dpop_jkt` authorization request parameter.

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>

#### See

[RFC 9449 - OAuth 2.0 Demonstrating Proof-of-Possession at the Application Layer (DPoP)](https://www.rfc-editor.org/rfc/rfc9449.html#name-authorization-code-binding-)
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
},
"dependencies": {
"jose": "^5.10.0",
"oauth4webapi": "^3.2.0"
"oauth4webapi": "^3.3.0"
},
"devDependencies": {
"@koa/cors": "^5.0.0",
Expand All @@ -103,7 +103,7 @@
"edge-runtime": "^4.0.1",
"esbuild": "^0.25.0",
"ky": "^1.7.5",
"oidc-provider": "^8.7.0",
"oidc-provider": "^8.8.0",
"patch-package": "^8.0.0",
"prettier": "^3.5.1",
"prettier-plugin-jsdoc": "^1.3.2",
Expand Down

0 comments on commit e99a9d9

Please sign in to comment.