@fruggr/zendesk-mcp-server 3.6.0 → 3.7.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.
@@ -848,11 +848,11 @@ function internalServerErrorResponse(id) {
848
848
  }, { status: 500 });
849
849
  }
850
850
  //#endregion
851
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/buffer_utils.js
851
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/buffer_utils.js
852
852
  const encoder$1 = new TextEncoder();
853
853
  const decoder$2 = new TextDecoder();
854
854
  const strictDecoder = new TextDecoder("utf-8", { fatal: !0 });
855
- const MAX_INT32 = 2 ** 32;
855
+ const UINT32_RANGE = 2 ** 32;
856
856
  function concat(...buffers) {
857
857
  const size = buffers.reduce((acc, { length }) => acc + length, 0), buf = new Uint8Array(size);
858
858
  let i = 0;
@@ -860,7 +860,7 @@ function concat(...buffers) {
860
860
  return buf;
861
861
  }
862
862
  function writeUInt32BE(buf, value, offset) {
863
- if (value < 0 || value >= MAX_INT32) throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);
863
+ if (value < 0 || value >= UINT32_RANGE) throw new RangeError(`value must be >= 0 and <= ${UINT32_RANGE - 1}. Received ${value}`);
864
864
  buf.set([
865
865
  value >>> 24,
866
866
  value >>> 16,
@@ -869,7 +869,7 @@ function writeUInt32BE(buf, value, offset) {
869
869
  ], offset);
870
870
  }
871
871
  function uint64be(value) {
872
- const high = Math.floor(value / MAX_INT32), low = value % MAX_INT32, buf = /* @__PURE__ */ new Uint8Array(8);
872
+ const high = Math.floor(value / UINT32_RANGE), low = value % UINT32_RANGE, buf = /* @__PURE__ */ new Uint8Array(8);
873
873
  return writeUInt32BE(buf, high, 0), writeUInt32BE(buf, low, 4), buf;
874
874
  }
875
875
  function uint32be(value) {
@@ -915,7 +915,7 @@ async function digest(algorithm, data) {
915
915
  return new Uint8Array(await crypto.subtle.digest(subtleDigest, data));
916
916
  }
917
917
  //#endregion
918
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/util/errors.js
918
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/util/errors.js
919
919
  var errors_exports$1 = /* @__PURE__ */ __exportAll({
920
920
  JOSEAlgNotAllowed: () => JOSEAlgNotAllowed,
921
921
  JOSEError: () => JOSEError,
@@ -1033,7 +1033,7 @@ var JWSSignatureVerificationFailed$1 = class extends JOSEError {
1033
1033
  }
1034
1034
  };
1035
1035
  //#endregion
1036
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/util/base64url.js
1036
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/util/base64url.js
1037
1037
  const invalid$2 = "The input to be decoded is not correctly encoded.";
1038
1038
  function decode$2(input) {
1039
1039
  try {
@@ -1046,7 +1046,7 @@ function encode$1(input) {
1046
1046
  return encodeBase64(typeof input == "string" ? encoder$1.encode(input) : input, !0);
1047
1047
  }
1048
1048
  //#endregion
1049
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/validate.js
1049
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/validate.js
1050
1050
  function assertUint8Array(input, label) {
1051
1051
  if (!(input instanceof Uint8Array)) throw new TypeError(`${label} must be an instance of Uint8Array`);
1052
1052
  }
@@ -1069,23 +1069,23 @@ function assertNotSet(value, name) {
1069
1069
  function decodeBase64url(value, label, ErrorClass) {
1070
1070
  try {
1071
1071
  return decode$2(value);
1072
- } catch {
1073
- throw new ErrorClass(`Failed to base64url decode the ${label}`);
1072
+ } catch (cause) {
1073
+ throw new ErrorClass(`Failed to base64url decode the ${label}`, { cause });
1074
1074
  }
1075
1075
  }
1076
- function encodeBase64url(value, label, ErrorClass) {
1076
+ function encodeAsciiMember(value, label, ErrorClass) {
1077
1077
  try {
1078
1078
  return encode$2(value);
1079
- } catch {
1080
- throw new ErrorClass(`The ${label} is not a valid base64url string`);
1079
+ } catch (cause) {
1080
+ throw new ErrorClass(`The ${label} is not a valid base64url string`, { cause });
1081
1081
  }
1082
1082
  }
1083
- function parseJoseHeader(b64, ErrorClass, message) {
1083
+ function parseJoseHeader(encodedProtectedHeader, ErrorClass, message) {
1084
1084
  let parsed;
1085
1085
  try {
1086
- parsed = JSON.parse(strictDecoder.decode(decode$2(b64)));
1087
- } catch {
1088
- throw new ErrorClass(message);
1086
+ parsed = JSON.parse(strictDecoder.decode(decode$2(encodedProtectedHeader)));
1087
+ } catch (cause) {
1088
+ throw new ErrorClass(message, { cause });
1089
1089
  }
1090
1090
  if (!isObject(parsed)) throw new ErrorClass(message);
1091
1091
  return parsed;
@@ -1138,7 +1138,7 @@ function serializeJoseHeader(Err, header) {
1138
1138
  return [parsed, serialized];
1139
1139
  }
1140
1140
  //#endregion
1141
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/key.js
1141
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/key.js
1142
1142
  const tag = (key) => key[Symbol.toStringTag];
1143
1143
  const jwkMatchesOp = (entry, key, usage) => {
1144
1144
  const { alg } = entry;
@@ -1153,12 +1153,12 @@ const jwkMatchesOp = (entry, key, usage) => {
1153
1153
  }
1154
1154
  };
1155
1155
  async function prepareKey(entry, key, usage) {
1156
- const { alg, secret } = entry, privateKey = usage === "decrypt" || usage === "sign";
1156
+ const { alg, secret } = entry, requiresPrivateKey = usage === "decrypt" || usage === "sign";
1157
1157
  if (secret && key instanceof Uint8Array) return key;
1158
1158
  let normalized, keyObject;
1159
1159
  if (isObject(key)) {
1160
1160
  if (normalized = normalizeJwk(key), typeof normalized.kty != "string") throw invalidKeyType(alg, key, secret);
1161
- if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (privateKey ? normalized.kty === "AKP" && typeof normalized.priv == "string" || typeof normalized.d == "string" : normalized.d === void 0 && normalized.priv === void 0))) throw new TypeError(secret ? "JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present" : `JSON Web Key for this operation must be a ${privateKey ? "private" : "public"} JWK`);
1161
+ if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (requiresPrivateKey ? normalized.kty === "AKP" && typeof normalized.priv == "string" || typeof normalized.d == "string" : normalized.d === void 0 && normalized.priv === void 0))) throw new TypeError(secret ? "JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present" : `JSON Web Key for this operation must be a ${requiresPrivateKey ? "private" : "public"} JWK`);
1162
1162
  if (jwkMatchesOp(entry, normalized, usage), normalized.kty === "oct") return decode$2(normalized.k);
1163
1163
  if (!Object.isFrozen(key)) {
1164
1164
  const { key_ops } = key;
@@ -1166,7 +1166,7 @@ async function prepareKey(entry, key, usage) {
1166
1166
  }
1167
1167
  } else {
1168
1168
  if (!isKeyLike(key)) throw invalidKeyType(alg, key, secret);
1169
- const expectedType = secret ? "secret" : privateKey ? "private" : "public";
1169
+ const expectedType = secret ? "secret" : requiresPrivateKey ? "private" : "public";
1170
1170
  if (key.type !== expectedType && (secret || [
1171
1171
  "secret",
1172
1172
  "public",
@@ -1275,7 +1275,7 @@ async function rawKey(key, expected, usage, extractable = !1) {
1275
1275
  return key instanceof Uint8Array && (key = await crypto.subtle.importKey("raw", key, expected, extractable, [usage])), checkCryptoKey(key, expected, usage), key;
1276
1276
  }
1277
1277
  //#endregion
1278
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/content_encryption.js
1278
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/content_encryption.js
1279
1279
  const generateCek = (enc) => crypto.getRandomValues(new Uint8Array(enc.cekBits >> 3));
1280
1280
  function checkCekLength(cek, expected) {
1281
1281
  const actual = cek.byteLength << 3;
@@ -1287,27 +1287,27 @@ function checkIvLength(enc, iv) {
1287
1287
  }
1288
1288
  async function cbcKeySetup(enc, cek, usage) {
1289
1289
  if (!(cek instanceof Uint8Array)) throw new TypeError(invalidKeyInput(cek, "Uint8Array"));
1290
- const keySize = enc.cekBits >> 1;
1290
+ const keyLengthBits = enc.cekBits >> 1;
1291
1291
  return [
1292
- await crypto.subtle.importKey("raw", cek.subarray(keySize >> 3), "AES-CBC", !1, [usage]),
1293
- await crypto.subtle.importKey("raw", cek.subarray(0, keySize >> 3), {
1294
- hash: `SHA-${keySize << 1}`,
1292
+ await crypto.subtle.importKey("raw", cek.subarray(keyLengthBits >> 3), "AES-CBC", !1, [usage]),
1293
+ await crypto.subtle.importKey("raw", cek.subarray(0, keyLengthBits >> 3), {
1294
+ hash: `SHA-${keyLengthBits << 1}`,
1295
1295
  name: "HMAC"
1296
1296
  }, !1, ["sign"]),
1297
- keySize
1297
+ keyLengthBits
1298
1298
  ];
1299
1299
  }
1300
- async function cbcHmacTag(macKey, macData, keySize) {
1301
- return new Uint8Array((await crypto.subtle.sign("HMAC", macKey, macData)).slice(0, keySize >> 3));
1300
+ async function cbcHmacTag(macKey, macData, keyLengthBits) {
1301
+ return new Uint8Array((await crypto.subtle.sign("HMAC", macKey, macData)).slice(0, keyLengthBits >> 3));
1302
1302
  }
1303
1303
  async function cbcEncrypt(enc, plaintext, cek, iv, aad) {
1304
- const [encKey, macKey, keySize] = await cbcKeySetup(enc, cek, "encrypt"), ciphertext = new Uint8Array(await crypto.subtle.encrypt({
1304
+ const [encKey, macKey, keyLengthBits] = await cbcKeySetup(enc, cek, "encrypt"), ciphertext = new Uint8Array(await crypto.subtle.encrypt({
1305
1305
  iv,
1306
1306
  name: "AES-CBC"
1307
1307
  }, encKey, plaintext));
1308
1308
  return {
1309
1309
  ciphertext,
1310
- tag: await cbcHmacTag(macKey, concat(aad, iv, ciphertext, uint64be(aad.length * 8)), keySize),
1310
+ tag: await cbcHmacTag(macKey, concat(aad, iv, ciphertext, uint64be(aad.length * 8)), keyLengthBits),
1311
1311
  iv
1312
1312
  };
1313
1313
  }
@@ -1319,7 +1319,7 @@ async function timingSafeEqual$1(a, b) {
1319
1319
  return crypto.subtle.verify(algorithm, key, aHmac, b);
1320
1320
  }
1321
1321
  async function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
1322
- const [encKey, macKey, keySize] = await cbcKeySetup(enc, cek, "decrypt"), expectedTag = await cbcHmacTag(macKey, concat(aad, iv, ciphertext, uint64be(aad.length * 8)), keySize);
1322
+ const [encKey, macKey, keyLengthBits] = await cbcKeySetup(enc, cek, "decrypt"), expectedTag = await cbcHmacTag(macKey, concat(aad, iv, ciphertext, uint64be(aad.length * 8)), keyLengthBits);
1323
1323
  try {
1324
1324
  if (await timingSafeEqual$1(tag, expectedTag)) return new Uint8Array(await crypto.subtle.decrypt({
1325
1325
  iv,
@@ -1362,7 +1362,7 @@ async function decrypt$1(enc, cek, ciphertext, iv, tag, aad) {
1362
1362
  }
1363
1363
  }
1364
1364
  //#endregion
1365
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/key_descriptor.js
1365
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/key_descriptor.js
1366
1366
  function table(entries) {
1367
1367
  const out = { __proto__: null };
1368
1368
  for (const alg in entries) out[alg] = {
@@ -1372,7 +1372,7 @@ function table(entries) {
1372
1372
  return out;
1373
1373
  }
1374
1374
  //#endregion
1375
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jwe_algorithms.js
1375
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/jwe_algorithms.js
1376
1376
  const wrap = [["encrypt", "wrapKey"], ["decrypt", "unwrapKey"]];
1377
1377
  const derive$1 = [[], ["deriveBits"]];
1378
1378
  const none = [[], []];
@@ -1492,7 +1492,7 @@ function jweEncryption(enc) {
1492
1492
  return (typeof enc == "string" ? ENC[enc] : void 0) ?? unsupported$1("enc", "Encryption Algorithm");
1493
1493
  }
1494
1494
  //#endregion
1495
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/key_management.js
1495
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/key_management.js
1496
1496
  function checkEcdhCryptoKey(key, usage) {
1497
1497
  if (key.algorithm.name !== "ECDH" && key.algorithm.name !== "X25519") throw new TypeError("CryptoKey does not support this operation, its algorithm.name must be ECDH or X25519");
1498
1498
  checkUsage(key, usage);
@@ -1517,32 +1517,32 @@ function checkRsaKey(alg, key, usage) {
1517
1517
  async function deriveKey(p2s, alg, p2c, key) {
1518
1518
  if (!(p2s instanceof Uint8Array) || p2s.length < 8) throw new JWEInvalid("PBES2 Salt Input must be 8 or more octets");
1519
1519
  if (!Number.isSafeInteger(p2c) || Math.sign(p2c) !== 1) throw new JWEInvalid("PBES2 Count Input must be a positive integer");
1520
- const salt = concat(encode$2(alg), Uint8Array.of(0), p2s), keylen = parseInt(alg.slice(13, 16), 10), subtleAlg = {
1520
+ const salt = concat(encode$2(alg), Uint8Array.of(0), p2s), keyLengthBits = parseInt(alg.slice(13, 16), 10), subtleAlg = {
1521
1521
  hash: `SHA-${alg.slice(8, 11)}`,
1522
1522
  iterations: p2c,
1523
1523
  name: "PBKDF2",
1524
1524
  salt
1525
1525
  }, cryptoKey = await rawKey(key, jweAlgorithm(alg).subtle, "deriveBits");
1526
- return new Uint8Array(await crypto.subtle.deriveBits(subtleAlg, cryptoKey, keylen));
1526
+ return new Uint8Array(await crypto.subtle.deriveBits(subtleAlg, cryptoKey, keyLengthBits));
1527
1527
  }
1528
1528
  function lengthAndInput(input) {
1529
1529
  return concat(uint32be(input.length), input);
1530
1530
  }
1531
- async function concatKdf(Z, L, OtherInfo) {
1532
- const dkLen = L >> 3, hashLen = 32, reps = Math.ceil(dkLen / hashLen), dk = new Uint8Array(reps * hashLen);
1531
+ async function concatKdf(Z, keyDataLength, OtherInfo) {
1532
+ const dkLen = keyDataLength >> 3, hashLen = 32, reps = Math.ceil(dkLen / hashLen), dk = new Uint8Array(reps * hashLen);
1533
1533
  for (let i = 1; i <= reps; i++) {
1534
1534
  const hashResult = await digest("sha256", concat(uint32be(i), Z, OtherInfo));
1535
1535
  dk.set(hashResult, (i - 1) * hashLen);
1536
1536
  }
1537
1537
  return dk.slice(0, dkLen);
1538
1538
  }
1539
- async function ecdhesDeriveKey(publicKey, privateKey, algorithm, keyLength, apu = /* @__PURE__ */ new Uint8Array(), apv = /* @__PURE__ */ new Uint8Array()) {
1539
+ async function ecdhesDeriveKey(publicKey, privateKey, algorithmId, keyDataLength, apu = /* @__PURE__ */ new Uint8Array(), apv = /* @__PURE__ */ new Uint8Array()) {
1540
1540
  checkEcdhCryptoKey(publicKey), checkEcdhCryptoKey(privateKey, "deriveBits");
1541
- const otherInfo = concat(lengthAndInput(encode$2(algorithm)), lengthAndInput(apu), lengthAndInput(apv), uint32be(keyLength));
1541
+ const otherInfo = concat(lengthAndInput(encode$2(algorithmId)), lengthAndInput(apu), lengthAndInput(apv), uint32be(keyDataLength));
1542
1542
  return concatKdf(new Uint8Array(await crypto.subtle.deriveBits({
1543
1543
  name: publicKey.algorithm.name,
1544
1544
  public: publicKey
1545
- }, privateKey, publicKey.algorithm.name === "X25519" ? 256 : Math.ceil(parseInt(publicKey.algorithm.namedCurve.slice(-3), 10) / 8) << 3)), keyLength, otherInfo);
1545
+ }, privateKey, publicKey.algorithm.name === "X25519" ? 256 : Math.ceil(parseInt(publicKey.algorithm.namedCurve.slice(-3), 10) / 8) << 3)), keyDataLength, otherInfo);
1546
1546
  }
1547
1547
  function assertEcdhKey(key) {
1548
1548
  assertCryptoKey(key);
@@ -1592,9 +1592,9 @@ async function decryptKeyManagement(entry, enc, key, encryptedKey, joseHeader, m
1592
1592
  assertEcdhKey(key);
1593
1593
  const ephemeralPublicKey = await jwkToKey(entry, epk), partyUInfo = partyInfo(joseHeader, "apu"), partyVInfo = partyInfo(joseHeader, "apv");
1594
1594
  checkPartyInfo(partyUInfo, partyVInfo);
1595
- const sharedSecret = await ecdhesDeriveKey(ephemeralPublicKey, key, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);
1596
- if (direct) return sharedSecret;
1597
- key = sharedSecret;
1595
+ const derivedKey = await ecdhesDeriveKey(ephemeralPublicKey, key, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);
1596
+ if (direct) return derivedKey;
1597
+ key = derivedKey;
1598
1598
  break;
1599
1599
  }
1600
1600
  case "RSA-OAEP": return assertCryptoKey(key), checkRsaKey(alg, key, "decrypt"), new Uint8Array(await crypto.subtle.decrypt("RSA-OAEP", key, encryptedKey));
@@ -1637,25 +1637,25 @@ async function encryptKeyManagement(entry, enc, inputKey, joseHeader, providedCe
1637
1637
  providedApu !== void 0 && assertUint8Array(providedApu, "\"apu\""), providedApv !== void 0 && assertUint8Array(providedApv, "\"apv\"");
1638
1638
  const apu = providedApu ?? partyInfo(joseHeader, "apu"), apv = providedApv ?? partyInfo(joseHeader, "apv");
1639
1639
  checkPartyInfo(apu, apv);
1640
- let ephemeralKey;
1641
- providedParameters.epk !== void 0 ? ephemeralKey = await prepareKey(entry, providedParameters.epk, "decrypt") : ephemeralKey = (await crypto.subtle.generateKey(key.algorithm, !0, ["deriveBits"])).privateKey;
1640
+ let ephemeralPrivateKey;
1641
+ providedParameters.epk !== void 0 ? ephemeralPrivateKey = await prepareKey(entry, providedParameters.epk, "decrypt") : ephemeralPrivateKey = (await crypto.subtle.generateKey(key.algorithm, !0, ["deriveBits"])).privateKey;
1642
1642
  const subtle = crypto.subtle;
1643
- let exportableEpk = ephemeralKey;
1643
+ let exportableEpk = ephemeralPrivateKey;
1644
1644
  if (!exportableEpk.extractable) {
1645
1645
  if (typeof subtle.getPublicKey != "function") throw new TypeError("CryptoKey for \"epk\" must be extractable");
1646
- exportableEpk = await subtle.getPublicKey(ephemeralKey, []);
1646
+ exportableEpk = await subtle.getPublicKey(ephemeralPrivateKey, []);
1647
1647
  }
1648
- const { x, y, crv, kty } = await subtle.exportKey("jwk", exportableEpk), direct = mode === "direct-key-agreement", sharedSecret = await ecdhesDeriveKey(key, ephemeralKey, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), apu, apv), epk = {
1648
+ const { x, y, crv, kty } = await subtle.exportKey("jwk", exportableEpk), direct = mode === "direct-key-agreement", derivedKey = await ecdhesDeriveKey(key, ephemeralPrivateKey, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), apu, apv), epk = {
1649
1649
  x,
1650
1650
  crv,
1651
1651
  kty
1652
1652
  };
1653
1653
  if (kty === "EC" && (epk.y = y), parameters = { epk }, providedApu !== void 0 && (parameters.apu = encode$1(providedApu)), providedApv !== void 0 && (parameters.apv = encode$1(providedApv)), direct) return [
1654
- sharedSecret,
1654
+ derivedKey,
1655
1655
  void 0,
1656
1656
  parameters
1657
1657
  ];
1658
- key = sharedSecret;
1658
+ key = derivedKey;
1659
1659
  break;
1660
1660
  }
1661
1661
  case "RSA-OAEP":
@@ -1687,7 +1687,7 @@ async function encryptKeyManagement(entry, enc, inputKey, joseHeader, providedCe
1687
1687
  ];
1688
1688
  }
1689
1689
  //#endregion
1690
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/deflate.js
1690
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/deflate.js
1691
1691
  function validateZip(joseHeader, protectedHeader) {
1692
1692
  if (joseHeader.zip !== void 0 && joseHeader.zip !== "DEF") throw new JOSENotSupported("Unsupported JWE \"zip\" (Compression Algorithm) Header Parameter value.");
1693
1693
  if (joseHeader.zip !== void 0 && !protectedHeader?.zip) throw new JWEInvalid("JWE \"zip\" (Compression Algorithm) Header Parameter MUST be in a protected header.");
@@ -1715,16 +1715,16 @@ async function decompress(input, maxLength) {
1715
1715
  return supported("DecompressionStream"), transform(new DecompressionStream("deflate-raw"), input, maxLength);
1716
1716
  }
1717
1717
  //#endregion
1718
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jwe_decrypt.js
1718
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/jwe_decrypt.js
1719
1719
  function shareJWE(jwe) {
1720
1720
  const { protected: encodedProtected, ciphertext, iv, tag, aad } = jwe;
1721
- let parsedProt;
1722
- return encodedProtected !== void 0 && (parsedProt = parseJoseHeader(encodedProtected, JWEInvalid, "JWE Protected Header is invalid")), [
1723
- parsedProt,
1721
+ let protectedHeader;
1722
+ return encodedProtected !== void 0 && (protectedHeader = parseJoseHeader(encodedProtected, JWEInvalid, "JWE Protected Header is invalid")), [
1723
+ protectedHeader,
1724
1724
  decodeBase64url(ciphertext, "ciphertext", JWEInvalid),
1725
1725
  iv !== void 0 ? decodeBase64url(iv, "iv", JWEInvalid) : void 0,
1726
1726
  tag !== void 0 ? decodeBase64url(tag, "tag", JWEInvalid) : void 0,
1727
- encodeBase64url((encodedProtected ?? "") + (aad !== void 0 ? `.${aad}` : ""), "aad", JWEInvalid)
1727
+ encodeAsciiMember((encodedProtected ?? "") + (aad !== void 0 ? `.${aad}` : ""), "aad", JWEInvalid)
1728
1728
  ];
1729
1729
  }
1730
1730
  function prepareDecrypt(options) {
@@ -1737,18 +1737,18 @@ function prepareDecrypt(options) {
1737
1737
  ];
1738
1738
  }
1739
1739
  async function decryptJWE(jwe, shared, key, token = shareJWE(jwe)) {
1740
- const [parsedProt, ciphertext, iv, tag, additionalData] = token, { header, unprotected, aad } = jwe;
1740
+ const [protectedHeader, ciphertext, iv, tag, additionalAuthenticatedData] = token, { header, unprotected, aad } = jwe;
1741
1741
  let joseHeader;
1742
1742
  if (header !== void 0 || unprotected !== void 0) {
1743
- if (!isDisjoint(parsedProt, header, unprotected)) throw new JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");
1743
+ if (!isDisjoint(protectedHeader, header, unprotected)) throw new JWEInvalid("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");
1744
1744
  joseHeader = {
1745
- ...parsedProt,
1745
+ ...protectedHeader,
1746
1746
  ...header,
1747
1747
  ...unprotected
1748
1748
  };
1749
- } else joseHeader = parsedProt ?? {};
1749
+ } else joseHeader = protectedHeader ?? {};
1750
1750
  const [keyManagementAlgorithms, contentEncryptionAlgorithms, crit, maxPBES2Count, maxDecompressedLength] = shared, { encrypted_key: encodedKey } = jwe;
1751
- validateCrit(JWEInvalid, JWE_RECOGNIZED, crit, parsedProt, joseHeader), validateZip(joseHeader, parsedProt);
1751
+ validateCrit(JWEInvalid, JWE_RECOGNIZED, crit, protectedHeader, joseHeader), validateZip(joseHeader, protectedHeader);
1752
1752
  const { alg, enc } = joseHeader;
1753
1753
  if (typeof alg != "string" || !alg) throw new JWEInvalid("missing JWE Algorithm (alg) in JWE Header");
1754
1754
  const selected = JWE[alg];
@@ -1773,12 +1773,12 @@ async function decryptJWE(jwe, shared, key, token = shareJWE(jwe)) {
1773
1773
  encryptedKey = /* @__PURE__ */ new Uint8Array();
1774
1774
  }
1775
1775
  let resolvedKey = !1;
1776
- typeof key == "function" && (key = await key(parsedProt, jwe), resolvedKey = !0);
1776
+ typeof key == "function" && (key = await key(protectedHeader, jwe), resolvedKey = !0);
1777
1777
  const algEntry = selected ?? jweAlgorithm(alg);
1778
1778
  isJWECEKTransport(algEntry) && encryptedKey === void 0 && (encryptedKey = /* @__PURE__ */ new Uint8Array());
1779
1779
  const k = await prepareKey(algEntry.mode === "direct-encryption" ? encEntry : algEntry, key, "decrypt");
1780
1780
  let plaintext;
1781
- if (algEntry.mode === "integrated-encryption") plaintext = await algEntry.decrypt(k, encryptedKey, ciphertext, additionalData, parsedProt, joseHeader);
1781
+ if (algEntry.mode === "integrated-encryption") plaintext = await algEntry.decrypt(k, encryptedKey, ciphertext, additionalAuthenticatedData, protectedHeader, joseHeader);
1782
1782
  else {
1783
1783
  const encryption = encEntry;
1784
1784
  let cek;
@@ -1788,7 +1788,7 @@ async function decryptJWE(jwe, shared, key, token = shareJWE(jwe)) {
1788
1788
  if (err instanceof TypeError || err instanceof JWEInvalid || err instanceof JOSENotSupported) throw err;
1789
1789
  cek = generateCek(encryption);
1790
1790
  }
1791
- plaintext = await decrypt$1(encryption, cek, ciphertext, iv, tag, additionalData);
1791
+ plaintext = await decrypt$1(encryption, cek, ciphertext, iv, tag, additionalAuthenticatedData);
1792
1792
  }
1793
1793
  if (joseHeader.zip === "DEF") {
1794
1794
  const decompressionLimit = maxDecompressedLength ?? 25e4;
@@ -1800,7 +1800,7 @@ async function decryptJWE(jwe, shared, key, token = shareJWE(jwe)) {
1800
1800
  }
1801
1801
  return {
1802
1802
  plaintext,
1803
- ...parsedProt && { protectedHeader: parsedProt },
1803
+ ...protectedHeader && { protectedHeader },
1804
1804
  ...aad !== void 0 && { additionalAuthenticatedData: decodeBase64url(aad, "aad", JWEInvalid) },
1805
1805
  ...unprotected && { sharedUnprotectedHeader: unprotected },
1806
1806
  ...header && { unprotectedHeader: header },
@@ -1820,12 +1820,12 @@ async function decryptCompact(jwe, shared, key) {
1820
1820
  }, shared, key);
1821
1821
  }
1822
1822
  //#endregion
1823
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwe/compact/decrypt.js
1823
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jwe/compact/decrypt.js
1824
1824
  async function compactDecrypt(jwe, key, options) {
1825
1825
  return decryptCompact(jwe, prepareDecrypt(options), key);
1826
1826
  }
1827
1827
  //#endregion
1828
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jwe_encrypt.js
1828
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/jwe_encrypt.js
1829
1829
  function checkDisjoint(protectedHeader, unprotectedHeader, sharedUnprotectedHeader) {
1830
1830
  if (!isDisjoint(protectedHeader, unprotectedHeader, sharedUnprotectedHeader)) throw new JWEInvalid("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");
1831
1831
  }
@@ -1873,15 +1873,15 @@ async function encryptJWE(input, checked, key) {
1873
1873
  ...protectedHeader,
1874
1874
  ...parameters
1875
1875
  } : parameters, checkDisjoint(protectedHeader, unprotectedHeader, sharedUnprotectedHeader));
1876
- const protectedHeaderS = protectedHeader ? encode$1(JSON.stringify(protectedHeader)) : "", aadMember = aad?.byteLength ? encode$1(aad) : void 0, additionalData = encode$2(aadMember ? `${protectedHeaderS}.${aadMember}` : protectedHeaderS);
1876
+ const encodedProtectedHeader = protectedHeader ? encode$1(JSON.stringify(protectedHeader)) : "", encodedAad = aad?.byteLength ? encode$1(aad) : void 0, additionalAuthenticatedData = encode$2(encodedAad ? `${encodedProtectedHeader}.${encodedAad}` : encodedProtectedHeader);
1877
1877
  let plaintext = inputPlaintext;
1878
1878
  joseHeader.zip === "DEF" && (plaintext = await compress(plaintext).catch((cause) => {
1879
1879
  throw new JWEInvalid("Failed to compress plaintext", { cause });
1880
1880
  }));
1881
1881
  let ciphertext, tag, iv;
1882
- algEntry.mode === "integrated-encryption" ? [encryptedKey, ciphertext] = await algEntry.encrypt(cek, plaintext, additionalData, protectedHeader, joseHeader, keyManagementParameters) : {ciphertext, tag, iv} = await encrypt$1(encEntry, plaintext, cek, inputIv, additionalData);
1882
+ algEntry.mode === "integrated-encryption" ? [encryptedKey, ciphertext] = await algEntry.encrypt(cek, plaintext, additionalAuthenticatedData, protectedHeader, joseHeader, keyManagementParameters) : {ciphertext, tag, iv} = await encrypt$1(encEntry, plaintext, cek, inputIv, additionalAuthenticatedData);
1883
1883
  const jwe = { ciphertext: encode$1(ciphertext) };
1884
- return iv && (jwe.iv = encode$1(iv)), tag && (jwe.tag = encode$1(tag)), encryptedKey?.byteLength && (jwe.encrypted_key = encode$1(encryptedKey)), aadMember && (jwe.aad = aadMember), protectedHeader && (jwe.protected = protectedHeaderS), sharedUnprotectedHeader && (jwe.unprotected = sharedUnprotectedHeader), unprotectedHeader && (jwe.header = unprotectedHeader), jwe;
1884
+ return iv && (jwe.iv = encode$1(iv)), tag && (jwe.tag = encode$1(tag)), encryptedKey?.byteLength && (jwe.encrypted_key = encode$1(encryptedKey)), encodedAad && (jwe.aad = encodedAad), protectedHeader && (jwe.protected = encodedProtectedHeader), sharedUnprotectedHeader && (jwe.unprotected = sharedUnprotectedHeader), unprotectedHeader && (jwe.header = unprotectedHeader), jwe;
1885
1885
  }
1886
1886
  async function createJWE(input, key, options) {
1887
1887
  return encryptJWE(input, checkEncryptHeaders(input, options), key);
@@ -1896,7 +1896,7 @@ function compactJWE(jwe) {
1896
1896
  ].join(".");
1897
1897
  }
1898
1898
  //#endregion
1899
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jws_algorithms.js
1899
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/jws_algorithms.js
1900
1900
  const sig = [["verify"], ["sign"]];
1901
1901
  function hmac(bits) {
1902
1902
  const subtle = {
@@ -1952,8 +1952,8 @@ function eddsa() {
1952
1952
  usages: sig
1953
1953
  };
1954
1954
  }
1955
- function mldsa(bits) {
1956
- const subtle = { name: `ML-DSA-${bits}` };
1955
+ function mldsa(parameterSet) {
1956
+ const subtle = { name: `ML-DSA-${parameterSet}` };
1957
1957
  return {
1958
1958
  kty: ["AKP"],
1959
1959
  subtle,
@@ -1986,27 +1986,27 @@ function jwsAlgorithm(alg) {
1986
1986
  return entry;
1987
1987
  }
1988
1988
  //#endregion
1989
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jws_verify.js
1989
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/jws_verify.js
1990
1990
  function prepareVerify(options) {
1991
1991
  return [options && validateAlgorithms("algorithms", options.algorithms), options?.crit];
1992
1992
  }
1993
- function parseProtectedHeader(encodedProtected) {
1994
- return encodedProtected === void 0 ? {} : parseJoseHeader(encodedProtected, JWSInvalid, "JWS Protected Header is invalid");
1993
+ function parseProtectedHeader(encodedProtectedHeader) {
1994
+ return encodedProtectedHeader === void 0 ? {} : parseJoseHeader(encodedProtectedHeader, JWSInvalid, "JWS Protected Header is invalid");
1995
1995
  }
1996
1996
  function encodeCompactUnencodedPayload(payload) {
1997
1997
  try {
1998
1998
  return encode$2(payload);
1999
- } catch {
2000
- throw new JWSInvalid("JWS Compact Serialization payload must use only ASCII characters");
1999
+ } catch (cause) {
2000
+ throw new JWSInvalid("JWS Compact Serialization payload must use only ASCII characters", { cause });
2001
2001
  }
2002
2002
  }
2003
2003
  async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedProtected) {
2004
- const { protected: encodedProtected, header, payload: inputPayload } = jws, parsedProt = parsedProtected ?? parseProtectedHeader(encodedProtected);
2005
- if (!isDisjoint(parsedProt, header)) throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
2004
+ const { protected: encodedProtectedHeader, header, payload: inputPayload } = jws, protectedHeader = parsedProtected ?? parseProtectedHeader(encodedProtectedHeader);
2005
+ if (!isDisjoint(protectedHeader, header)) throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
2006
2006
  const joseHeader = {
2007
- ...parsedProt,
2007
+ ...protectedHeader,
2008
2008
  ...header
2009
- }, b64 = validateB64(parsedProt, validateCrit(JWSInvalid, JWS_RECOGNIZED, shared[1], parsedProt, joseHeader)), { alg } = joseHeader;
2009
+ }, b64 = validateB64(protectedHeader, validateCrit(JWSInvalid, JWS_RECOGNIZED, shared[1], protectedHeader, joseHeader)), { alg } = joseHeader;
2010
2010
  if (typeof alg != "string" || !alg) throw new JWSInvalid("JWS \"alg\" (Algorithm) Header Parameter missing or invalid");
2011
2011
  if (shared[0] && !shared[0].has(alg)) throw new JOSEAlgNotAllowed("\"alg\" (Algorithm) Header Parameter value not allowed");
2012
2012
  if (b64) {
@@ -2014,18 +2014,20 @@ async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedP
2014
2014
  } else if (typeof inputPayload != "string" && !(inputPayload instanceof Uint8Array)) throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");
2015
2015
  const signingPayload = b64 || typeof inputPayload != "string" ? inputPayload : encodeUnencodedPayload(inputPayload);
2016
2016
  let resolvedKey = !1;
2017
- typeof key == "function" && (key = await key(parsedProt, jws), resolvedKey = !0);
2018
- const entry = jwsAlgorithm(alg), data = concat(encodedProtected !== void 0 ? encode$2(encodedProtected) : /* @__PURE__ */ new Uint8Array(), encode$2("."), typeof signingPayload == "string" ? shared[2] ??= encodeBase64url(signingPayload, "payload", JWSInvalid) : signingPayload), signature = decodeBase64url(jws.signature, "signature", JWSInvalid), k = await prepareKey(entry, key, "verify"), cryptoKey = await rawKey(k, entry.subtle, "verify");
2017
+ typeof key == "function" && (key = await key(protectedHeader, jws), resolvedKey = !0);
2018
+ const entry = jwsAlgorithm(alg), signingInput = concat(encodedProtectedHeader !== void 0 ? encode$2(encodedProtectedHeader) : /* @__PURE__ */ new Uint8Array(), encode$2("."), typeof signingPayload == "string" ? shared[2] ??= encodeAsciiMember(signingPayload, "payload", JWSInvalid) : signingPayload), signature = decodeBase64url(jws.signature, "signature", JWSInvalid), verificationKey = await prepareKey(entry, key, "verify"), cryptoKey = await rawKey(verificationKey, entry.subtle, "verify");
2019
2019
  entry.minRsaBits && checkModulusLength(entry.alg, cryptoKey);
2020
2020
  let verified = !1;
2021
2021
  try {
2022
- verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature, data);
2023
- } catch {}
2022
+ verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature, signingInput);
2023
+ } catch (cause) {
2024
+ throw new JWSSignatureVerificationFailed$1(void 0, { cause });
2025
+ }
2024
2026
  if (!verified) throw new JWSSignatureVerificationFailed$1();
2025
2027
  const result = { payload: typeof signingPayload == "string" ? decodeBase64url(signingPayload, "payload", JWSInvalid) : signingPayload };
2026
- return encodedProtected !== void 0 && (result.protectedHeader = parsedProt), header !== void 0 && (result.unprotectedHeader = header), resolvedKey ? [{
2028
+ return encodedProtectedHeader !== void 0 && (result.protectedHeader = protectedHeader), header !== void 0 && (result.unprotectedHeader = header), resolvedKey ? [{
2027
2029
  ...result,
2028
- key: k
2030
+ key: verificationKey
2029
2031
  }, b64] : [result, b64];
2030
2032
  }
2031
2033
  async function verifyCompact(jws, shared, key) {
@@ -2039,13 +2041,13 @@ async function verifyCompact(jws, shared, key) {
2039
2041
  }, shared, key, encodeCompactUnencodedPayload);
2040
2042
  }
2041
2043
  //#endregion
2042
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jws/compact/verify.js
2044
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jws/compact/verify.js
2043
2045
  async function compactVerify(jws, key, options) {
2044
2046
  const [result] = await verifyCompact(jws, prepareVerify(options), key);
2045
2047
  return result;
2046
2048
  }
2047
2049
  //#endregion
2048
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
2050
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
2049
2051
  const epoch = (date) => Math.floor(date.getTime() / 1e3);
2050
2052
  const multipliers = {
2051
2053
  s: 1,
@@ -2064,8 +2066,8 @@ function secs(str) {
2064
2066
  typeof str != "string" && invalidDuration();
2065
2067
  const matched = REGEX.exec(str);
2066
2068
  (!matched || matched[4] && matched[1]) && invalidDuration();
2067
- const value = parseFloat(matched[2]), numericDate2 = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
2068
- return Number.isFinite(numericDate2) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -numericDate2 : numericDate2;
2069
+ const value = parseFloat(matched[2]), durationSeconds = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
2070
+ return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -durationSeconds : durationSeconds;
2069
2071
  }
2070
2072
  function validateInput(label, input) {
2071
2073
  if (!Number.isFinite(input)) throw new TypeError(`Invalid ${label} input`);
@@ -2085,28 +2087,30 @@ const normalizeTyp = (value) => {
2085
2087
  return value.includes("/") ? normalized : `application/${normalized}`;
2086
2088
  };
2087
2089
  const checkAudiencePresence = (audPayload, audOption) => typeof audPayload == "string" ? audOption.includes(audPayload) : Array.isArray(audPayload) ? audOption.some((aud) => audPayload.includes(aud)) : !1;
2088
- function validateNumericDate(payload, claim, required = !1) {
2089
- const value = payload[claim];
2090
+ function validateNumericDate(claimsSet, claim, required = !1) {
2091
+ const value = claimsSet[claim];
2090
2092
  if (!(value === void 0 && !required)) {
2091
- if (typeof value != "number") throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`, payload, claim, "invalid");
2093
+ if (typeof value != "number") throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`, claimsSet, claim, "invalid");
2092
2094
  return value;
2093
2095
  }
2094
2096
  }
2095
- function unexpectedClaim(payload, claim) {
2096
- throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`, payload, claim, checkFailed);
2097
+ function unexpectedClaim(claimsSet, claim) {
2098
+ throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`, claimsSet, claim, checkFailed);
2097
2099
  }
2098
- function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
2099
- let payload;
2100
+ function validateClaimsSet(protectedHeader, claimsSetBytes, options = {}) {
2101
+ let claimsSet;
2100
2102
  try {
2101
- payload = JSON.parse(strictDecoder.decode(encodedPayload));
2102
- } catch {}
2103
- if (!isObject(payload)) throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
2103
+ claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));
2104
+ } catch (cause) {
2105
+ throw new JWTInvalid("JWT Claims Set must be a top-level JSON object", { cause });
2106
+ }
2107
+ if (!isObject(claimsSet)) throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
2104
2108
  const { typ } = options;
2105
- if (typ !== void 0 && (typeof protectedHeader.typ != "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) throw new JWTClaimValidationFailed("unexpected \"typ\" JWT header value", payload, "typ", checkFailed);
2109
+ if (typ !== void 0 && (typeof protectedHeader.typ != "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) throw new JWTClaimValidationFailed("unexpected \"typ\" JWT header value", claimsSet, "typ", checkFailed);
2106
2110
  const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options, presenceCheck = [...requiredClaims];
2107
2111
  maxTokenAge !== void 0 && presenceCheck.push("iat"), audience !== void 0 && presenceCheck.push("aud"), subject !== void 0 && presenceCheck.push("sub"), issuer !== void 0 && presenceCheck.push("iss");
2108
- for (const claim of new Set(presenceCheck.reverse())) if (!Object.hasOwn(payload, claim)) throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, "missing");
2109
- issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss) && unexpectedClaim(payload, "iss"), subject !== void 0 && payload.sub !== subject && unexpectedClaim(payload, "sub"), audience !== void 0 && !checkAudiencePresence(payload.aud, typeof audience == "string" ? [audience] : audience) && unexpectedClaim(payload, "aud");
2112
+ for (const claim of new Set(presenceCheck.reverse())) if (!Object.hasOwn(claimsSet, claim)) throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, claimsSet, claim, "missing");
2113
+ issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(claimsSet.iss) && unexpectedClaim(claimsSet, "iss"), subject !== void 0 && claimsSet.sub !== subject && unexpectedClaim(claimsSet, "sub"), audience !== void 0 && !checkAudiencePresence(claimsSet.aud, typeof audience == "string" ? [audience] : audience) && unexpectedClaim(claimsSet, "aud");
2110
2114
  const { clockTolerance } = options;
2111
2115
  let tolerance = 0;
2112
2116
  if (typeof clockTolerance == "string") tolerance = secs(clockTolerance);
@@ -2115,63 +2119,63 @@ function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
2115
2119
  tolerance = clockTolerance;
2116
2120
  }
2117
2121
  validateInput("clockTolerance option", tolerance);
2118
- const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(payload, "iat", maxTokenAge !== void 0), nbf = validateNumericDate(payload, "nbf");
2119
- if (nbf !== void 0 && nbf > now + tolerance) throw new JWTClaimValidationFailed("\"nbf\" claim timestamp check failed", payload, "nbf", checkFailed);
2120
- const exp = validateNumericDate(payload, "exp");
2121
- if (exp !== void 0 && exp <= now - tolerance) throw new JWTExpired("\"exp\" claim timestamp check failed", payload, "exp", checkFailed);
2122
+ const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(claimsSet, "iat", maxTokenAge !== void 0), nbf = validateNumericDate(claimsSet, "nbf");
2123
+ if (nbf !== void 0 && nbf > now + tolerance) throw new JWTClaimValidationFailed("\"nbf\" claim timestamp check failed", claimsSet, "nbf", checkFailed);
2124
+ const exp = validateNumericDate(claimsSet, "exp");
2125
+ if (exp !== void 0 && exp <= now - tolerance) throw new JWTExpired("\"exp\" claim timestamp check failed", claimsSet, "exp", checkFailed);
2122
2126
  if (maxTokenAge !== void 0) {
2123
2127
  const age = now - iat, max = validateInput("maxTokenAge option", typeof maxTokenAge == "number" ? maxTokenAge : secs(maxTokenAge));
2124
- if (age - tolerance > max) throw new JWTExpired("\"iat\" claim timestamp check failed (too far in the past)", payload, "iat", checkFailed);
2125
- if (age < -tolerance) throw new JWTClaimValidationFailed("\"iat\" claim timestamp check failed (it should be in the past)", payload, "iat", checkFailed);
2128
+ if (age - tolerance > max) throw new JWTExpired("\"iat\" claim timestamp check failed (too far in the past)", claimsSet, "iat", checkFailed);
2129
+ if (age < -tolerance) throw new JWTClaimValidationFailed("\"iat\" claim timestamp check failed (it should be in the past)", claimsSet, "iat", checkFailed);
2126
2130
  }
2127
- return payload;
2131
+ return claimsSet;
2128
2132
  }
2129
- let producerPayloads;
2130
- function producerPayload(producer) {
2131
- return producerPayloads.get(producer);
2133
+ let producerClaimsSets;
2134
+ function producerClaimsSet(producer) {
2135
+ return producerClaimsSets.get(producer);
2132
2136
  }
2133
- function jwtData(producer) {
2134
- const payload = producerPayload(producer);
2137
+ function jwtClaimsSetBytes(producer) {
2138
+ const claimsSet = producerClaimsSet(producer);
2135
2139
  for (const claim of [
2136
2140
  "iat",
2137
2141
  "nbf",
2138
2142
  "exp"
2139
2143
  ]) {
2140
- const value = payload[claim];
2144
+ const value = claimsSet[claim];
2141
2145
  if (typeof value == "number" && !Number.isFinite(value)) throw new TypeError(`"${claim}" claim must be a finite number`);
2142
2146
  }
2143
- return encoder$1.encode(JSON.stringify(payload));
2147
+ return encoder$1.encode(JSON.stringify(claimsSet));
2144
2148
  }
2145
2149
  var JWTClaimsBuilder = class {
2146
- constructor(payload = {}) {
2147
- if (!isObject(payload)) throw new TypeError("JWT Claims Set MUST be an object");
2148
- (producerPayloads ||= /* @__PURE__ */ new WeakMap()).set(this, structuredClone(payload));
2150
+ constructor(claimsSet = {}) {
2151
+ if (!isObject(claimsSet)) throw new TypeError("JWT Claims Set MUST be an object");
2152
+ (producerClaimsSets ||= /* @__PURE__ */ new WeakMap()).set(this, structuredClone(claimsSet));
2149
2153
  }
2150
2154
  setIssuer(value) {
2151
- return validateStringClaim("iss", value), producerPayload(this).iss = value, this;
2155
+ return validateStringClaim("iss", value), producerClaimsSet(this).iss = value, this;
2152
2156
  }
2153
2157
  setSubject(value) {
2154
- return validateStringClaim("sub", value), producerPayload(this).sub = value, this;
2158
+ return validateStringClaim("sub", value), producerClaimsSet(this).sub = value, this;
2155
2159
  }
2156
2160
  setAudience(value) {
2157
- return validateAudienceClaim(value), producerPayload(this).aud = value, this;
2161
+ return validateAudienceClaim(value), producerClaimsSet(this).aud = value, this;
2158
2162
  }
2159
2163
  setJti(value) {
2160
- return validateStringClaim("jti", value), producerPayload(this).jti = value, this;
2164
+ return validateStringClaim("jti", value), producerClaimsSet(this).jti = value, this;
2161
2165
  }
2162
2166
  setNotBefore(value) {
2163
- return producerPayload(this).nbf = numericDate(value, "setNotBefore"), this;
2167
+ return producerClaimsSet(this).nbf = numericDate(value, "setNotBefore"), this;
2164
2168
  }
2165
2169
  setExpirationTime(value) {
2166
- return producerPayload(this).exp = numericDate(value, "setExpirationTime"), this;
2170
+ return producerClaimsSet(this).exp = numericDate(value, "setExpirationTime"), this;
2167
2171
  }
2168
2172
  setIssuedAt(value) {
2169
- const payload = producerPayload(this);
2170
- return value === void 0 ? payload.iat = epoch(/* @__PURE__ */ new Date()) : typeof value == "string" ? payload.iat = validateInput("setIssuedAt", epoch(/* @__PURE__ */ new Date()) + secs(value)) : payload.iat = numericDate(value, "setIssuedAt"), this;
2173
+ const claimsSet = producerClaimsSet(this);
2174
+ return value === void 0 ? claimsSet.iat = epoch(/* @__PURE__ */ new Date()) : typeof value == "string" ? claimsSet.iat = validateInput("setIssuedAt", epoch(/* @__PURE__ */ new Date()) + secs(value)) : claimsSet.iat = numericDate(value, "setIssuedAt"), this;
2171
2175
  }
2172
2176
  };
2173
2177
  //#endregion
2174
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwt/verify.js
2178
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jwt/verify.js
2175
2179
  async function jwtVerify(jwt, key, options) {
2176
2180
  const [verified, b64] = await verifyCompact(jwt, prepareVerify(options), key);
2177
2181
  if (!b64) throw new JWTInvalid("JWTs MUST NOT use unencoded payload");
@@ -2182,7 +2186,7 @@ async function jwtVerify(jwt, key, options) {
2182
2186
  };
2183
2187
  }
2184
2188
  //#endregion
2185
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwe/compact/encrypt.js
2189
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jwe/compact/encrypt.js
2186
2190
  var CompactEncrypt = class {
2187
2191
  #input;
2188
2192
  constructor(plaintext) {
@@ -2205,12 +2209,12 @@ var CompactEncrypt = class {
2205
2209
  }
2206
2210
  };
2207
2211
  //#endregion
2208
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jws_sign.js
2212
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/jws_sign.js
2209
2213
  async function createSignature(input, key, rejectUnencoded) {
2210
- let [payload, protectedHeader, unprotectedHeader, crit] = input, protectedHeaderString = "";
2214
+ let [payload, protectedHeader, unprotectedHeader, crit] = input, encodedProtectedHeader = "";
2211
2215
  if (protectedHeader !== void 0) {
2212
2216
  const normalized = serializeJoseHeader(JWSInvalid, protectedHeader);
2213
- protectedHeader = normalized[0], protectedHeaderString = encode$1(normalized[1]);
2217
+ protectedHeader = normalized[0], encodedProtectedHeader = encode$1(normalized[1]);
2214
2218
  }
2215
2219
  if (unprotectedHeader !== void 0 && (unprotectedHeader = serializeJoseHeader(JWSInvalid, unprotectedHeader)[0]), !protectedHeader && !unprotectedHeader) throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");
2216
2220
  if (!isDisjoint(protectedHeader, unprotectedHeader)) throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
@@ -2224,19 +2228,19 @@ async function createSignature(input, key, rejectUnencoded) {
2224
2228
  const { alg } = joseHeader;
2225
2229
  if (typeof alg != "string" || !alg) throw new JWSInvalid("JWS \"alg\" (Algorithm) Header Parameter missing or invalid");
2226
2230
  const entry = jwsAlgorithm(alg);
2227
- let payloadS = "", payloadB = payload, data;
2231
+ let encodedPayload = "", signingPayload = payload, signingInput;
2228
2232
  if (b64) {
2229
- const encoded = input[4];
2230
- encoded ? (payloadS = encoded[0] ??= encode$1(payload), payloadB = encoded[1] ??= encode$2(payloadS)) : (payloadS = encode$1(payload), data = encoder$1.encode(`${protectedHeaderString}.${payloadS}`));
2233
+ const encodedPayloadCache = input[4];
2234
+ encodedPayloadCache ? (encodedPayload = encodedPayloadCache[0] ??= encode$1(payload), signingPayload = encodedPayloadCache[1] ??= encode$2(encodedPayload)) : (encodedPayload = encode$1(payload), signingInput = encoder$1.encode(`${encodedProtectedHeader}.${encodedPayload}`));
2231
2235
  }
2232
- data ??= concat(encode$2(protectedHeaderString), encode$2("."), payloadB);
2233
- const k = await rawKey(await prepareKey(entry, key, "sign"), entry.subtle, "sign");
2234
- entry.minRsaBits && checkModulusLength(entry.alg, k);
2236
+ signingInput ??= concat(encode$2(encodedProtectedHeader), encode$2("."), signingPayload);
2237
+ const signingKey = await rawKey(await prepareKey(entry, key, "sign"), entry.subtle, "sign");
2238
+ entry.minRsaBits && checkModulusLength(entry.alg, signingKey);
2235
2239
  const jws = {
2236
- signature: encode$1(new Uint8Array(await crypto.subtle.sign(entry.signing, k, data))),
2237
- payload: payloadS
2240
+ signature: encode$1(new Uint8Array(await crypto.subtle.sign(entry.signing, signingKey, signingInput))),
2241
+ payload: encodedPayload
2238
2242
  };
2239
- return protectedHeader && (jws.protected = protectedHeaderString), unprotectedHeader && (jws.header = unprotectedHeader), [jws, b64];
2243
+ return protectedHeader && (jws.protected = encodedProtectedHeader), unprotectedHeader && (jws.header = unprotectedHeader), [jws, b64];
2240
2244
  }
2241
2245
  async function createCompactSignature(payload, protectedHeader, crit, key, rejectUnencoded) {
2242
2246
  const [jws] = await createSignature([
@@ -2248,7 +2252,7 @@ async function createCompactSignature(payload, protectedHeader, crit, key, rejec
2248
2252
  return `${jws.protected}.${jws.payload}.${jws.signature}`;
2249
2253
  }
2250
2254
  //#endregion
2251
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jws/compact/sign.js
2255
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jws/compact/sign.js
2252
2256
  var CompactSign = class {
2253
2257
  #payload;
2254
2258
  #protectedHeader;
@@ -2265,7 +2269,7 @@ var CompactSign = class {
2265
2269
  }
2266
2270
  };
2267
2271
  //#endregion
2268
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/key_algorithm.js
2272
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/lib/key_algorithm.js
2269
2273
  function unsupportedAlg(source = "JWK \"alg\" (Algorithm) Parameter") {
2270
2274
  throw new JOSENotSupported(`Invalid or unsupported ${source} value`);
2271
2275
  }
@@ -2273,7 +2277,7 @@ function keyAlgorithm(alg, source) {
2273
2277
  return (typeof alg == "string" ? JWS[alg] ?? JWE[alg] : void 0) ?? unsupportedAlg(source);
2274
2278
  }
2275
2279
  //#endregion
2276
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/key/export.js
2280
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/key/export.js
2277
2281
  async function exportJWK(key) {
2278
2282
  if (isKeyObject(key)) if (key.type === "secret") key = key.export();
2279
2283
  else return key.export({ format: "jwk" });
@@ -2289,7 +2293,7 @@ async function exportJWK(key) {
2289
2293
  return jwk;
2290
2294
  }
2291
2295
  //#endregion
2292
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwk/thumbprint.js
2296
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jwk/thumbprint.js
2293
2297
  const check$2 = (value, description) => {
2294
2298
  if (typeof value != "string" || !value) throw new JWKInvalid(`${description} missing or invalid`);
2295
2299
  };
@@ -2300,17 +2304,17 @@ async function calculateJwkThumbprint(key, digestAlgorithm) {
2300
2304
  } else if (isKeyLike(key)) jwk = snapshotJwk(await exportJWK(key));
2301
2305
  else throw new TypeError(invalidKeyInput(key, "CryptoKey", "KeyObject", "JSON Web Key"));
2302
2306
  if (digestAlgorithm ??= "sha256", digestAlgorithm !== "sha256" && digestAlgorithm !== "sha384" && digestAlgorithm !== "sha512") throw new TypeError("digestAlgorithm must one of \"sha256\", \"sha384\", or \"sha512\"");
2303
- let components;
2307
+ let requiredMembers;
2304
2308
  switch (jwk.kty) {
2305
2309
  case "AKP":
2306
- check$2(jwk.alg, "\"alg\" (Algorithm) Parameter"), check$2(jwk.pub, "\"pub\" (Public key) Parameter"), components = {
2310
+ check$2(jwk.alg, "\"alg\" (Algorithm) Parameter"), check$2(jwk.pub, "\"pub\" (Public key) Parameter"), requiredMembers = {
2307
2311
  alg: jwk.alg,
2308
2312
  kty: jwk.kty,
2309
2313
  pub: jwk.pub
2310
2314
  };
2311
2315
  break;
2312
2316
  case "EC":
2313
- check$2(jwk.crv, "\"crv\" (Curve) Parameter"), check$2(jwk.x, "\"x\" (X Coordinate) Parameter"), check$2(jwk.y, "\"y\" (Y Coordinate) Parameter"), components = {
2317
+ check$2(jwk.crv, "\"crv\" (Curve) Parameter"), check$2(jwk.x, "\"x\" (X Coordinate) Parameter"), check$2(jwk.y, "\"y\" (Y Coordinate) Parameter"), requiredMembers = {
2314
2318
  crv: jwk.crv,
2315
2319
  kty: jwk.kty,
2316
2320
  x: jwk.x,
@@ -2318,14 +2322,14 @@ async function calculateJwkThumbprint(key, digestAlgorithm) {
2318
2322
  };
2319
2323
  break;
2320
2324
  case "OKP":
2321
- check$2(jwk.crv, "\"crv\" (Subtype of Key Pair) Parameter"), check$2(jwk.x, "\"x\" (Public Key) Parameter"), components = {
2325
+ check$2(jwk.crv, "\"crv\" (Subtype of Key Pair) Parameter"), check$2(jwk.x, "\"x\" (Public Key) Parameter"), requiredMembers = {
2322
2326
  crv: jwk.crv,
2323
2327
  kty: jwk.kty,
2324
2328
  x: jwk.x
2325
2329
  };
2326
2330
  break;
2327
2331
  case "RSA":
2328
- check$2(jwk.e, "\"e\" (Exponent) Parameter"), check$2(jwk.n, "\"n\" (Modulus) Parameter"), components = {
2332
+ check$2(jwk.e, "\"e\" (Exponent) Parameter"), check$2(jwk.n, "\"n\" (Modulus) Parameter"), requiredMembers = {
2329
2333
  e: jwk.e,
2330
2334
  kty: jwk.kty,
2331
2335
  n: jwk.n
@@ -2333,18 +2337,18 @@ async function calculateJwkThumbprint(key, digestAlgorithm) {
2333
2337
  break;
2334
2338
  case "oct":
2335
2339
  if (typeof jwk.k != "string") throw new JWKInvalid("\"k\" (Key Value) Parameter missing or invalid");
2336
- components = {
2340
+ requiredMembers = {
2337
2341
  k: jwk.k,
2338
2342
  kty: jwk.kty
2339
2343
  };
2340
2344
  break;
2341
2345
  default: throw new JOSENotSupported("\"kty\" (Key Type) Parameter missing or unsupported");
2342
2346
  }
2343
- const data = encode$2(JSON.stringify(components));
2344
- return encode$1(await digest(digestAlgorithm, data));
2347
+ const thumbprintInput = encode$2(JSON.stringify(requiredMembers));
2348
+ return encode$1(await digest(digestAlgorithm, thumbprintInput));
2345
2349
  }
2346
2350
  //#endregion
2347
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwk/embedded.js
2351
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jwk/embedded.js
2348
2352
  async function EmbeddedJWK(protectedHeader, token) {
2349
2353
  const joseHeader = {
2350
2354
  ...protectedHeader,
@@ -2365,11 +2369,11 @@ async function EmbeddedJWK(protectedHeader, token) {
2365
2369
  return key;
2366
2370
  }
2367
2371
  //#endregion
2368
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwt/unsecured.js
2372
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/jwt/unsecured.js
2369
2373
  const UnsecuredJWT_base = JWTClaimsBuilder;
2370
2374
  var UnsecuredJWT = class extends UnsecuredJWT_base {
2371
2375
  encode() {
2372
- return `${encode$1(JSON.stringify({ alg: "none" }))}.${encode$1(jwtData(this))}.`;
2376
+ return `${encode$1(JSON.stringify({ alg: "none" }))}.${encode$1(jwtClaimsSetBytes(this))}.`;
2373
2377
  }
2374
2378
  static decode(jwt, options) {
2375
2379
  if (typeof jwt != "string") throw new JWTInvalid("Unsecured JWT must be a string");
@@ -2392,7 +2396,7 @@ var UnsecuredJWT = class extends UnsecuredJWT_base {
2392
2396
  }
2393
2397
  };
2394
2398
  //#endregion
2395
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/key/import.js
2399
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/key/import.js
2396
2400
  async function importJWK(jwk, alg, options) {
2397
2401
  if (!isObject(jwk)) throw new TypeError("JWK must be an object");
2398
2402
  const normalized = normalizeJwk(jwk), extractable = validateExtractableOption(options?.extractable), { alg: jwkAlg } = normalized;
@@ -2412,40 +2416,40 @@ async function importJWK(jwk, alg, options) {
2412
2416
  }
2413
2417
  }
2414
2418
  //#endregion
2415
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/util/decode_protected_header.js
2419
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/util/decode_protected_header.js
2416
2420
  function decodeProtectedHeader(token) {
2417
- let protectedB64u;
2421
+ let encodedProtectedHeader;
2418
2422
  if (typeof token == "string") {
2419
2423
  const parts = token.split(".");
2420
- (parts.length === 3 || parts.length === 5) && ([protectedB64u] = parts);
2421
- } else if (typeof token == "object" && token) if ("protected" in token) protectedB64u = token.protected;
2424
+ (parts.length === 3 || parts.length === 5) && ([encodedProtectedHeader] = parts);
2425
+ } else if (typeof token == "object" && token) if ("protected" in token) encodedProtectedHeader = token.protected;
2422
2426
  else throw new TypeError("Token does not contain a Protected Header");
2423
2427
  const invalid = "Invalid Token or Protected Header formatting";
2424
- if (typeof protectedB64u != "string" || !protectedB64u) throw new TypeError(invalid);
2425
- return parseJoseHeader(protectedB64u, TypeError, invalid);
2428
+ if (typeof encodedProtectedHeader != "string" || !encodedProtectedHeader) throw new TypeError(invalid);
2429
+ return parseJoseHeader(encodedProtectedHeader, TypeError, invalid);
2426
2430
  }
2427
2431
  //#endregion
2428
- //#region node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/util/decode_jwt.js
2432
+ //#region node_modules/.pnpm/jose@6.2.13/node_modules/jose/dist/webapi/util/decode_jwt.js
2429
2433
  function decodeJwt(jwt) {
2430
2434
  if (typeof jwt != "string") throw new JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");
2431
- const { 1: payload, length } = jwt.split(".");
2435
+ const { 1: encodedPayload, length } = jwt.split(".");
2432
2436
  if (length === 5) throw new JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");
2433
2437
  if (length !== 3) throw new JWTInvalid("Invalid JWT");
2434
- if (!payload) throw new JWTInvalid("JWTs must contain a payload");
2435
- let decoded;
2438
+ if (!encodedPayload) throw new JWTInvalid("JWTs must contain a payload");
2439
+ let claimsSetBytes;
2436
2440
  try {
2437
- decoded = decode$2(payload);
2438
- } catch {
2439
- throw new JWTInvalid("Failed to base64url decode the payload");
2441
+ claimsSetBytes = decode$2(encodedPayload);
2442
+ } catch (cause) {
2443
+ throw new JWTInvalid("Failed to base64url decode the payload", { cause });
2440
2444
  }
2441
- let result;
2445
+ let claimsSet;
2442
2446
  try {
2443
- result = JSON.parse(strictDecoder.decode(decoded));
2444
- } catch {
2445
- throw new JWTInvalid("Failed to parse the decoded payload as JSON");
2447
+ claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));
2448
+ } catch (cause) {
2449
+ throw new JWTInvalid("Failed to parse the decoded payload as JSON", { cause });
2446
2450
  }
2447
- if (!isObject(result)) throw new JWTInvalid("Invalid JWT Claims Set");
2448
- return result;
2451
+ if (!isObject(claimsSet)) throw new JWTInvalid("Invalid JWT Claims Set");
2452
+ return claimsSet;
2449
2453
  }
2450
2454
  //#endregion
2451
2455
  //#region src/auth/server/trusted-clients.ts
@@ -3013,7 +3017,7 @@ const deriveKeyRing = (raw) => {
3013
3017
  return [deriveKeySet(first), ...rest.map(deriveKeySet)];
3014
3018
  };
3015
3019
  //#endregion
3016
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/attention.js
3020
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/attention.js
3017
3021
  const SET_BOLD_YELLOW_TEXT = "\x1B[33;1m";
3018
3022
  const SET_BOLD_RED_TEXT = "\x1B[31;1m";
3019
3023
  const RESET_ALL_ATTRIBUTES = "\x1B[0m";
@@ -3030,7 +3034,7 @@ function warn(str) {
3030
3034
  console.warn(stderr ? stderr(warning) : warning);
3031
3035
  }
3032
3036
  //#endregion
3033
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/lru.js
3037
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/lru.js
3034
3038
  var LRU = class {
3035
3039
  #maxSize;
3036
3040
  #recent = /* @__PURE__ */ new Map();
@@ -24251,7 +24255,7 @@ var import_application = /* @__PURE__ */ __toESM(require_application(), 1);
24251
24255
  var koa_default = import_application.default;
24252
24256
  const HttpError = import_application.default.HttpError;
24253
24257
  //#endregion
24254
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/param_list.js
24258
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/param_list.js
24255
24259
  var param_list_default = [
24256
24260
  "acr_values",
24257
24261
  "claims_locales",
@@ -24275,7 +24279,7 @@ var param_list_default = [
24275
24279
  "ui_locales"
24276
24280
  ];
24277
24281
  //#endregion
24278
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/dev_keystore.js
24282
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/dev_keystore.js
24279
24283
  var dev_keystore_default = { keys: [{
24280
24284
  alg: "RS256",
24281
24285
  d: "VEZOsY07JTFzGTqv6cC2Y32vsfChind2I_TTuvV225_-0zrSej3XLRg8iE_u0-3GSgiGi4WImmTwmEgLo4Qp3uEcxCYbt4NMJC7fwT2i3dfRZjtZ4yJwFl0SIj8TgfQ8ptwZbFZUlcHGXZIr4nL8GXyQT0CK8wy4COfmymHrrUoyfZA154ql_OsoiupSUCRcKVvZj2JHL2KILsq_sh_l7g2dqAN8D7jYfJ58MkqlknBMa2-zi5I0-1JUOwztVNml_zGrp27UbEU60RqV3GHjoqwI6m01U7K0a8Q_SQAKYGqgepbAYOA-P4_TLl5KC4-WWBZu_rVfwgSENwWNEhw8oQ",
@@ -24291,7 +24295,7 @@ var dev_keystore_default = { keys: [{
24291
24295
  use: "sig"
24292
24296
  }] };
24293
24297
  //#endregion
24294
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/client_attributes.js
24298
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/client_attributes.js
24295
24299
  var client_attributes_exports = /* @__PURE__ */ __exportAll({
24296
24300
  ARYS: () => ARYS$1,
24297
24301
  BOOL: () => BOOL$1,
@@ -24484,7 +24488,7 @@ const CHOICES = {
24484
24488
  userinfo_signed_response_alg: "userinfo_signing_alg_values_supported"
24485
24489
  };
24486
24490
  //#endregion
24487
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/jwa.js
24491
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/jwa.js
24488
24492
  var jwa_exports = /* @__PURE__ */ __exportAll({
24489
24493
  attestSigningAlgValues: () => attestSigningAlgValues,
24490
24494
  authorizationEncryptionAlgValues: () => authorizationEncryptionAlgValues,
@@ -24567,13 +24571,13 @@ const authorizationEncryptionEncValues = [...encryptionEncValues];
24567
24571
  const dPoPSigningAlgValues = [...signingAlgValues].filter((alg) => !alg.startsWith("HS"));
24568
24572
  const attestSigningAlgValues = [...signingAlgValues].filter((alg) => !alg.startsWith("HS"));
24569
24573
  //#endregion
24570
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/index.js
24574
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/index.js
24571
24575
  const PUSHED_REQUEST_URN = "urn:ietf:params:oauth:request_uri:";
24572
24576
  //#endregion
24573
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/is_plain_object.js
24577
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/is_plain_object.js
24574
24578
  var is_plain_object_default = (a) => !!a && a.constructor === Object;
24575
24579
  //#endregion
24576
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/merge.js
24580
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/merge.js
24577
24581
  function merge(target, ...sources) {
24578
24582
  for (const source of sources) {
24579
24583
  if (!is_plain_object_default(source)) continue;
@@ -24586,7 +24590,7 @@ function merge(target, ...sources) {
24586
24590
  return target;
24587
24591
  }
24588
24592
  //#endregion
24589
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/pick.js
24593
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/pick.js
24590
24594
  var pick_default = (object = {}, ...properties) => {
24591
24595
  const result = {};
24592
24596
  properties.forEach((property) => {
@@ -24595,7 +24599,7 @@ var pick_default = (object = {}, ...properties) => {
24595
24599
  return result;
24596
24600
  };
24597
24601
  //#endregion
24598
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/remove.js
24602
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/remove.js
24599
24603
  var remove_default = (array, predicate) => {
24600
24604
  const remove = [];
24601
24605
  array.forEach((value, index) => {
@@ -24606,7 +24610,7 @@ var remove_default = (array, predicate) => {
24606
24610
  });
24607
24611
  };
24608
24612
  //#endregion
24609
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/set.js
24613
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/set.js
24610
24614
  var set_default = (object, path, value) => {
24611
24615
  const properties = path.split(".");
24612
24616
  if (properties.includes("__proto__") || properties.includes("constructor")) throw new TypeError("__proto__ and constructor cannot be set");
@@ -24618,13 +24622,13 @@ var set_default = (object, path, value) => {
24618
24622
  });
24619
24623
  };
24620
24624
  //#endregion
24621
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/upper_first.js
24625
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/upper_first.js
24622
24626
  var upper_first_default = (str = "") => `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
24623
24627
  //#endregion
24624
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/camel_case.js
24628
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/camel_case.js
24625
24629
  var camel_case_default = (str = "") => str.replace(/(_\w)/g, (x) => x.replace("_", "").toUpperCase());
24626
24630
  //#endregion
24627
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/errors.js
24631
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/errors.js
24628
24632
  var errors_exports = /* @__PURE__ */ __exportAll({
24629
24633
  AccessDenied: () => AccessDenied,
24630
24634
  AuthorizationPending: () => AuthorizationPending,
@@ -24835,7 +24839,7 @@ const UseAttestationChallenge = E("use_attestation_challenge");
24835
24839
  const UseFreshAttestation = E("use_fresh_attestation");
24836
24840
  const InvalidClientAttestation = E("invalid_client_attestation");
24837
24841
  //#endregion
24838
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/html_safe.js
24842
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/html_safe.js
24839
24843
  function htmlSafe(input) {
24840
24844
  if (typeof input === "number" && Number.isFinite(input)) return `${input}`;
24841
24845
  if (typeof input === "string") return input.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
@@ -24843,7 +24847,7 @@ function htmlSafe(input) {
24843
24847
  return "";
24844
24848
  }
24845
24849
  //#endregion
24846
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/check.js
24850
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/check.js
24847
24851
  var Check = class {
24848
24852
  constructor(reason, description, error, check = () => {}, details = () => {}) {
24849
24853
  if (typeof error === "function") {
@@ -24861,7 +24865,7 @@ var Check = class {
24861
24865
  Check.REQUEST_PROMPT = true;
24862
24866
  Check.NO_NEED_TO_PROMPT = false;
24863
24867
  //#endregion
24864
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/prompt.js
24868
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/prompt.js
24865
24869
  var Prompt = class {
24866
24870
  constructor({ name, requestable = false } = {}, details, ...checks) {
24867
24871
  if (typeof requestable !== "boolean") throw new Error("requestable argument must be provided as Boolean");
@@ -24915,7 +24919,7 @@ var Prompt = class {
24915
24919
  }
24916
24920
  };
24917
24921
  //#endregion
24918
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/weak_cache.js
24922
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/weak_cache.js
24919
24923
  let read = () => void 0;
24920
24924
  function get$2(ctx) {
24921
24925
  return read(ctx);
@@ -24924,7 +24928,7 @@ function setReader(reader) {
24924
24928
  read = reader;
24925
24929
  }
24926
24930
  //#endregion
24927
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/prompts/login.js
24931
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/prompts/login.js
24928
24932
  var login_default = () => new Prompt({
24929
24933
  name: "login",
24930
24934
  requestable: true
@@ -24977,7 +24981,7 @@ var login_default = () => new Prompt({
24977
24981
  return Check.REQUEST_PROMPT;
24978
24982
  }, ({ oidc }) => ({ acr: oidc.claims.id_token.acr })));
24979
24983
  //#endregion
24980
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/prompts/consent.js
24984
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/prompts/consent.js
24981
24985
  const missingOIDCScope = Symbol();
24982
24986
  const missingOIDCClaims = Symbol();
24983
24987
  const missingResourceScopes = Symbol();
@@ -25045,7 +25049,7 @@ var consent_default = () => new Prompt({
25045
25049
  return Check.NO_NEED_TO_PROMPT;
25046
25050
  }, ({ oidc }) => ({ rar: JSON.parse(oidc.params.authorization_details) })));
25047
25051
  //#endregion
25048
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/index.js
25052
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/interaction_policy/index.js
25049
25053
  const base = () => {
25050
25054
  const DEFAULT = [];
25051
25055
  DEFAULT.get = function getPrompt(name) {
@@ -25069,7 +25073,7 @@ const base = () => {
25069
25073
  return DEFAULT;
25070
25074
  };
25071
25075
  //#endregion
25072
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/nanoid.js
25076
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/nanoid.js
25073
25077
  const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
25074
25078
  const POOL_SIZE = 4096;
25075
25079
  function customAlphabet(alphabet, defaultSize) {
@@ -25118,7 +25122,7 @@ function customAlphabet(alphabet, defaultSize) {
25118
25122
  }
25119
25123
  var nanoid_default = customAlphabet(urlAlphabet, 43);
25120
25124
  //#endregion
25121
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/defaults.js
25125
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/defaults.js
25122
25126
  const warned$1 = /* @__PURE__ */ new Set();
25123
25127
  function shouldChange(name, msg) {
25124
25128
  if (!warned$1.has(name)) {
@@ -25896,7 +25900,7 @@ function makeDefaults() {
25896
25900
  }
25897
25901
  const defaults$1 = makeDefaults();
25898
25902
  //#endregion
25899
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/features.js
25903
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/features.js
25900
25904
  const STABLE = /* @__PURE__ */ new Set([
25901
25905
  "backchannelLogout",
25902
25906
  "ciba",
@@ -25938,7 +25942,7 @@ const EXPERIMENTS = new Map(Object.entries({
25938
25942
  },
25939
25943
  attestClientAuth: {
25940
25944
  name: "OAuth 2.0 Attestation-Based Client Authentication",
25941
- version: "draft-10"
25945
+ version: "draft-12"
25942
25946
  },
25943
25947
  clientIdMetadataDocument: {
25944
25948
  name: "OAuth Client ID Metadata Document",
@@ -25946,7 +25950,7 @@ const EXPERIMENTS = new Map(Object.entries({
25946
25950
  }
25947
25951
  }));
25948
25952
  //#endregion
25949
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/formatters.js
25953
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/formatters.js
25950
25954
  const conjunction = new Intl.ListFormat("en", { type: "conjunction" });
25951
25955
  const disjunction = new Intl.ListFormat("en", { type: "disjunction" });
25952
25956
  const formatter = { format(iterable, { type }) {
@@ -25961,7 +25965,7 @@ function pluralize(word, count) {
25961
25965
  return `${word}s`;
25962
25966
  }
25963
25967
  //#endregion
25964
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/configuration.js
25968
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/configuration.js
25965
25969
  function featuresTypeErrorCheck({ features }) {
25966
25970
  for (const value of Object.values(features)) if (typeof value === "boolean") throw new TypeError("Features are not enabled/disabled with a boolean value. See the documentation for more details.");
25967
25971
  }
@@ -26350,6 +26354,7 @@ var Configuration = class {
26350
26354
  checkAttestClientAuth() {
26351
26355
  const { additionalSecuritySignal } = this.features.attestClientAuth;
26352
26356
  if (additionalSecuritySignal !== false && additionalSecuritySignal !== "optional" && additionalSecuritySignal !== "required") throw new TypeError("features.attestClientAuth.additionalSecuritySignal must be false, optional, or required");
26357
+ if (this.features.attestClientAuth.enabled && this.features.dPoP.enabled && this.features.dPoP.nonceSecret === void 0) throw new TypeError("features.dPoP.nonceSecret is required when features.attestClientAuth and features.dPoP are enabled");
26353
26358
  }
26354
26359
  checkAuthMethods() {
26355
26360
  const authMethods = /* @__PURE__ */ new Set([
@@ -26361,7 +26366,10 @@ var Configuration = class {
26361
26366
  ]);
26362
26367
  if (this.features.mTLS.enabled && this.features.mTLS.tlsClientAuth) authMethods.add("tls_client_auth");
26363
26368
  if (this.features.mTLS.enabled && this.features.mTLS.selfSignedTlsClientAuth) authMethods.add("self_signed_tls_client_auth");
26364
- if (this.features.attestClientAuth.enabled) authMethods.add("attest_jwt_client_auth");
26369
+ if (this.features.attestClientAuth.enabled) {
26370
+ authMethods.add("attest_jwt_client_auth");
26371
+ if (this.features.dPoP.enabled) authMethods.add("attest_jwt_client_auth_dpop");
26372
+ }
26365
26373
  if (this.clientAuthMethods) this.clientAuthMethods.forEach((method) => {
26366
26374
  if (!authMethods.has(method)) throw new TypeError(`only supported clientAuthMethods are ${formatList([...authMethods])}`);
26367
26375
  });
@@ -26406,7 +26414,7 @@ var Configuration = class {
26406
26414
  }
26407
26415
  };
26408
26416
  //#endregion
26409
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/keystore.js
26417
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/keystore.js
26410
26418
  var ExternalSigningKey = class {
26411
26419
  #publicJwk;
26412
26420
  #kid;
@@ -26587,7 +26595,7 @@ var KeyStore = class {
26587
26595
  }
26588
26596
  };
26589
26597
  //#endregion
26590
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_keystore.js
26598
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_keystore.js
26591
26599
  const calculateKid = (jwk) => {
26592
26600
  let components;
26593
26601
  switch (jwk.kty) {
@@ -26817,10 +26825,10 @@ function initialize$1(jwks) {
26817
26825
  get$2(this).jwks = { keys };
26818
26826
  }
26819
26827
  //#endregion
26820
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/epoch_time.js
26828
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/epoch_time.js
26821
26829
  var epoch_time_default = (date = Date.now()) => Math.floor(date / 1e3);
26822
26830
  //#endregion
26823
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/adapters/memory_adapter.js
26831
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/adapters/memory_adapter.js
26824
26832
  function createStorage() {
26825
26833
  return new LRU({ maxSize: 1e3 });
26826
26834
  }
@@ -26943,12 +26951,12 @@ function createMemoryAdapter(clockTolerance = 0) {
26943
26951
  return (model) => new MemoryAdapter(model, store, clockTolerance);
26944
26952
  }
26945
26953
  //#endregion
26946
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/type_validators.js
26954
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/type_validators.js
26947
26955
  const hasPrototype = (target) => target.prototype !== null && typeof target.prototype === "object";
26948
26956
  const isContructor = (fn) => fn.constructor instanceof Function && fn.constructor.name !== void 0;
26949
26957
  var type_validators_default = (constructable) => constructable instanceof Function && hasPrototype(constructable) && isContructor(constructable.constructor);
26950
26958
  //#endregion
26951
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_adapter.js
26959
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_adapter.js
26952
26960
  function initializeAdapter(adapter = MemoryAdapter) {
26953
26961
  let Adapter = adapter;
26954
26962
  if (adapter === MemoryAdapter) {
@@ -26962,7 +26970,7 @@ function initializeAdapter(adapter = MemoryAdapter) {
26962
26970
  get$2(this).Adapter = Adapter;
26963
26971
  }
26964
26972
  //#endregion
26965
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/router.js
26973
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/router.js
26966
26974
  function compose(middleware) {
26967
26975
  return function composed(ctx, next) {
26968
26976
  let index = -1;
@@ -27124,7 +27132,7 @@ var Router = class {
27124
27132
  }
27125
27133
  };
27126
27134
  //#endregion
27127
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/selective_body.js
27135
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/selective_body.js
27128
27136
  let warned;
27129
27137
  const LIMIT = 57344;
27130
27138
  async function readBody(req, length, charset) {
@@ -27176,7 +27184,7 @@ async function urlencoded(ctx, next) {
27176
27184
  else await next();
27177
27185
  }
27178
27186
  //#endregion
27179
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/views/interaction.js
27187
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/views/interaction.js
27180
27188
  function interaction$1(it, options) {
27181
27189
  const include = (template, data) => this.render(template, data, options);
27182
27190
  const __eta = {
@@ -27274,7 +27282,7 @@ function interaction$1(it, options) {
27274
27282
  return __eta.res;
27275
27283
  }
27276
27284
  //#endregion
27277
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/views/layout.js
27285
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/views/layout.js
27278
27286
  function layout$1(it, options) {
27279
27287
  const include = (template, data) => this.render(template, data, options);
27280
27288
  const __eta = {
@@ -27321,7 +27329,7 @@ function layout$1(it, options) {
27321
27329
  return __eta.res;
27322
27330
  }
27323
27331
  //#endregion
27324
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/views/login.js
27332
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/views/login.js
27325
27333
  function login$1(it, options) {
27326
27334
  const include = (template, data) => this.render(template, data, options);
27327
27335
  const __eta = {
@@ -27349,7 +27357,7 @@ function login$1(it, options) {
27349
27357
  return __eta.res;
27350
27358
  }
27351
27359
  //#endregion
27352
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/views/index.js
27360
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/views/index.js
27353
27361
  const ESCAPE = {
27354
27362
  "&": "&amp;",
27355
27363
  "<": "&lt;",
@@ -27377,13 +27385,13 @@ const interaction = (locals) => render$1(interaction$1, locals);
27377
27385
  const layout = (locals) => render$1(layout$1, locals);
27378
27386
  const login = (locals) => render$1(login$1, locals);
27379
27387
  //#endregion
27380
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/no_cache.js
27388
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/no_cache.js
27381
27389
  async function noCache(ctx, next) {
27382
27390
  ctx.set("cache-control", "no-store");
27383
27391
  await next();
27384
27392
  }
27385
27393
  //#endregion
27386
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/interaction.js
27394
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/interaction.js
27387
27395
  const viewMap = {
27388
27396
  login,
27389
27397
  interaction
@@ -27478,7 +27486,7 @@ const submit = [
27478
27486
  }
27479
27487
  ];
27480
27488
  //#endregion
27481
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/configuration_result.js
27489
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/configuration_result.js
27482
27490
  function invalid$1(path, expected) {
27483
27491
  return /* @__PURE__ */ new TypeError(`${path} must ${expected}`);
27484
27492
  }
@@ -27519,7 +27527,7 @@ function extraTokenClaims(value, path = "extraTokenClaims") {
27519
27527
  return value;
27520
27528
  }
27521
27529
  //#endregion
27522
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/cors.js
27530
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/cors.js
27523
27531
  const list = (value) => Array.isArray(value) ? value.join(",") : value;
27524
27532
  function corsMiddleware({ allowMethods, maxAge, exposeHeaders }) {
27525
27533
  const methods = list(allowMethods) ?? "GET,HEAD,PUT,POST,DELETE,PATCH";
@@ -27562,7 +27570,7 @@ var cors_default = ({ clientBased = false, ...options }) => {
27562
27570
  };
27563
27571
  };
27564
27572
  //#endregion
27565
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/validate_presence.js
27573
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/validate_presence.js
27566
27574
  function validatePresence(ctx, ...required) {
27567
27575
  const { params } = ctx.oidc;
27568
27576
  const missing = required.map((param) => {
@@ -27571,7 +27579,7 @@ function validatePresence(ctx, ...required) {
27571
27579
  if (missing.length) throw new InvalidRequest(`missing required ${pluralize("parameter", missing.length)} ${formatList(missing)}`);
27572
27580
  }
27573
27581
  //#endregion
27574
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/pkce_format.js
27582
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/pkce_format.js
27575
27583
  const check = /[^\w.\-~]/;
27576
27584
  var pkce_format_default = (input, param) => {
27577
27585
  if (input.length < 43) throw new InvalidRequest(`${param} must be a string with a minimum length of 43 characters`);
@@ -27579,7 +27587,7 @@ var pkce_format_default = (input, param) => {
27579
27587
  if (check.test(input)) throw new InvalidRequest(`${param} contains invalid characters`);
27580
27588
  };
27581
27589
  //#endregion
27582
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/constant_equals.js
27590
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/constant_equals.js
27583
27591
  function paddedBuffer(string, length) {
27584
27592
  const buffer = Buffer.alloc(length, void 0, "utf8");
27585
27593
  buffer.write(string);
@@ -27592,7 +27600,7 @@ function constantEquals(a, b, minComp = 0) {
27592
27600
  return timingSafeEqual(paddedBuffer(a, length), paddedBuffer(b, length));
27593
27601
  }
27594
27602
  //#endregion
27595
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/pkce.js
27603
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/pkce.js
27596
27604
  function checkPKCE$1(verifier, challenge, method) {
27597
27605
  if (verifier) pkce_format_default(verifier, "code_verifier");
27598
27606
  if (verifier || challenge) try {
@@ -27606,18 +27614,18 @@ function checkPKCE$1(verifier, challenge, method) {
27606
27614
  }
27607
27615
  }
27608
27616
  //#endregion
27609
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/check_attest_binding.js
27617
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/check_attest_binding.js
27610
27618
  async function checkAttestBinding(ctx, model) {
27611
27619
  const { cnf: { jwk } } = decodeJwt(ctx.get("oauth-client-attestation"));
27612
27620
  if (model.attestationJkt !== await calculateJwkThumbprint(jwk)) throw new InvalidGrant$1("oauth-client-attestation instance public key mismatch");
27613
27621
  }
27614
27622
  //#endregion
27615
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/assert_provider_context.js
27623
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/assert_provider_context.js
27616
27624
  function assertProviderContext(provider, ctx) {
27617
27625
  if (ctx?.oidc?.provider !== provider) throw new TypeError("provider does not match ctx.oidc.provider");
27618
27626
  }
27619
27627
  //#endregion
27620
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/base64url.js
27628
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/base64url.js
27621
27629
  function encode(input, encoding = "utf8") {
27622
27630
  return Buffer.from(input, encoding).toString("base64url");
27623
27631
  }
@@ -27625,7 +27633,7 @@ function encodeBuffer(buf) {
27625
27633
  return Buffer.prototype.base64urlSlice.call(buf);
27626
27634
  }
27627
27635
  //#endregion
27628
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/challenge.js
27636
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/challenge.js
27629
27637
  function sixfourbeify(value) {
27630
27638
  const buf = Buffer.alloc(8);
27631
27639
  for (let i = buf.length - 1; i >= 0; i--) {
@@ -27685,17 +27693,29 @@ var ServerChallenge = class {
27685
27693
  }
27686
27694
  };
27687
27695
  //#endregion
27688
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/validate_dpop.js
27696
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/validate_dpop.js
27689
27697
  const weakMap = /* @__PURE__ */ new WeakMap();
27698
+ const combinedReplayChecks = /* @__PURE__ */ new WeakMap();
27699
+ function getDpopJwt(provider, ctx) {
27700
+ assertProviderContext(provider, ctx);
27701
+ return weakMap.get(ctx)?.jwt;
27702
+ }
27690
27703
  async function checkDpopReplay(provider, ctx, dPoP, clientId, ErrorClass = InvalidGrant$1) {
27691
27704
  assertProviderContext(provider, ctx);
27692
27705
  if (!dPoP || get$2(provider).features.dPoP.allowReplay) return;
27706
+ const combined = ctx.oidc.clientAttestation?.method === "dpop_combined" && ctx.oidc.client.clientId === clientId && weakMap.get(ctx)?.result === dPoP;
27707
+ if (combined && combinedReplayChecks.get(ctx) === dPoP) return;
27693
27708
  const unique = await provider.ReplayDetection.unique(clientId, dPoP.jti, epoch_time_default() + 300);
27694
27709
  ctx.assert(unique, new ErrorClass("DPoP proof JWT Replay detected"));
27710
+ if (combined) combinedReplayChecks.set(ctx, dPoP);
27695
27711
  }
27696
27712
  async function validateDpop(provider, ctx, accessToken) {
27697
27713
  assertProviderContext(provider, ctx);
27698
- if (weakMap.has(ctx)) return weakMap.get(ctx);
27714
+ if (weakMap.has(ctx)) {
27715
+ const { result, jwt } = weakMap.get(ctx);
27716
+ if (accessToken && jwt.payload.ath !== crypto$2.hash("sha256", accessToken, "base64url")) throw new InvalidDpopProof("DPoP proof ath mismatch");
27717
+ return result;
27718
+ }
27699
27719
  const { features: { dPoP: dPoPConfig }, dPoPSigningAlgValues } = get$2(provider).configuration;
27700
27720
  if (!dPoPConfig.enabled) return;
27701
27721
  const proof = ctx.get("DPoP");
@@ -27706,11 +27726,13 @@ async function validateDpop(provider, ctx, accessToken) {
27706
27726
  const nextNonce = DPoPNonces?.nextChallenge();
27707
27727
  let payload;
27708
27728
  let protectedHeader;
27729
+ let jwt;
27709
27730
  try {
27710
- ({protectedHeader, payload} = await jwtVerify(proof, EmbeddedJWK, {
27731
+ jwt = await jwtVerify(proof, EmbeddedJWK, {
27711
27732
  algorithms: dPoPSigningAlgValues,
27712
27733
  typ: "dpop+jwt"
27713
- }));
27734
+ });
27735
+ ({protectedHeader, payload} = jwt);
27714
27736
  if (typeof payload.iat !== "number" || !payload.iat) throw new InvalidDpopProof("DPoP proof must have a iat number property");
27715
27737
  if (typeof payload.jti !== "string" || !payload.jti) throw new InvalidDpopProof("DPoP proof must have a jti string property");
27716
27738
  if (payload.nonce !== void 0 && typeof payload.nonce !== "string") throw new InvalidDpopProof("DPoP proof nonce must be a string");
@@ -27756,11 +27778,14 @@ async function validateDpop(provider, ctx, accessToken) {
27756
27778
  jti: payload.jti,
27757
27779
  iat: payload.iat
27758
27780
  };
27759
- weakMap.set(ctx, result);
27781
+ weakMap.set(ctx, {
27782
+ result,
27783
+ jwt
27784
+ });
27760
27785
  return result;
27761
27786
  }
27762
27787
  //#endregion
27763
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/non_rejectable_claims.js
27788
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/consts/non_rejectable_claims.js
27764
27789
  const NON_REJECTABLE_CLAIMS = /* @__PURE__ */ new Set([
27765
27790
  "sub",
27766
27791
  "sid",
@@ -27770,7 +27795,7 @@ const NON_REJECTABLE_CLAIMS = /* @__PURE__ */ new Set([
27770
27795
  "iss"
27771
27796
  ]);
27772
27797
  //#endregion
27773
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/filter_claims.js
27798
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/filter_claims.js
27774
27799
  var filter_claims_default = (source, target, grant) => {
27775
27800
  const claims = { ...source?.[target] };
27776
27801
  const requested = Object.keys(claims);
@@ -27782,7 +27807,7 @@ var filter_claims_default = (source, target, grant) => {
27782
27807
  return claims;
27783
27808
  };
27784
27809
  //#endregion
27785
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/account_claims.js
27810
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/account_claims.js
27786
27811
  async function getCtxAccountClaims(ctx, use, scope, claims, rejected) {
27787
27812
  return {
27788
27813
  ...await ctx.oidc.account.claims(use, scope, claims, rejected),
@@ -27790,7 +27815,7 @@ async function getCtxAccountClaims(ctx, use, scope, claims, rejected) {
27790
27815
  };
27791
27816
  }
27792
27817
  //#endregion
27793
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/revoke.js
27818
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/revoke.js
27794
27819
  async function revoke(ctx, grantId) {
27795
27820
  if (!grantId) return;
27796
27821
  const { oidc: { client, provider } } = ctx;
@@ -27812,7 +27837,7 @@ async function revoke(ctx, grantId) {
27812
27837
  if (revokeGrant) ctx.oidc.provider.emit("grant.revoked", ctx, grantId);
27813
27838
  }
27814
27839
  //#endregion
27815
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_source.js
27840
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_source.js
27816
27841
  async function findGrantSource(provider, ctx, Model, value, label) {
27817
27842
  assertProviderContext(provider, ctx);
27818
27843
  const source = await Model.find(value, { ignoreExpiration: true });
@@ -27841,18 +27866,19 @@ async function findAccount(provider, ctx, accountId, source) {
27841
27866
  return account(await get$2(provider).configuration.findAccount(ctx, accountId, source));
27842
27867
  }
27843
27868
  //#endregion
27844
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/set_rt_bindings.js
27869
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/set_rt_bindings.js
27845
27870
  async function setRefreshTokenBindings(ctx, at, rt) {
27846
27871
  switch (ctx.oidc.client.clientAuthMethod) {
27847
27872
  case "none":
27848
27873
  if (at.jkt) rt.jkt = at.jkt;
27849
27874
  if (at["x5t#S256"]) rt["x5t#S256"] = at["x5t#S256"];
27850
27875
  break;
27851
- case "attest_jwt_client_auth": await rt.setAttestBinding(ctx);
27876
+ case "attest_jwt_client_auth":
27877
+ case "attest_jwt_client_auth_dpop": await rt.setAttestBinding(ctx);
27852
27878
  }
27853
27879
  }
27854
27880
  //#endregion
27855
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_refresh_token.js
27881
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_refresh_token.js
27856
27882
  async function shouldIssueRefreshToken(provider, ctx, source) {
27857
27883
  assertProviderContext(provider, ctx);
27858
27884
  return boolean(await get$2(provider).configuration.issueRefreshToken(ctx, ctx.oidc.client, source), "issueRefreshToken");
@@ -27862,7 +27888,7 @@ function applyRefreshTokenBindings(provider, ctx, accessToken, refreshToken) {
27862
27888
  return setRefreshTokenBindings(ctx, accessToken, refreshToken);
27863
27889
  }
27864
27890
  //#endregion
27865
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_common.js
27891
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_common.js
27866
27892
  const { InvalidGrant } = errors_exports;
27867
27893
  const errorMap$2 = { ...errors_exports };
27868
27894
  function throwIfAsyncGrantError(entity) {
@@ -27978,7 +28004,7 @@ async function issueIdToken(provider, ctx, source, at, grant, scopeOverride) {
27978
28004
  return token.issue({ use: "idtoken" });
27979
28005
  }
27980
28006
  //#endregion
27981
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/authorization_code.js
28007
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/authorization_code.js
27982
28008
  var authorization_code_exports = /* @__PURE__ */ __exportAll({
27983
28009
  grantType: () => grantType$5,
27984
28010
  handler: () => handler$5,
@@ -28001,7 +28027,7 @@ const handler$5 = async function authorizationCodeHandler(provider, helpers, ctx
28001
28027
  const cert = checkMtlsCert(ctx);
28002
28028
  checkDpopRequired(ctx, dPoP);
28003
28029
  if (code.redirectUri !== ctx.oidc.params.redirect_uri) throw new InvalidGrant$1("authorization code redirect_uri mismatch");
28004
- if (ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth" && code.attestationJkt) await checkAttestBinding(ctx, code);
28030
+ if (["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod) && code.attestationJkt) await checkAttestBinding(ctx, code);
28005
28031
  await consumeGrantSource(ctx, code, "authorization code");
28006
28032
  ctx.oidc.entity("AuthorizationCode", code);
28007
28033
  ctx.oidc.entity("Grant", grant);
@@ -28019,7 +28045,7 @@ const parameters$5 = /* @__PURE__ */ new Set([
28019
28045
  ]);
28020
28046
  const grantType$5 = gty$4;
28021
28047
  //#endregion
28022
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/client_credentials.js
28048
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/client_credentials.js
28023
28049
  var client_credentials_exports = /* @__PURE__ */ __exportAll({
28024
28050
  grantType: () => grantType$4,
28025
28051
  handler: () => handler$4,
@@ -28059,10 +28085,10 @@ const handler$4 = async function clientCredentialsHandler(provider, helpers, ctx
28059
28085
  const parameters$4 = /* @__PURE__ */ new Set(["scope"]);
28060
28086
  const grantType$4 = "client_credentials";
28061
28087
  //#endregion
28062
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/difference.js
28088
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/difference.js
28063
28089
  var difference_default = (array, values) => array.filter((value) => values.indexOf(value) === -1);
28064
28090
  //#endregion
28065
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/certificate_thumbprint.js
28091
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/certificate_thumbprint.js
28066
28092
  function certThumbprint(cert) {
28067
28093
  let data;
28068
28094
  if (cert instanceof crypto$2.X509Certificate) data = cert.raw;
@@ -28070,7 +28096,7 @@ function certThumbprint(cert) {
28070
28096
  return crypto$2.hash("sha256", data, "base64url");
28071
28097
  }
28072
28098
  //#endregion
28073
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/resolve_resource.js
28099
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/resolve_resource.js
28074
28100
  var resolve_resource_default = async (ctx, model, config, scopes = model.scopes) => {
28075
28101
  let resource;
28076
28102
  if (config.resourceIndicators.enabled) {
@@ -28090,7 +28116,7 @@ var resolve_resource_default = async (ctx, model, config, scopes = model.scopes)
28090
28116
  return resource;
28091
28117
  };
28092
28118
  //#endregion
28093
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/refresh_token.js
28119
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/refresh_token.js
28094
28120
  var refresh_token_exports = /* @__PURE__ */ __exportAll({
28095
28121
  grantType: () => grantType$3,
28096
28122
  handler: () => handler$3,
@@ -28123,7 +28149,7 @@ const handler$3 = async function refreshTokenHandler(provider, helpers, ctx) {
28123
28149
  }
28124
28150
  await checkDpopReplay(ctx, dPoP, client.clientId, InvalidGrant$1);
28125
28151
  if (refreshToken.jkt && (!dPoP || refreshToken.jkt !== dPoP.thumbprint)) throw new InvalidGrant$1("failed jkt verification");
28126
- if (ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") await checkAttestBinding(ctx, refreshToken);
28152
+ if (["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) await checkAttestBinding(ctx, refreshToken);
28127
28153
  ctx.oidc.entity("RefreshToken", refreshToken);
28128
28154
  ctx.oidc.entity("Grant", grant);
28129
28155
  const account = await validateAccount(provider, ctx, refreshToken, "refresh token");
@@ -28202,7 +28228,7 @@ const handler$3 = async function refreshTokenHandler(provider, helpers, ctx) {
28202
28228
  const parameters$3 = /* @__PURE__ */ new Set(["refresh_token", "scope"]);
28203
28229
  const grantType$3 = gty$3;
28204
28230
  //#endregion
28205
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/device_code.js
28231
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/device_code.js
28206
28232
  var device_code_exports = /* @__PURE__ */ __exportAll({
28207
28233
  grantType: () => grantType$2,
28208
28234
  gty: () => gty$2,
@@ -28215,7 +28241,7 @@ const handler$2 = async function deviceCodeHandler(provider, helpers, ctx) {
28215
28241
  validatePresence(ctx, "device_code");
28216
28242
  const dPoP = await validateDpop(ctx);
28217
28243
  const code = await findGrantSource(ctx, provider.DeviceCode, ctx.oidc.params.device_code, "device code");
28218
- if (ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") await checkAttestBinding(ctx, code);
28244
+ if (["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) await checkAttestBinding(ctx, code);
28219
28245
  const cert = checkMtlsCert(ctx);
28220
28246
  checkDpopRequired(ctx, dPoP);
28221
28247
  if (code.isExpired) throw new ExpiredToken("device code is expired");
@@ -28235,7 +28261,7 @@ const handler$2 = async function deviceCodeHandler(provider, helpers, ctx) {
28235
28261
  const parameters$2 = /* @__PURE__ */ new Set(["device_code"]);
28236
28262
  const grantType$2 = "urn:ietf:params:oauth:grant-type:device_code";
28237
28263
  //#endregion
28238
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/ciba.js
28264
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/ciba.js
28239
28265
  var ciba_exports = /* @__PURE__ */ __exportAll({
28240
28266
  grantType: () => grantType$1,
28241
28267
  gty: () => gty$1,
@@ -28252,7 +28278,7 @@ const handler$1 = async function cibaHandler(provider, helpers, ctx) {
28252
28278
  checkDpopRequired(ctx, dPoP);
28253
28279
  if (request.isExpired) throw new ExpiredToken("backchannel authentication request is expired");
28254
28280
  if (!request.grantId && !request.error) throw new AuthorizationPending();
28255
- if (ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") await checkAttestBinding(ctx, request);
28281
+ if (["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) await checkAttestBinding(ctx, request);
28256
28282
  await consumeGrantSource(ctx, request, "backchannel authentication request");
28257
28283
  throwIfAsyncGrantError(request);
28258
28284
  const grant = await validateGrant(ctx, request.grantId);
@@ -28268,7 +28294,7 @@ const handler$1 = async function cibaHandler(provider, helpers, ctx) {
28268
28294
  const parameters$1 = /* @__PURE__ */ new Set(["auth_req_id"]);
28269
28295
  const grantType$1 = "urn:openid:params:grant-type:ciba";
28270
28296
  //#endregion
28271
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/pre_authorized_code.js
28297
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/pre_authorized_code.js
28272
28298
  var pre_authorized_code_exports = /* @__PURE__ */ __exportAll({
28273
28299
  grantType: () => grantType,
28274
28300
  gty: () => gty,
@@ -28304,7 +28330,7 @@ const handler = async function preAuthorizedCodeHandler(provider, helpers, ctx)
28304
28330
  const parameters = /* @__PURE__ */ new Set(["pre-authorized_code", "tx_code"]);
28305
28331
  const grantType = "urn:ietf:params:oauth:grant-type:pre-authorized_code";
28306
28332
  //#endregion
28307
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/index.js
28333
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/grants/index.js
28308
28334
  var grants_exports$1 = /* @__PURE__ */ __exportAll({
28309
28335
  authorization_code: () => authorization_code_exports,
28310
28336
  ciba: () => ciba_exports,
@@ -28314,7 +28340,7 @@ var grants_exports$1 = /* @__PURE__ */ __exportAll({
28314
28340
  refresh_token: () => refresh_token_exports
28315
28341
  });
28316
28342
  //#endregion
28317
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/script_src_sha.js
28343
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/script_src_sha.js
28318
28344
  function pushScriptSrcSha(ctx, script) {
28319
28345
  const csp = ctx.response.get("content-security-policy");
28320
28346
  if (csp) {
@@ -28333,7 +28359,7 @@ function pushScriptSrcSha(ctx, script) {
28333
28359
  return script;
28334
28360
  }
28335
28361
  //#endregion
28336
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/form_post.js
28362
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/form_post.js
28337
28363
  const statusCodes$1 = /* @__PURE__ */ new Set([
28338
28364
  200,
28339
28365
  400,
@@ -28364,7 +28390,7 @@ function formPost(ctx, action, inputs) {
28364
28390
  </html>`;
28365
28391
  }
28366
28392
  //#endregion
28367
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/redirect_uri.js
28393
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/redirect_uri.js
28368
28394
  function redirectUri(uri, payload, mode) {
28369
28395
  const parsed = new URL(uri);
28370
28396
  switch (mode) {
@@ -28376,21 +28402,21 @@ function redirectUri(uri, payload, mode) {
28376
28402
  return parsed.href;
28377
28403
  }
28378
28404
  //#endregion
28379
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/fragment.js
28405
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/fragment.js
28380
28406
  var fragment_default = (ctx, redirectUri$2, payload) => {
28381
28407
  const uri = redirectUri(redirectUri$2, payload, "fragment");
28382
28408
  ctx.status = 303;
28383
28409
  ctx.redirect(uri);
28384
28410
  };
28385
28411
  //#endregion
28386
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/query.js
28412
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/query.js
28387
28413
  var query_default = (ctx, redirectUri$1, payload) => {
28388
28414
  const uri = redirectUri(redirectUri$1, payload, "query");
28389
28415
  ctx.status = 303;
28390
28416
  ctx.redirect(uri);
28391
28417
  };
28392
28418
  //#endregion
28393
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/web_message.js
28419
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/web_message.js
28394
28420
  const statusCodes = /* @__PURE__ */ new Set([
28395
28421
  200,
28396
28422
  400,
@@ -28438,7 +28464,7 @@ function webMessage(ctx, redirectUri, response) {
28438
28464
  </html>`;
28439
28465
  }
28440
28466
  //#endregion
28441
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/jwt.js
28467
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/response_modes/jwt.js
28442
28468
  const modes = {
28443
28469
  query: query_default,
28444
28470
  fragment: fragment_default,
@@ -29277,7 +29303,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29277
29303
  else module.exports = require_node();
29278
29304
  }));
29279
29305
  //#endregion
29280
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/user_code_form.js
29306
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/user_code_form.js
29281
29307
  var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
29282
29308
  function input(action, csrfToken, code, charset) {
29283
29309
  const attributes = charset === "digits" ? "pattern=\"[0-9]*\" inputmode=\"numeric\" " : "";
@@ -29295,7 +29321,7 @@ function confirm$1(action, csrfToken, code) {
29295
29321
  </form>`;
29296
29322
  }
29297
29323
  //#endregion
29298
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/re_render_errors.js
29324
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/re_render_errors.js
29299
29325
  var ReRenderError = class extends Error {
29300
29326
  constructor(message, userCode, options = void 0) {
29301
29327
  super(message, options);
@@ -29334,7 +29360,7 @@ var NoCodeError = class extends ReRenderError {
29334
29360
  }
29335
29361
  };
29336
29362
  //#endregion
29337
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/err_out.js
29363
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/err_out.js
29338
29364
  var err_out_default = ({ expose, message, error_description: description, scope }, state) => {
29339
29365
  if (expose) return {
29340
29366
  error: message,
@@ -29349,7 +29375,7 @@ var err_out_default = ({ expose, message, error_description: description, scope
29349
29375
  };
29350
29376
  };
29351
29377
  //#endregion
29352
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/xsrf.js
29378
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/xsrf.js
29353
29379
  function generateXsrf(ctx, next) {
29354
29380
  const secret = crypto$2.randomBytes(24).toString("hex");
29355
29381
  ctx.oidc.session.state = { secret };
@@ -29363,7 +29389,7 @@ function checkXsrf(missingMessage) {
29363
29389
  };
29364
29390
  }
29365
29391
  //#endregion
29366
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/error_handler.js
29392
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/error_handler.js
29367
29393
  const debugError$1 = (0, import_src.default)("oidc-provider:error");
29368
29394
  const serverError$1 = (0, import_src.default)("oidc-provider:server_error");
29369
29395
  const serverErrorTrace$1 = (0, import_src.default)("oidc-provider:server_error:trace");
@@ -29397,7 +29423,7 @@ function getErrorHandler(eventName) {
29397
29423
  };
29398
29424
  }
29399
29425
  //#endregion
29400
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/omit_by.js
29426
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/omit_by.js
29401
29427
  var omit_by_default = (object, predicate) => {
29402
29428
  Object.entries(object).forEach(([key, value]) => {
29403
29429
  if (predicate(value, key)) delete object[key];
@@ -29405,7 +29431,7 @@ var omit_by_default = (object, predicate) => {
29405
29431
  return object;
29406
29432
  };
29407
29433
  //#endregion
29408
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/resolve_response_mode.js
29434
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/resolve_response_mode.js
29409
29435
  function resolve$1(responseType) {
29410
29436
  return typeof responseType === "string" && responseType.includes("token") ? "fragment" : "query";
29411
29437
  }
@@ -29413,7 +29439,7 @@ function isFrontChannel(responseType) {
29413
29439
  return resolve$1(responseType) === "fragment";
29414
29440
  }
29415
29441
  //#endregion
29416
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/response_parameters.js
29442
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/response_parameters.js
29417
29443
  function checkResponseMode(ctx, next) {
29418
29444
  const { params, client } = ctx.oidc;
29419
29445
  const frontChannel = isFrontChannel(params.response_type);
@@ -29488,7 +29514,7 @@ function oidcRequired(ctx, next) {
29488
29514
  return next();
29489
29515
  }
29490
29516
  //#endregion
29491
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/authorization_error_handler.js
29517
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/authorization_error_handler.js
29492
29518
  const debugError = (0, import_src.default)("oidc-provider:authentication:error");
29493
29519
  const serverError = (0, import_src.default)("oidc-provider:server_error");
29494
29520
  const serverErrorTrace = (0, import_src.default)("oidc-provider:server_error:trace");
@@ -29550,7 +29576,7 @@ async function authorizationErrorHandler(ctx, next) {
29550
29576
  }
29551
29577
  }
29552
29578
  //#endregion
29553
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/params.js
29579
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/params.js
29554
29580
  var Params = class {
29555
29581
  constructor(allowList, params) {
29556
29582
  strict(allowList, "allowList must be present");
@@ -29563,14 +29589,14 @@ var Params = class {
29563
29589
  }
29564
29590
  };
29565
29591
  //#endregion
29566
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/assemble_params.js
29592
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/assemble_params.js
29567
29593
  function assembleParams(allowList, ctx, next) {
29568
29594
  const params = ctx.method === "POST" ? ctx.oidc.body : ctx.query;
29569
29595
  ctx.oidc.params = new Params(allowList, params);
29570
29596
  return next();
29571
29597
  }
29572
29598
  //#endregion
29573
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/session.js
29599
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/session.js
29574
29600
  async function sessionHandler(ctx, next) {
29575
29601
  ctx.oidc.session = new Proxy(await ctx.oidc.provider.Session.get(ctx), { set(obj, prop, value) {
29576
29602
  switch (prop) {
@@ -29624,7 +29650,7 @@ async function sessionHandler(ctx, next) {
29624
29650
  }
29625
29651
  }
29626
29652
  //#endregion
29627
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/normalize_authorization_details.js
29653
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/normalize_authorization_details.js
29628
29654
  const ARRAY_FIELDS = [
29629
29655
  "locations",
29630
29656
  "actions",
@@ -29645,7 +29671,7 @@ function normalizeAuthorizationDetails(details, { ErrorConstructor = TypeError,
29645
29671
  return details;
29646
29672
  }
29647
29673
  //#endregion
29648
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/check_rar.js
29674
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/check_rar.js
29649
29675
  async function checkRar(ctx, next) {
29650
29676
  const { params, client } = ctx.oidc;
29651
29677
  if (params.authorization_details !== void 0) {
@@ -29679,7 +29705,7 @@ async function checkRar(ctx, next) {
29679
29705
  return next();
29680
29706
  }
29681
29707
  //#endregion
29682
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/check_resource.js
29708
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/check_resource.js
29683
29709
  const filterStatics = (ctx) => {
29684
29710
  if (ctx.oidc.params.scope && !ctx.oidc.params.resource) ctx.oidc.params.scope = [...ctx.oidc.requestParamOIDCScopes].join(" ");
29685
29711
  };
@@ -29719,13 +29745,13 @@ async function checkResource(ctx, next) {
29719
29745
  return next();
29720
29746
  }
29721
29747
  //#endregion
29722
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/append_www_authenticate.js
29748
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/append_www_authenticate.js
29723
29749
  function appendWWWAuthenticate(ctx, scheme, fields) {
29724
29750
  const parameters = Object.entries(omit_by_default(fields, (v) => v === void 0)).map(([key, val]) => `${key}="${val.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`).join(", ");
29725
29751
  ctx.append("WWW-Authenticate", `${scheme} ${parameters}`);
29726
29752
  }
29727
29753
  //#endregion
29728
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/jwt.js
29754
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/jwt.js
29729
29755
  const { JWEDecryptionFailed, JWKSNoMatchingKey, JWSSignatureVerificationFailed } = errors_exports$1;
29730
29756
  function verifyAudience({ aud }, expected) {
29731
29757
  if (Array.isArray(aud)) {
@@ -29849,15 +29875,14 @@ async function decrypt(jwe, keystore) {
29849
29875
  return Buffer.from(decrypted.plaintext);
29850
29876
  }
29851
29877
  //#endregion
29852
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/attest_client_auth.js
29878
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/attest_client_auth.js
29853
29879
  function invalid(ErrorClass, options) {
29854
29880
  if (ErrorClass === InvalidClientAuth) return new ErrorClass(options);
29855
29881
  return new ErrorClass(void 0, options);
29856
29882
  }
29857
29883
  async function validateClientAttestationJwtAndPop(ctx, { signal = false } = {}) {
29858
- const { configuration: { clockTolerance, features: { attestClientAuth }, attestSigningAlgValues }, AttestChallenges } = get$2(ctx.oidc.provider);
29884
+ const { configuration: { clockTolerance, features: { attestClientAuth, dPoP: dPoPConfig }, attestSigningAlgValues }, AttestChallenges, DPoPNonces } = get$2(ctx.oidc.provider);
29859
29885
  const ErrorClass = signal ? InvalidClientAttestation : InvalidClientAuth;
29860
- const nextChallenge = AttestChallenges.nextChallenge();
29861
29886
  const attestation = ctx.get("oauth-client-attestation");
29862
29887
  if (!attestation) throw invalid(ErrorClass, "oauth-client-attestation missing");
29863
29888
  let verifiedAttestation;
@@ -29869,6 +29894,7 @@ async function validateClientAttestationJwtAndPop(ctx, { signal = false } = {})
29869
29894
  algorithms: attestSigningAlgValues,
29870
29895
  requiredClaims: [
29871
29896
  "sub",
29897
+ "iat",
29872
29898
  "exp",
29873
29899
  "cnf"
29874
29900
  ],
@@ -29882,9 +29908,27 @@ async function validateClientAttestationJwtAndPop(ctx, { signal = false } = {})
29882
29908
  throw invalid(ErrorClass, { cause });
29883
29909
  }
29884
29910
  const pop = ctx.get("oauth-client-attestation-pop");
29885
- if (!pop) throw invalid(ErrorClass, "oauth-client-attestation-pop missing");
29911
+ const combined = ctx.headers["oauth-client-attestation-pop"] === void 0 && ctx.headers.dpop !== void 0;
29912
+ if (!pop && !combined) throw invalid(ErrorClass, "oauth-client-attestation-pop missing");
29886
29913
  let verifiedPoP;
29887
- try {
29914
+ let dPoP;
29915
+ if (combined) {
29916
+ if (!dPoPConfig.enabled) throw invalid(ErrorClass, "DPoP combined mode is not supported");
29917
+ dPoP = await validateDpop(ctx.oidc.provider, ctx);
29918
+ if (!dPoP) throw invalid(ErrorClass, "DPoP proof missing");
29919
+ verifiedPoP = getDpopJwt(ctx.oidc.provider, ctx);
29920
+ if (!verifiedPoP.payload.nonce) {
29921
+ ctx.set("dpop-nonce", DPoPNonces.nextChallenge());
29922
+ throw new UseDpopNonce("nonce is required in the DPoP proof");
29923
+ }
29924
+ let thumbprint;
29925
+ try {
29926
+ thumbprint = await calculateJwkThumbprint(verifiedAttestation.payload.cnf.jwk);
29927
+ } catch (cause) {
29928
+ throw invalid(ErrorClass, { cause });
29929
+ }
29930
+ if (thumbprint !== dPoP.thumbprint) throw invalid(ErrorClass, "DPoP proof key does not match the Client Attestation key");
29931
+ } else try {
29888
29932
  verifiedPoP = await jwtVerify(pop, async (header) => importJWK(verifiedAttestation.payload.cnf.jwk, header.alg), {
29889
29933
  algorithms: attestSigningAlgValues,
29890
29934
  requiredClaims: [
@@ -29902,7 +29946,18 @@ async function validateClientAttestationJwtAndPop(ctx, { signal = false } = {})
29902
29946
  throw invalid(ErrorClass, { cause });
29903
29947
  }
29904
29948
  await attestClientAuth.assertAttestationJwtAndPop(ctx, verifiedAttestation, verifiedPoP, ctx.oidc.client);
29949
+ if (combined) {
29950
+ ctx.oidc.clientAttestation = {
29951
+ method: "dpop_combined",
29952
+ signal,
29953
+ attestation: verifiedAttestation,
29954
+ pop: verifiedPoP
29955
+ };
29956
+ await checkDpopReplay(ctx.oidc.provider, ctx, dPoP, ctx.oidc.client.clientId, InvalidDpopProof);
29957
+ return;
29958
+ }
29905
29959
  if (!await ctx.oidc.provider.ReplayDetection.unique(ctx.oidc.client.clientId, verifiedPoP.payload.jti, epoch_time_default() + 300)) throw invalid(ErrorClass, "oauth-client-attestation-pop tokens must only be used once");
29960
+ const nextChallenge = AttestChallenges.nextChallenge();
29906
29961
  if (typeof verifiedPoP.payload.challenge !== "string" || !AttestChallenges.checkChallenge(verifiedPoP.payload.challenge)) {
29907
29962
  ctx.set("oauth-client-attestation-challenge", nextChallenge);
29908
29963
  throw new UseAttestationChallenge();
@@ -29919,7 +29974,7 @@ function attestationClientAuth(ctx) {
29919
29974
  return validateClientAttestationJwtAndPop(ctx);
29920
29975
  }
29921
29976
  //#endregion
29922
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/jwt_client_auth.js
29977
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/jwt_client_auth.js
29923
29978
  async function jwtClientAuth(ctx, keystore, filter) {
29924
29979
  const { clockTolerance, assertJwtClientAuthClaimsAndHeader, clientAuthSigningAlgValues } = get$2(ctx.oidc.provider).configuration;
29925
29980
  const acceptedAud = ctx.oidc.clientJwtAuthExpectedAudience();
@@ -29953,7 +30008,7 @@ async function jwtClientAuth(ctx, keystore, filter) {
29953
30008
  if (!await ctx.oidc.provider.ReplayDetection.unique(payload.iss, payload.jti, payload.exp + clockTolerance)) throw new InvalidClientAuth("client assertion tokens must only be used once");
29954
30009
  }
29955
30010
  //#endregion
29956
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/reject_dupes.js
30011
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/reject_dupes.js
29957
30012
  function rejectDupes({ except, only } = {}, ctx, next) {
29958
30013
  const params = [];
29959
30014
  for (const [key, value] of Object.entries(ctx.oidc.params)) {
@@ -29966,7 +30021,7 @@ function rejectDupes({ except, only } = {}, ctx, next) {
29966
30021
  return next();
29967
30022
  }
29968
30023
  //#endregion
29969
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/client_auth.js
30024
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/client_auth.js
29970
30025
  const assertionType = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
29971
30026
  function isValidBase64(input) {
29972
30027
  const match = /^([A-Za-z0-9+/]*)(={0,2})$/u.exec(input);
@@ -30023,6 +30078,7 @@ async function authenticateClient(ctx, next) {
30023
30078
  };
30024
30079
  const hasAttestation = ctx.headers["oauth-client-attestation"] !== void 0;
30025
30080
  const hasAttestationPop = ctx.headers["oauth-client-attestation-pop"] !== void 0;
30081
+ const attestationAuthMethod = !hasAttestationPop && ctx.headers.dpop !== void 0 ? "attest_jwt_client_auth_dpop" : "attest_jwt_client_auth";
30026
30082
  const { additionalSecuritySignal } = features.attestClientAuth;
30027
30083
  const { length } = [
30028
30084
  ctx.headers.authorization,
@@ -30052,7 +30108,7 @@ async function authenticateClient(ctx, next) {
30052
30108
  setClientId(basicClientId);
30053
30109
  if (!clientSecret) throw new InvalidRequest("client_secret must be provided in the Authorization header");
30054
30110
  methods = ["client_secret_basic", "client_secret_post"];
30055
- } else if (hasAttestation && (!clientId || !additionalSecuritySignal)) {
30111
+ } else if (hasAttestation && ctx.oidc.params.client_assertion === void 0 && (!clientId || !additionalSecuritySignal)) {
30056
30112
  let sub;
30057
30113
  try {
30058
30114
  ({sub} = payload(ctx.headers["oauth-client-attestation"]));
@@ -30061,7 +30117,7 @@ async function authenticateClient(ctx, next) {
30061
30117
  }
30062
30118
  if (!sub) throw new InvalidClientAuth("sub (JWT subject) must be provided in the OAuth-Client-Attestation JWT");
30063
30119
  setClientId(sub);
30064
- methods = ["attest_jwt_client_auth"];
30120
+ methods = [attestationAuthMethod];
30065
30121
  } else if (ctx.oidc.params.client_assertion !== void 0) {
30066
30122
  let sub;
30067
30123
  try {
@@ -30080,13 +30136,13 @@ async function authenticateClient(ctx, next) {
30080
30136
  "tls_client_auth",
30081
30137
  "self_signed_tls_client_auth"
30082
30138
  ];
30083
- if (hasAttestation && additionalSecuritySignal) methods.push("attest_jwt_client_auth");
30139
+ if (hasAttestation && additionalSecuritySignal) methods.push(attestationAuthMethod);
30084
30140
  }
30085
30141
  if (!clientId) throw new InvalidRequest("no client authentication mechanism provided");
30086
30142
  const client = await provider.Client.find(clientId);
30087
30143
  if (!client) throw new InvalidClientAuth("client not found");
30088
30144
  ctx.oidc.entity("Client", client);
30089
- if ((hasAttestation || hasAttestationPop) && !additionalSecuritySignal && ctx.oidc.params.client_id !== void 0 && ctx.oidc.client.clientAuthMethod !== "attest_jwt_client_auth") throw new InvalidRequest("client authentication must only be provided using one mechanism");
30145
+ if ((hasAttestation || hasAttestationPop) && !additionalSecuritySignal && ctx.oidc.params.client_id !== void 0 && !["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) throw new InvalidRequest("client authentication must only be provided using one mechanism");
30090
30146
  if (methods?.includes(ctx.oidc.client.clientAuthMethod) !== true) throw new InvalidClientAuth("the provided authentication mechanism does not match the registered client authentication method");
30091
30147
  switch (ctx.oidc.client.clientAuthMethod) {
30092
30148
  case "none": break;
@@ -30130,9 +30186,10 @@ async function authenticateClient(ctx, next) {
30130
30186
  if (![...ctx.oidc.client.asymmetricKeyStore].find(({ "x5t#S256": actual }) => actual === expected)) throw new InvalidClientAuth("unregistered client certificate provided");
30131
30187
  break;
30132
30188
  }
30133
- case "attest_jwt_client_auth": await attestationClientAuth(ctx);
30189
+ case "attest_jwt_client_auth":
30190
+ case "attest_jwt_client_auth_dpop": await attestationClientAuth(ctx);
30134
30191
  }
30135
- if (ctx.oidc.client.clientAuthMethod !== "attest_jwt_client_auth" && (additionalSecuritySignal === "required" || additionalSecuritySignal === "optional" && (hasAttestation || hasAttestationPop))) await validateClientAttestationJwtAndPop(ctx, { signal: true });
30192
+ if (!["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod) && (additionalSecuritySignal === "required" || additionalSecuritySignal === "optional" && (hasAttestation || hasAttestationPop))) await validateClientAttestationJwtAndPop(ctx, { signal: true });
30136
30193
  await next();
30137
30194
  }
30138
30195
  var client_auth_default = [
@@ -30141,10 +30198,10 @@ var client_auth_default = [
30141
30198
  authenticateClient
30142
30199
  ];
30143
30200
  //#endregion
30144
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/is_json_object.js
30201
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/is_json_object.js
30145
30202
  var is_json_object_default = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
30146
30203
  //#endregion
30147
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/request_parameters.js
30204
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/request_parameters.js
30148
30205
  const requestParams = /* @__PURE__ */ new WeakMap();
30149
30206
  const nonFrontchannelRoutes = /* @__PURE__ */ new Set([
30150
30207
  "device_authorization",
@@ -30252,7 +30309,7 @@ async function checkExtraParams(ctx, next) {
30252
30309
  return next();
30253
30310
  }
30254
30311
  //#endregion
30255
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/process_request_object.js
30312
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/process_request_object.js
30256
30313
  async function processRequestObject(ctx, next) {
30257
30314
  const PARAM_LIST = getAuthorizationParams(ctx);
30258
30315
  const { params, client, route } = ctx.oidc;
@@ -30365,7 +30422,7 @@ function stripOutsideJarParams(ctx, next) {
30365
30422
  return next();
30366
30423
  }
30367
30424
  //#endregion
30368
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/interactions.js
30425
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/interactions.js
30369
30426
  const errorMap$1 = { ...errors_exports };
30370
30427
  async function interactions(ctx, next) {
30371
30428
  const { oidc } = ctx;
@@ -30460,7 +30517,7 @@ function interactionEmit(ctx, next) {
30460
30517
  return next();
30461
30518
  }
30462
30519
  //#endregion
30463
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/combined_scope.js
30520
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/combined_scope.js
30464
30521
  var combined_scope_default = (grant, requestParamScopes, resourceServers) => {
30465
30522
  const combinedScope = /* @__PURE__ */ new Set();
30466
30523
  grant.getOIDCScopeFiltered(requestParamScopes).split(" ").filter(Boolean).forEach(Set.prototype.add.bind(combinedScope));
@@ -30468,7 +30525,7 @@ var combined_scope_default = (grant, requestParamScopes, resourceServers) => {
30468
30525
  return combinedScope;
30469
30526
  };
30470
30527
  //#endregion
30471
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/process_response_types.js
30528
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/process_response_types.js
30472
30529
  async function tokenHandler(ctx) {
30473
30530
  const { accountId } = ctx.oidc.session;
30474
30531
  const token = new ctx.oidc.provider.AccessToken({
@@ -30579,7 +30636,7 @@ async function processResponseTypes(ctx) {
30579
30636
  return response;
30580
30637
  }
30581
30638
  //#endregion
30582
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/respond.js
30639
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/respond.js
30583
30640
  async function respond(ctx) {
30584
30641
  let pushedAuthorizationRequest = ctx.oidc.entities.PushedAuthorizationRequest;
30585
30642
  if (!pushedAuthorizationRequest && ctx.oidc.entities.Interaction?.parJti) pushedAuthorizationRequest = await ctx.oidc.provider.PushedAuthorizationRequest.find(ctx.oidc.entities.Interaction.parJti, { ignoreExpiration: true });
@@ -30594,7 +30651,7 @@ async function respond(ctx) {
30594
30651
  await get$2(ctx.oidc.provider).responseModes.get(responseMode)(ctx, params.redirect_uri, omit_by_default(out, (value) => value === void 0));
30595
30652
  }
30596
30653
  //#endregion
30597
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/resume.js
30654
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/resume.js
30598
30655
  const errorMap = { ...errors_exports };
30599
30656
  async function resumeAction(ctx, next) {
30600
30657
  const resumeRouteName = ctx.oidc.route === "device_resume" ? "device_resume" : "resume";
@@ -30654,7 +30711,7 @@ async function resumeAction(ctx, next) {
30654
30711
  await next();
30655
30712
  }
30656
30713
  //#endregion
30657
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/client.js
30714
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/client.js
30658
30715
  function deviceAuthorizationResponse$1(ctx, next) {
30659
30716
  if (!ctx.oidc.body.client_id) ctx.oidc.body.client_id = ctx.oidc.client.clientId;
30660
30717
  return next();
@@ -30684,7 +30741,7 @@ function checkClientGrantType({ oidc: { route, client } }, next) {
30684
30741
  return next();
30685
30742
  }
30686
30743
  //#endregion
30687
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/pushed_authorization_requests.js
30744
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/pushed_authorization_requests.js
30688
30745
  async function loadPushedAuthorizationRequest(ctx, next) {
30689
30746
  const { pushedAuthorizationRequests } = get$2(ctx.oidc.provider).features;
30690
30747
  const { params, provider: { PushedAuthorizationRequest } } = ctx.oidc;
@@ -30735,7 +30792,7 @@ async function pushedAuthorizationRequestResponse(ctx) {
30735
30792
  dpopJkt,
30736
30793
  trusted: ctx.oidc.client.clientAuthMethod !== "none" || !!ctx.oidc.trusted?.length
30737
30794
  });
30738
- if (ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") await requestObject.setAttestBinding(ctx);
30795
+ if (["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) await requestObject.setAttestBinding(ctx);
30739
30796
  const id = await requestObject.save(ttl);
30740
30797
  ctx.oidc.entity("PushedAuthorizationRequest", requestObject);
30741
30798
  ctx.status = 201;
@@ -30750,7 +30807,7 @@ function rejectRequestAndUri(ctx, next) {
30750
30807
  return next();
30751
30808
  }
30752
30809
  //#endregion
30753
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/claims.js
30810
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/claims.js
30754
30811
  async function checkClaims(ctx, next) {
30755
30812
  const { params } = ctx.oidc;
30756
30813
  if (params.claims !== void 0) {
@@ -30805,7 +30862,7 @@ async function checkIdTokenHint(ctx, next) {
30805
30862
  return next();
30806
30863
  }
30807
30864
  //#endregion
30808
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/ciba.js
30865
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/ciba.js
30809
30866
  const CLIENT_NOTIFICATION_TOKEN = /^[A-Za-z0-9._~+\x2F-]+=*$/u;
30810
30867
  function cibaRequired(ctx, next) {
30811
30868
  const required = /* @__PURE__ */ new Set(["scope"]);
@@ -30877,7 +30934,7 @@ async function backchannelRequestResponse(ctx) {
30877
30934
  resource: Object.keys(ctx.oidc.resourceServers),
30878
30935
  scope: [...ctx.oidc.requestParamScopes].join(" ")
30879
30936
  });
30880
- if (ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") await request.setAttestBinding(ctx);
30937
+ if (["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) await request.setAttestBinding(ctx);
30881
30938
  switch (request.resource.length) {
30882
30939
  case 0:
30883
30940
  delete request.resource;
@@ -30902,13 +30959,13 @@ async function requestObjectRemapErrors(_ctx, next) {
30902
30959
  });
30903
30960
  }
30904
30961
  //#endregion
30905
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/is_valid_scope.js
30962
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/is_valid_scope.js
30906
30963
  const SCOPE_SYNTAX = /^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/u;
30907
30964
  function isValidScope(scope) {
30908
30965
  return scope === void 0 || typeof scope === "string" && SCOPE_SYNTAX.test(scope);
30909
30966
  }
30910
30967
  //#endregion
30911
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/scopes.js
30968
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/scopes.js
30912
30969
  async function checkScope(ctx, next) {
30913
30970
  const PARAM_LIST = getAuthorizationParams(ctx);
30914
30971
  const { scopes: statics } = get$2(ctx.oidc.provider).configuration;
@@ -30954,7 +31011,7 @@ function checkOpenIdScope(ctx, next) {
30954
31011
  return next();
30955
31012
  }
30956
31013
  //#endregion
30957
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/session.js
31014
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/session.js
30958
31015
  async function loadAccount(ctx, next) {
30959
31016
  const { accountId } = ctx.oidc.session;
30960
31017
  if (accountId) {
@@ -30981,7 +31038,7 @@ async function loadGrant(ctx, next) {
30981
31038
  return next();
30982
31039
  }
30983
31040
  //#endregion
30984
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/sender_constraints.js
31041
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/sender_constraints.js
30985
31042
  function checkPKCE(ctx, next) {
30986
31043
  const { params } = ctx.oidc;
30987
31044
  const { pkce } = get$2(ctx.oidc.provider).configuration;
@@ -31009,7 +31066,7 @@ async function checkDpopJkt(ctx, next) {
31009
31066
  return next();
31010
31067
  }
31011
31068
  //#endregion
31012
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/user_codes.js
31069
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/user_codes.js
31013
31070
  const CHARSETS = {
31014
31071
  "base-20": "BCDFGHJKLMNPQRSTVWXZ",
31015
31072
  digits: "0123456789"
@@ -31034,7 +31091,7 @@ function normalize(input) {
31034
31091
  return input.replace(/[a-z]/g, (char) => char.toUpperCase()).replace(/\W/g, () => "");
31035
31092
  }
31036
31093
  //#endregion
31037
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/device.js
31094
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/device.js
31038
31095
  async function deviceUserFlow(ctx, next) {
31039
31096
  if (ctx.oidc.route === "device_resume") {
31040
31097
  const code = await ctx.oidc.provider.DeviceCode.find(ctx.oidc.entities.Interaction.deviceCode, {
@@ -31110,7 +31167,7 @@ async function deviceAuthorizationResponse(ctx) {
31110
31167
  params: ctx.oidc.params.toPlainObject(),
31111
31168
  userCode: normalize(userCode)
31112
31169
  });
31113
- if (ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") await dc.setAttestBinding(ctx);
31170
+ if (["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) await dc.setAttestBinding(ctx);
31114
31171
  ctx.oidc.entity("DeviceCode", dc);
31115
31172
  ctx.body = {
31116
31173
  device_code: await dc.save(),
@@ -31122,7 +31179,7 @@ async function deviceAuthorizationResponse(ctx) {
31122
31179
  ctx.oidc.provider.emit("device_authorization.success", ctx, ctx.body);
31123
31180
  }
31124
31181
  //#endregion
31125
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/index.js
31182
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/authorization/index.js
31126
31183
  const A = "authorization";
31127
31184
  const R = "resume";
31128
31185
  const DA = "device_authorization";
@@ -31213,7 +31270,7 @@ function authorizationAction(endpoint) {
31213
31270
  return stack;
31214
31271
  }
31215
31272
  //#endregion
31216
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/oidc_context.js
31273
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/oidc_context.js
31217
31274
  const COOKIES = Symbol();
31218
31275
  var NoAccessTokenProvided = class extends InvalidToken {
31219
31276
  constructor() {
@@ -31377,7 +31434,7 @@ function getContext(provider) {
31377
31434
  return OIDCContext;
31378
31435
  }
31379
31436
  //#endregion
31380
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/set_www_authenticate_header.js
31437
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/set_www_authenticate_header.js
31381
31438
  function getSetWWWAuthenticateHeader({ tokenProperty = "accessToken", includeScope = true, dpop } = {}) {
31382
31439
  return async function setWWWAuthenticateHeader(ctx, next) {
31383
31440
  try {
@@ -31417,7 +31474,7 @@ function getSetWWWAuthenticateHeader({ tokenProperty = "accessToken", includeSco
31417
31474
  };
31418
31475
  }
31419
31476
  //#endregion
31420
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/access_token.js
31477
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/access_token.js
31421
31478
  function getValidateAccessToken({ afterFind } = {}) {
31422
31479
  return async function validateAccessToken(ctx, next) {
31423
31480
  const value = ctx.oidc.getAccessToken({ acceptDPoP: true });
@@ -31459,7 +31516,7 @@ async function loadAccessTokenGrant(ctx, next) {
31459
31516
  await next();
31460
31517
  }
31461
31518
  //#endregion
31462
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/userinfo.js
31519
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/userinfo.js
31463
31520
  const PARAM_LIST$1 = /* @__PURE__ */ new Set(["scope", "access_token"]);
31464
31521
  const validateAccessToken$1 = getValidateAccessToken({ afterFind(_ctx, accessToken) {
31465
31522
  if (!accessToken.scopes.size || !accessToken.scopes.has("openid")) throw new InsufficientScope("access token missing openid scope", "openid");
@@ -31512,7 +31569,7 @@ var userinfo_default = [
31512
31569
  }
31513
31570
  ];
31514
31571
  //#endregion
31515
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/token.js
31572
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/token.js
31516
31573
  const grantTypeSet = /* @__PURE__ */ new Set(["grant_type"]);
31517
31574
  var token_default = [
31518
31575
  noCache,
@@ -31570,14 +31627,14 @@ var token_default = [
31570
31627
  }
31571
31628
  ];
31572
31629
  //#endregion
31573
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/jwks.js
31630
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/jwks.js
31574
31631
  function renderJWKS(ctx) {
31575
31632
  const { keys } = get$2(ctx.oidc.provider).jwks;
31576
31633
  ctx.body = { keys };
31577
31634
  ctx.type = "application/jwk-set+json; charset=utf-8";
31578
31635
  }
31579
31636
  //#endregion
31580
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/fetch_body_check.js
31637
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/fetch_body_check.js
31581
31638
  async function fetchBodyCheck(provider, purpose, response) {
31582
31639
  const limit = get$2(provider).configuration.fetchResponseBodyLimits[purpose];
31583
31640
  if (!Number.isFinite(limit)) return Buffer.from(await response.arrayBuffer());
@@ -31599,7 +31656,7 @@ async function fetchBodyCheck(provider, purpose, response) {
31599
31656
  return Buffer.concat(chunks);
31600
31657
  }
31601
31658
  //#endregion
31602
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/fetch_request.js
31659
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/fetch_request.js
31603
31660
  const SPECIAL_USE_IPV4 = [
31604
31661
  {
31605
31662
  prefix: 0,
@@ -31808,7 +31865,7 @@ async function fetchRequest(provider, url, options) {
31808
31865
  return get$2(provider).configuration.fetch(url, options);
31809
31866
  }
31810
31867
  //#endregion
31811
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/sector_validate.js
31868
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/sector_validate.js
31812
31869
  async function sectorValidate(provider, client) {
31813
31870
  if (!boolean(get$2(provider).configuration.sectorIdentifierUriValidate(client), "sectorIdentifierUriValidate")) return;
31814
31871
  const response = await fetchRequest(provider, new URL(client.sectorIdentifierUri).href, {
@@ -31843,7 +31900,7 @@ async function sectorValidate(provider, client) {
31843
31900
  }
31844
31901
  }
31845
31902
  //#endregion
31846
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/add_client.js
31903
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/add_client.js
31847
31904
  async function add(provider, metadata, { ctx, store, cimd } = {}) {
31848
31905
  const client = new provider.Client(metadata, ctx, { cimd });
31849
31906
  if (client.sectorIdentifierUri !== void 0) await sectorValidate(provider, client);
@@ -31851,7 +31908,7 @@ async function add(provider, metadata, { ctx, store, cimd } = {}) {
31851
31908
  return client;
31852
31909
  }
31853
31910
  //#endregion
31854
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/validate_json_body.js
31911
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/validate_json_body.js
31855
31912
  function getValidateJsonBody(ErrorClass, errorDescription) {
31856
31913
  return async function validateJsonBody(ctx, next) {
31857
31914
  if (ctx.oidc.body === null || typeof ctx.oidc.body !== "object" || Array.isArray(ctx.oidc.body)) throw new ErrorClass(errorDescription);
@@ -31859,7 +31916,7 @@ function getValidateJsonBody(ErrorClass, errorDescription) {
31859
31916
  };
31860
31917
  }
31861
31918
  //#endregion
31862
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/registration.js
31919
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/registration.js
31863
31920
  const setWWWAuthenticate = getSetWWWAuthenticateHeader({ dpop: false });
31864
31921
  const validateRegistrationBody = getValidateJsonBody(InvalidRequest, "client registration request must be a JSON object");
31865
31922
  const validateClientUpdateBody = getValidateJsonBody(InvalidRequest, "client update request must be a JSON object");
@@ -32037,7 +32094,7 @@ const del = [
32037
32094
  }
32038
32095
  ];
32039
32096
  //#endregion
32040
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/token_find.js
32097
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/token_find.js
32041
32098
  function getClientCredentials(provider, token) {
32042
32099
  if (!get$2(provider).grantTypeHandlers.has("client_credentials")) return;
32043
32100
  return provider.ClientCredentials.find(token);
@@ -32063,7 +32120,7 @@ async function findToken(provider, tokenValue, tokenTypeHint) {
32063
32120
  }
32064
32121
  }
32065
32122
  //#endregion
32066
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/reject_structured_tokens.js
32123
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/shared/reject_structured_tokens.js
32067
32124
  async function rejectStructuredTokens(ctx, next) {
32068
32125
  const { params } = ctx.oidc;
32069
32126
  let tokenIsJWT;
@@ -32074,7 +32131,7 @@ async function rejectStructuredTokens(ctx, next) {
32074
32131
  return next();
32075
32132
  }
32076
32133
  //#endregion
32077
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/revocation.js
32134
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/revocation.js
32078
32135
  const revokeable = /* @__PURE__ */ new Set([
32079
32136
  "AccessToken",
32080
32137
  "ClientCredentials",
@@ -32108,7 +32165,7 @@ var revocation_default = [
32108
32165
  if (!token) return;
32109
32166
  if (revokeable.has(token.kind)) ctx.oidc.entity(token.kind, token);
32110
32167
  else return;
32111
- if (token.kind === "RefreshToken" && ctx.oidc.client.clientId === token.clientId && ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") try {
32168
+ if (token.kind === "RefreshToken" && ctx.oidc.client.clientId === token.clientId && ["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) try {
32112
32169
  await checkAttestBinding(ctx, token);
32113
32170
  } catch {
32114
32171
  return;
@@ -32119,7 +32176,7 @@ var revocation_default = [
32119
32176
  }
32120
32177
  ];
32121
32178
  //#endregion
32122
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/introspection.js
32179
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/introspection.js
32123
32180
  const introspectable = /* @__PURE__ */ new Set([
32124
32181
  "AccessToken",
32125
32182
  "ClientCredentials",
@@ -32179,7 +32236,7 @@ var introspection_default = [
32179
32236
  }
32180
32237
  if (introspectable.has(token.kind)) ctx.oidc.entity(token.kind, token);
32181
32238
  else return;
32182
- if (token.kind === "RefreshToken" && ctx.oidc.client.clientId === token.clientId && ctx.oidc.client.clientAuthMethod === "attest_jwt_client_auth") try {
32239
+ if (token.kind === "RefreshToken" && ctx.oidc.client.clientId === token.clientId && ["attest_jwt_client_auth", "attest_jwt_client_auth_dpop"].includes(ctx.oidc.client.clientAuthMethod)) try {
32183
32240
  await checkAttestBinding(ctx, token);
32184
32241
  } catch {
32185
32242
  return;
@@ -32212,7 +32269,7 @@ var introspection_default = [
32212
32269
  }
32213
32270
  ];
32214
32271
  //#endregion
32215
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/defaults.js
32272
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/defaults.js
32216
32273
  function defaults(deep, target, ...sources) {
32217
32274
  for (const source of sources) {
32218
32275
  if (!is_plain_object_default(source)) continue;
@@ -32227,7 +32284,7 @@ function defaults(deep, target, ...sources) {
32227
32284
  var defaults_default = defaults.bind(void 0, false);
32228
32285
  const deep = defaults.bind(void 0, true);
32229
32286
  //#endregion
32230
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/discovery.js
32287
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/discovery.js
32231
32288
  function discovery(ctx) {
32232
32289
  const { configuration, features } = get$2(ctx.oidc.provider);
32233
32290
  ctx.body = {
@@ -32321,21 +32378,23 @@ function discovery(ctx) {
32321
32378
  }
32322
32379
  if (richAuthorizationRequests.enabled) ctx.body.authorization_details_types_supported = Object.keys(richAuthorizationRequests.types);
32323
32380
  if (features.attestClientAuth.enabled) {
32381
+ const popMethods = ["attestation_pop_jwt"];
32382
+ if (features.dPoP.enabled) popMethods.push("dpop_combined");
32324
32383
  ctx.body.challenge_endpoint = ctx.oidc.urlFor("challenge");
32325
32384
  ctx.body.client_attestation_signing_alg_values_supported = configuration.attestSigningAlgValues;
32326
32385
  ctx.body.client_attestation_pop_signing_alg_values_supported = configuration.attestSigningAlgValues;
32327
32386
  switch (features.attestClientAuth.additionalSecuritySignal) {
32328
32387
  case "optional":
32329
- ctx.body.client_attestation_pop_methods_supported = ["attestation_pop_jwt", "none"];
32388
+ ctx.body.client_attestation_pop_methods_supported = [...popMethods, "none"];
32330
32389
  break;
32331
- case "required": ctx.body.client_attestation_pop_methods_supported = ["attestation_pop_jwt"];
32390
+ case "required": ctx.body.client_attestation_pop_methods_supported = popMethods;
32332
32391
  }
32333
32392
  }
32334
32393
  if (features.clientIdMetadataDocument.enabled) ctx.body.client_id_metadata_document_supported = true;
32335
32394
  defaults_default(ctx.body, configuration.discovery);
32336
32395
  }
32337
32396
  //#endregion
32338
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/challenge.js
32397
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/challenge.js
32339
32398
  var challenge_default = [noCache, function challenge(ctx) {
32340
32399
  const { DPoPNonces, AttestChallenges, CNonceChallenges } = get$2(ctx.oidc.provider);
32341
32400
  ctx.body = {};
@@ -32350,7 +32409,7 @@ var challenge_default = [noCache, function challenge(ctx) {
32350
32409
  }
32351
32410
  }];
32352
32411
  //#endregion
32353
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/end_session.js
32412
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/end_session.js
32354
32413
  async function clientForLogout(ctx, clientId) {
32355
32414
  try {
32356
32415
  return await ctx.oidc.provider.Client.find(clientId);
@@ -32489,7 +32548,7 @@ const success = [
32489
32548
  }
32490
32549
  ];
32491
32550
  //#endregion
32492
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/code_verification.js
32551
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/code_verification.js
32493
32552
  const get = [
32494
32553
  sessionHandler,
32495
32554
  assembleParams.bind(void 0, /* @__PURE__ */ new Set(["user_code"])),
@@ -32551,7 +32610,7 @@ const post = [
32551
32610
  }
32552
32611
  ];
32553
32612
  //#endregion
32554
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/openid_credential_issuer.js
32613
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/openid_credential_issuer.js
32555
32614
  function openidCredentialIssuer(ctx) {
32556
32615
  const { openid4vci } = get$2(ctx.oidc.provider).configuration.features;
32557
32616
  const { credentialConfigurationsSupported } = openid4vci;
@@ -32564,7 +32623,7 @@ function openidCredentialIssuer(ctx) {
32564
32623
  defaults_default(ctx.body, openid4vci.metadata);
32565
32624
  }
32566
32625
  //#endregion
32567
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/credential.js
32626
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/actions/credential.js
32568
32627
  const PARAM_LIST = /* @__PURE__ */ new Set([
32569
32628
  "credential_identifier",
32570
32629
  "credential_configuration_id",
@@ -32888,10 +32947,10 @@ var credential_default = [
32888
32947
  }
32889
32948
  ];
32890
32949
  //#endregion
32891
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/als.js
32950
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/als.js
32892
32951
  var als_default = new AsyncLocalStorage();
32893
32952
  //#endregion
32894
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/sender_constraints.js
32953
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/sender_constraints.js
32895
32954
  function checkMtlsCert(provider, ctx, ErrorClass = InvalidGrant$1) {
32896
32955
  assertProviderContext(provider, ctx);
32897
32956
  if (ctx.oidc.client.tlsClientCertificateBoundAccessTokens) {
@@ -32905,7 +32964,7 @@ function checkDpopRequired(provider, ctx, dPoP, ErrorClass = InvalidGrant$1) {
32905
32964
  if (!dPoP && ctx.oidc.client.dpopBoundAccessTokens) throw new ErrorClass("DPoP proof JWT not provided");
32906
32965
  }
32907
32966
  //#endregion
32908
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_authorization.js
32967
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_authorization.js
32909
32968
  function validateClientScope(provider, ctx, scopes = ctx.oidc.requestParamScopes) {
32910
32969
  assertProviderContext(provider, ctx);
32911
32970
  if (typeof scopes === "string") scopes = new Set(scopes.split(" "));
@@ -32946,7 +33005,7 @@ async function applyAuthorizationDetails(provider, ctx, token, source) {
32946
33005
  }
32947
33006
  }
32948
33007
  //#endregion
32949
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_response.js
33008
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grant_response.js
32950
33009
  const reserved = /* @__PURE__ */ new Set([
32951
33010
  "access_token",
32952
33011
  "authorization_details",
@@ -32976,7 +33035,7 @@ function buildTokenResponse(provider, { accessToken, authorizationDetails, expir
32976
33035
  }).filter(([, value]) => value !== void 0));
32977
33036
  }
32978
33037
  //#endregion
32979
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grants.js
33038
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/grants.js
32980
33039
  var grants_exports = /* @__PURE__ */ __exportAll({
32981
33040
  applyAuthorizationDetails: () => applyAuthorizationDetails,
32982
33041
  applyRefreshTokenBindings: () => applyRefreshTokenBindings,
@@ -32995,13 +33054,13 @@ var grants_exports = /* @__PURE__ */ __exportAll({
32995
33054
  validateGrant: () => validateGrant
32996
33055
  });
32997
33056
  //#endregion
32998
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_app.js
33057
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_app.js
32999
33058
  const maxAge = 3600;
33000
33059
  function exposeHeaders({ dpop = true, attest = true, wwwAuth = true } = {}) {
33001
33060
  return (ctx) => {
33002
33061
  const { features } = get$2(ctx.oidc.provider);
33003
33062
  return [
33004
- dpop && features.dPoP.enabled && features.dPoP.nonceSecret ? "DPoP-Nonce" : void 0,
33063
+ (dpop || features.attestClientAuth.enabled) && features.dPoP.enabled && features.dPoP.nonceSecret ? "DPoP-Nonce" : void 0,
33005
33064
  attest && features.attestClientAuth.enabled ? "OAuth-Client-Attestation-Challenge" : void 0,
33006
33065
  wwwAuth ? "WWW-Authenticate" : void 0
33007
33066
  ].filter(Boolean);
@@ -33205,7 +33264,7 @@ function initializeApp() {
33205
33264
  return router.routes();
33206
33265
  }
33207
33266
  //#endregion
33208
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_clients.js
33267
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/initialize_clients.js
33209
33268
  function initializeClients(clients = []) {
33210
33269
  let staticClients;
33211
33270
  for (const metadata of clients) {
@@ -33217,7 +33276,7 @@ function initializeClients(clients = []) {
33217
33276
  if (staticClients) get$2(this).staticClients = staticClients;
33218
33277
  }
33219
33278
  //#endregion
33220
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/resource_server.js
33279
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/resource_server.js
33221
33280
  var ResourceServer = class {
33222
33281
  constructor(identifier, data) {
33223
33282
  this._identifier = identifier;
@@ -33235,7 +33294,7 @@ var ResourceServer = class {
33235
33294
  }
33236
33295
  };
33237
33296
  //#endregion
33238
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/valid_url.js
33297
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/valid_url.js
33239
33298
  function isHttpsUri(uri) {
33240
33299
  return URL.parse(uri)?.protocol === "https:";
33241
33300
  }
@@ -33244,7 +33303,7 @@ function isWebUri(uri) {
33244
33303
  return protocol === "https:" || protocol === "http:";
33245
33304
  }
33246
33305
  //#endregion
33247
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/claims.js
33306
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/claims.js
33248
33307
  function getClaims(provider) {
33249
33308
  const { claims: claimConfig, claimsSupported, pairwiseIdentifier } = get$2(provider).configuration;
33250
33309
  return class Claims {
@@ -33291,7 +33350,7 @@ function getClaims(provider) {
33291
33350
  };
33292
33351
  }
33293
33352
  //#endregion
33294
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/payload.js
33353
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/payload.js
33295
33354
  const cache$1 = /* @__PURE__ */ new WeakMap();
33296
33355
  function properties(Model) {
33297
33356
  let result = cache$1.get(Model);
@@ -33315,7 +33374,7 @@ function pick(Model, input) {
33315
33374
  return result;
33316
33375
  }
33317
33376
  //#endregion
33318
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/formats/opaque.js
33377
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/formats/opaque.js
33319
33378
  const withExtra = /* @__PURE__ */ new Set(["AccessToken", "ClientCredentials"]);
33320
33379
  const bitsPerSymbol = Math.log2(64);
33321
33380
  const tokenLength = (i) => Math.ceil(i / bitsPerSymbol);
@@ -33360,7 +33419,7 @@ async function verify(provider, stored, { ignoreExpiration } = {}) {
33360
33419
  return stored;
33361
33420
  }
33362
33421
  //#endregion
33363
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/formats/jwt.js
33422
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/formats/jwt.js
33364
33423
  async function getResourceServerConfig(provider, token) {
33365
33424
  const { keystore, configuration } = get$2(provider);
33366
33425
  const { clientDefaults: { id_token_signed_response_alg: defaultAlg } } = configuration;
@@ -33491,7 +33550,7 @@ async function getValueAndPayload$1(provider, token) {
33491
33550
  throw new Error("invalid Resource Server jwt configuration");
33492
33551
  }
33493
33552
  //#endregion
33494
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/formats/index.js
33553
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/formats/index.js
33495
33554
  function generateTokenId(provider, token) {
33496
33555
  const format = token.resourceServer?.accessTokenFormat ?? "opaque";
33497
33556
  if (format !== "opaque" && format !== "jwt") throw new Error("invalid format resolved");
@@ -33506,7 +33565,7 @@ async function getValueAndPayload(provider, token) {
33506
33565
  }
33507
33566
  }
33508
33567
  //#endregion
33509
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/token_helpers.js
33568
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/token_helpers.js
33510
33569
  async function checkSessionBinding(provider, token, options) {
33511
33570
  const ignoreSessionBinding = options && options.ignoreSessionBinding === true;
33512
33571
  if (!token?.expiresWithSession || ignoreSessionBinding) return token;
@@ -33548,7 +33607,7 @@ function setAudience(token, audience) {
33548
33607
  token.aud = audience;
33549
33608
  }
33550
33609
  //#endregion
33551
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/access_token.js
33610
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/access_token.js
33552
33611
  var access_token_default = (provider) => class AccessToken extends provider.BaseToken {
33553
33612
  static get IN_PAYLOAD() {
33554
33613
  return [
@@ -33595,7 +33654,7 @@ var access_token_default = (provider) => class AccessToken extends provider.Base
33595
33654
  }
33596
33655
  };
33597
33656
  //#endregion
33598
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/authorization_code.js
33657
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/authorization_code.js
33599
33658
  var authorization_code_default = (provider) => class AuthorizationCode extends provider.BaseToken {
33600
33659
  static get IN_PAYLOAD() {
33601
33660
  return [
@@ -33639,10 +33698,10 @@ var authorization_code_default = (provider) => class AuthorizationCode extends p
33639
33698
  }
33640
33699
  };
33641
33700
  //#endregion
33642
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/snake_case.js
33701
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/snake_case.js
33643
33702
  var snake_case_default = (str = "") => str.replace(/([A-Z][a-z])/g, (x) => `_${x}`.toLowerCase()).replace(/^_+/, "");
33644
33703
  //#endregion
33645
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/base_model.js
33704
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/base_model.js
33646
33705
  const IN_PAYLOAD = [
33647
33706
  "iat",
33648
33707
  "exp",
@@ -33744,7 +33803,7 @@ function getBaseModel(provider) {
33744
33803
  return BaseModel;
33745
33804
  }
33746
33805
  //#endregion
33747
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/base_token.js
33806
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/base_token.js
33748
33807
  function getBaseToken(provider) {
33749
33808
  class BaseToken extends get$2(provider).BaseModel {
33750
33809
  #client;
@@ -33795,7 +33854,7 @@ function getBaseToken(provider) {
33795
33854
  return BaseToken;
33796
33855
  }
33797
33856
  //#endregion
33798
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/map_keys.js
33857
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/_/map_keys.js
33799
33858
  var map_keys_default = (object, iteratee) => {
33800
33859
  const result = {};
33801
33860
  Object.entries(object).forEach(([key, value]) => {
@@ -33804,7 +33863,7 @@ var map_keys_default = (object, iteratee) => {
33804
33863
  return result;
33805
33864
  };
33806
33865
  //#endregion
33807
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/sector_identifier.js
33866
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/sector_identifier.js
33808
33867
  var sector_identifier_default = (client) => {
33809
33868
  if (client.subjectType === "pairwise") {
33810
33869
  if (!client.sectorIdentifierUri) switch (true) {
@@ -33817,7 +33876,7 @@ var sector_identifier_default = (client) => {
33817
33876
  return client.sectorIdentifierUri ? new URL(client.sectorIdentifierUri).host : void 0;
33818
33877
  };
33819
33878
  //#endregion
33820
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/client_schema.js
33879
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/client_schema.js
33821
33880
  const W3CEmailRegExp = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
33822
33881
  const FORBIDDEN_SCHEMES = /* @__PURE__ */ new Set([
33823
33882
  "javascript:",
@@ -34202,7 +34261,7 @@ function getSchema(provider) {
34202
34261
  return Schema;
34203
34262
  }
34204
34263
  //#endregion
34205
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/client_id_metadata_document.js
34264
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/helpers/client_id_metadata_document.js
34206
34265
  const FORBIDDEN_AUTH_METHODS = /* @__PURE__ */ new Set([
34207
34266
  "client_secret_basic",
34208
34267
  "client_secret_post",
@@ -34345,7 +34404,7 @@ async function resolveClientByMetadataDocument(provider, id) {
34345
34404
  return client;
34346
34405
  }
34347
34406
  //#endregion
34348
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/client.js
34407
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/client.js
34349
34408
  const CLIENT_JWK_REQUIREMENTS = /* @__PURE__ */ new Map([
34350
34409
  ["EC", {
34351
34410
  required: ["x", "y"],
@@ -34418,7 +34477,8 @@ const nonSecretAuthMethods = /* @__PURE__ */ new Set([
34418
34477
  "none",
34419
34478
  "tls_client_auth",
34420
34479
  "self_signed_tls_client_auth",
34421
- "attest_jwt_client_auth"
34480
+ "attest_jwt_client_auth",
34481
+ "attest_jwt_client_auth_dpop"
34422
34482
  ]);
34423
34483
  const clientEncryptions = [
34424
34484
  "id_token_encrypted_response_alg",
@@ -34779,7 +34839,7 @@ function getClient(provider) {
34779
34839
  return Client;
34780
34840
  }
34781
34841
  //#endregion
34782
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/client_credentials.js
34842
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/client_credentials.js
34783
34843
  var client_credentials_default = (provider) => class ClientCredentials extends provider.BaseToken {
34784
34844
  static get IN_PAYLOAD() {
34785
34845
  return [
@@ -34812,7 +34872,7 @@ var client_credentials_default = (provider) => class ClientCredentials extends p
34812
34872
  }
34813
34873
  };
34814
34874
  //#endregion
34815
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/device_code.js
34875
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/device_code.js
34816
34876
  var device_code_default = (provider) => class DeviceCode extends provider.BaseToken {
34817
34877
  static async findByUserCode(userCode, { ignoreExpiration = false } = {}) {
34818
34878
  const stored = await this.adapter.findByUserCode(userCode);
@@ -34869,7 +34929,7 @@ var device_code_default = (provider) => class DeviceCode extends provider.BaseTo
34869
34929
  }
34870
34930
  };
34871
34931
  //#endregion
34872
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/backchannel_authentication_request.js
34932
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/backchannel_authentication_request.js
34873
34933
  var backchannel_authentication_request_default = (provider) => class BackchannelAuthenticationRequest extends provider.BaseToken {
34874
34934
  static get IN_PAYLOAD() {
34875
34935
  return [
@@ -34912,7 +34972,7 @@ var backchannel_authentication_request_default = (provider) => class Backchannel
34912
34972
  }
34913
34973
  };
34914
34974
  //#endregion
34915
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/id_token.js
34975
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/id_token.js
34916
34976
  const hashes = [
34917
34977
  "at_hash",
34918
34978
  "c_hash",
@@ -35143,7 +35203,7 @@ function getIdToken(provider) {
35143
35203
  };
35144
35204
  }
35145
35205
  //#endregion
35146
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/initial_access_token.js
35206
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/initial_access_token.js
35147
35207
  var initial_access_token_default = (provider) => class InitialAccessToken extends provider.BaseToken {
35148
35208
  static get IN_PAYLOAD() {
35149
35209
  return [...super.IN_PAYLOAD, "policies"].filter((v) => v !== "clientId");
@@ -35159,7 +35219,7 @@ var initial_access_token_default = (provider) => class InitialAccessToken extend
35159
35219
  }
35160
35220
  };
35161
35221
  //#endregion
35162
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/interaction.js
35222
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/interaction.js
35163
35223
  var interaction_default = (provider) => class Interaction extends get$2(provider).BaseModel {
35164
35224
  constructor(jti, payload) {
35165
35225
  if (payload !== void 0) {
@@ -35215,7 +35275,7 @@ var interaction_default = (provider) => class Interaction extends get$2(provider
35215
35275
  }
35216
35276
  };
35217
35277
  //#endregion
35218
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/pushed_authorization_request.js
35278
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/pushed_authorization_request.js
35219
35279
  var pushed_authorization_request_default = (provider) => class PushedAuthorizationRequest extends get$2(provider).BaseModel {
35220
35280
  static get IN_PAYLOAD() {
35221
35281
  return [
@@ -35239,7 +35299,7 @@ var pushed_authorization_request_default = (provider) => class PushedAuthorizati
35239
35299
  }
35240
35300
  };
35241
35301
  //#endregion
35242
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/pre_authorized_code.js
35302
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/pre_authorized_code.js
35243
35303
  var pre_authorized_code_default = (provider) => class PreAuthorizedCode extends provider.BaseToken {
35244
35304
  static get IN_PAYLOAD() {
35245
35305
  return [
@@ -35266,7 +35326,7 @@ var pre_authorized_code_default = (provider) => class PreAuthorizedCode extends
35266
35326
  }
35267
35327
  };
35268
35328
  //#endregion
35269
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/refresh_token.js
35329
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/refresh_token.js
35270
35330
  var refresh_token_default = (provider) => class RefreshToken extends provider.BaseToken {
35271
35331
  constructor(...args) {
35272
35332
  super(...args);
@@ -35327,7 +35387,7 @@ var refresh_token_default = (provider) => class RefreshToken extends provider.Ba
35327
35387
  }
35328
35388
  };
35329
35389
  //#endregion
35330
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/registration_access_token.js
35390
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/registration_access_token.js
35331
35391
  var registration_access_token_default = (provider) => class RegistrationAccessToken extends provider.BaseToken {
35332
35392
  static get IN_PAYLOAD() {
35333
35393
  return [...super.IN_PAYLOAD, "policies"];
@@ -35343,7 +35403,7 @@ var registration_access_token_default = (provider) => class RegistrationAccessTo
35343
35403
  }
35344
35404
  };
35345
35405
  //#endregion
35346
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/replay_detection.js
35406
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/replay_detection.js
35347
35407
  var replay_detection_default = (provider) => class ReplayDetection extends get$2(provider).BaseModel {
35348
35408
  static get IN_PAYLOAD() {
35349
35409
  return [...super.IN_PAYLOAD, "iss"];
@@ -35359,7 +35419,7 @@ var replay_detection_default = (provider) => class ReplayDetection extends get$2
35359
35419
  }
35360
35420
  };
35361
35421
  //#endregion
35362
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/session.js
35422
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/session.js
35363
35423
  var session_default = (provider) => class Session extends get$2(provider).BaseModel {
35364
35424
  constructor(payload) {
35365
35425
  super(payload);
@@ -35473,7 +35533,7 @@ var session_default = (provider) => class Session extends get$2(provider).BaseMo
35473
35533
  }
35474
35534
  };
35475
35535
  //#endregion
35476
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/models/grant.js
35536
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/models/grant.js
35477
35537
  var grant_default = (provider) => class Grant extends provider.BaseToken {
35478
35538
  static get IN_PAYLOAD() {
35479
35539
  return [
@@ -35622,7 +35682,7 @@ var grant_default = (provider) => class Grant extends provider.BaseToken {
35622
35682
  }
35623
35683
  };
35624
35684
  //#endregion
35625
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/provider.js
35685
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/provider.js
35626
35686
  const featuresDescriptor = {
35627
35687
  enumerable: true,
35628
35688
  configurable: true,
@@ -35903,7 +35963,7 @@ Object.defineProperty(Provider.prototype, "app", { get: util.deprecate(function
35903
35963
  return this;
35904
35964
  }, ".app getter is deprecated. The Provider instance is now the Koa app itself") });
35905
35965
  //#endregion
35906
- //#region node_modules/.pnpm/oidc-provider@9.12.2_supports-color@7.2.0/node_modules/oidc-provider/lib/index.js
35966
+ //#region node_modules/.pnpm/oidc-provider@9.13.0_supports-color@7.2.0/node_modules/oidc-provider/lib/index.js
35907
35967
  const deno = typeof Deno !== "undefined";
35908
35968
  const bun = typeof Bun !== "undefined";
35909
35969
  const workerd = typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers";