@absolutejs/auth 0.29.0-beta.5 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4567,6 +4567,20 @@ var hmacSha2562 = async (secret, message) => {
4567
4567
  const signature = await crypto.subtle.sign("HMAC", key, encoder.encode(message));
4568
4568
  return Buffer.from(new Uint8Array(signature)).toString("base64url");
4569
4569
  };
4570
+ var extractDpopNonceClaim = (proof) => {
4571
+ const [, payloadSegment] = proof.split(".");
4572
+ if (payloadSegment === undefined)
4573
+ return;
4574
+ try {
4575
+ const payload = JSON.parse(Buffer.from(payloadSegment, "base64url").toString("utf8"));
4576
+ if (typeof payload !== "object" || payload === null)
4577
+ return;
4578
+ const value = payload.nonce;
4579
+ return typeof value === "string" ? value : undefined;
4580
+ } catch {
4581
+ return;
4582
+ }
4583
+ };
4570
4584
  var mintDpopNonce = async ({
4571
4585
  now = Date.now(),
4572
4586
  secret
@@ -4583,20 +4597,6 @@ var verifyDpopNonce = async ({
4583
4597
  const candidates = await Promise.all(Array.from({ length: NONCE_PREVIOUS_WINDOWS_ACCEPTED + 1 }, (_, offset) => hmacSha2562(secret, String(currentWindow - offset))));
4584
4598
  return candidates.some((expected) => expected === nonce);
4585
4599
  };
4586
- var extractDpopNonceClaim = (proof) => {
4587
- const [, payloadSegment] = proof.split(".");
4588
- if (payloadSegment === undefined)
4589
- return;
4590
- try {
4591
- const payload = JSON.parse(Buffer.from(payloadSegment, "base64url").toString("utf8"));
4592
- if (typeof payload !== "object" || payload === null)
4593
- return;
4594
- const value = payload.nonce;
4595
- return typeof value === "string" ? value : undefined;
4596
- } catch {
4597
- return;
4598
- }
4599
- };
4600
4600
  var decodeHeader = (segment) => JSON.parse(Buffer.from(segment, "base64url").toString("utf8"));
4601
4601
  var normalizeHtu = (value) => {
4602
4602
  try {
@@ -23217,5 +23217,5 @@ export {
23217
23217
  AuthIdentityConflictError
23218
23218
  };
23219
23219
 
23220
- //# debugId=F2D3CF8108FB38D364756E2164756E21
23220
+ //# debugId=7EEC3FFFBF5D362764756E2164756E21
23221
23221
  //# sourceMappingURL=index.js.map