Skip to content

Commit

Permalink
fix: use correct "htm" in DPoP Proof via protectedResourceRequest
Browse files Browse the repository at this point in the history
fixes #132
  • Loading branch information
panva committed Sep 3, 2024
1 parent eddc66f commit 3ce3be2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2133,7 +2133,7 @@ export async function protectedResourceRequest(
headers,
options.DPoP,
url,
'GET',
method.toUpperCase(),
getClockSkew({ [clockSkew]: options?.[clockSkew] }),
accessToken,
)
Expand Down
4 changes: 3 additions & 1 deletion tap/end2end-device-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ export default (QUnit: QUnit) => {
t.ok(access_token)
t.equal(token_type, dpop ? 'dpop' : 'bearer')

const verb = ['GET', 'POST', 'PATCH'][Math.floor(Math.random() * 3)]

await lib.protectedResourceRequest(
access_token,
'GET',
verb,
new URL('http://localhost:3001/resource'),
undefined,
undefined,
Expand Down

0 comments on commit 3ce3be2

Please sign in to comment.