@cfworker/jwt 7.0.0 → 7.0.2

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.
Files changed (37) hide show
  1. package/dist/{types → commonjs}/discovery.d.ts +1 -1
  2. package/dist/commonjs/package.json +3 -0
  3. package/dist/esm/algs.d.ts +2 -0
  4. package/dist/esm/decode.d.ts +2 -0
  5. package/dist/esm/discovery.d.ts +2 -0
  6. package/dist/esm/jwks.d.ts +4 -0
  7. package/dist/esm/package.json +3 -0
  8. package/dist/esm/parse.d.ts +9 -0
  9. package/dist/esm/types.d.ts +71 -0
  10. package/dist/esm/verify.d.ts +2 -0
  11. package/package.json +32 -26
  12. package/dist/tsconfig.cjs.tsbuildinfo +0 -1
  13. package/dist/tsconfig.tsbuildinfo +0 -1
  14. package/src/algs.ts +0 -7
  15. package/src/declarations.d.ts +0 -6
  16. package/src/decode.ts +0 -20
  17. package/src/discovery.ts +0 -21
  18. package/src/jwks.ts +0 -89
  19. package/src/parse.ts +0 -256
  20. package/src/types.ts +0 -88
  21. package/src/verify.ts +0 -20
  22. /package/dist/{types → commonjs}/algs.d.ts +0 -0
  23. /package/dist/{cjs → commonjs}/algs.js +0 -0
  24. /package/dist/{types → commonjs}/decode.d.ts +0 -0
  25. /package/dist/{cjs → commonjs}/decode.js +0 -0
  26. /package/dist/{cjs → commonjs}/discovery.js +0 -0
  27. /package/dist/{types → commonjs}/index.d.ts +0 -0
  28. /package/dist/{cjs → commonjs}/index.js +0 -0
  29. /package/dist/{types → commonjs}/jwks.d.ts +0 -0
  30. /package/dist/{cjs → commonjs}/jwks.js +0 -0
  31. /package/dist/{types → commonjs}/parse.d.ts +0 -0
  32. /package/dist/{cjs → commonjs}/parse.js +0 -0
  33. /package/dist/{types → commonjs}/types.d.ts +0 -0
  34. /package/dist/{cjs → commonjs}/types.js +0 -0
  35. /package/dist/{types → commonjs}/verify.d.ts +0 -0
  36. /package/dist/{cjs → commonjs}/verify.js +0 -0
  37. /package/{src/index.ts → dist/esm/index.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
- import { IssuerMetadata } from './types';
1
+ import type { IssuerMetadata } from './types.js';
2
2
  export declare function getIssuerMetadata(issuer: string): Promise<IssuerMetadata>;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,2 @@
1
+ export declare const algToHash: Record<string, string>;
2
+ export declare const algs: string[];
@@ -0,0 +1,2 @@
1
+ import { DecodedJwt } from './types.js';
2
+ export declare function decodeJwt(token: string): DecodedJwt;
@@ -0,0 +1,2 @@
1
+ import type { IssuerMetadata } from './types.js';
2
+ export declare function getIssuerMetadata(issuer: string): Promise<IssuerMetadata>;
@@ -0,0 +1,4 @@
1
+ import { DecodedJwt, JsonWebKeyset } from './types.js';
2
+ export declare function getJwks(issuer: string): Promise<JsonWebKeyset>;
3
+ export declare function importKey(iss: string, jwk: JsonWebKey): Promise<void>;
4
+ export declare function getKey(decoded: DecodedJwt): Promise<CryptoKey>;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,9 @@
1
+ import { DecodedJwt, JwtParseResult } from './types.js';
2
+ export interface JwtParseOptions {
3
+ jwt: string;
4
+ issuer: string | string[];
5
+ audience: string;
6
+ resolveKey?: (decoded: DecodedJwt) => Promise<CryptoKey | null>;
7
+ skewMs?: number;
8
+ }
9
+ export declare function parseJwt({ jwt, issuer, audience, resolveKey, skewMs }: JwtParseOptions): Promise<JwtParseResult>;
@@ -0,0 +1,71 @@
1
+ export interface JwtPayload {
2
+ iss: string;
3
+ sub: string;
4
+ aud: string | Array<string>;
5
+ iat: number;
6
+ exp: number;
7
+ nbf?: number;
8
+ jti?: string;
9
+ }
10
+ export interface JwtHeader {
11
+ typ?: string;
12
+ alg: string;
13
+ kid: string;
14
+ jku?: string;
15
+ }
16
+ export interface RawJwt {
17
+ header: string;
18
+ payload: string;
19
+ signature: string;
20
+ }
21
+ export interface DecodedJwt {
22
+ header: JwtHeader;
23
+ payload: JwtPayload;
24
+ signature: Uint8Array;
25
+ raw: RawJwt;
26
+ }
27
+ export interface JsonWebKeyset {
28
+ keys: JsonWebKey[];
29
+ }
30
+ export interface ValidJwtParseResult {
31
+ valid: true;
32
+ header: JwtHeader;
33
+ payload: JwtPayload;
34
+ }
35
+ export interface InvalidJwtParseResult {
36
+ valid: false;
37
+ reason: string;
38
+ reasonCode: InvalidJwtReasonCode;
39
+ decoded?: DecodedJwt;
40
+ }
41
+ export declare enum InvalidJwtReasonCode {
42
+ Other = 0,
43
+ Expired = 1
44
+ }
45
+ export interface IssuerMetadata {
46
+ issuer: string;
47
+ authorization_endpoint?: string;
48
+ token_endpoint?: string;
49
+ jwks_uri?: string;
50
+ userinfo_endpoint?: string;
51
+ revocation_endpoint?: string;
52
+ end_session_endpoint?: string;
53
+ registration_endpoint?: string;
54
+ token_endpoint_auth_methods_supported?: string[];
55
+ token_endpoint_auth_signing_alg_values_supported?: string[];
56
+ introspection_endpoint_auth_methods_supported?: string[];
57
+ introspection_endpoint_auth_signing_alg_values_supported?: string[];
58
+ revocation_endpoint_auth_methods_supported?: string[];
59
+ revocation_endpoint_auth_signing_alg_values_supported?: string[];
60
+ request_object_signing_alg_values_supported?: string[];
61
+ mtls_endpoint_aliases?: MtlsEndpointAliases;
62
+ [key: string]: unknown;
63
+ }
64
+ export interface MtlsEndpointAliases {
65
+ token_endpoint?: string;
66
+ userinfo_endpoint?: string;
67
+ revocation_endpoint?: string;
68
+ introspection_endpoint?: string;
69
+ device_authorization_endpoint?: string;
70
+ }
71
+ export type JwtParseResult = ValidJwtParseResult | InvalidJwtParseResult;
@@ -0,0 +1,2 @@
1
+ import { DecodedJwt } from './types.js';
2
+ export declare function verifyJwtSignature(decoded: DecodedJwt, key: CryptoKey): Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfworker/jwt",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "Tiny lib for decoding JWTs and verifying signatures, using native crypto APIs",
5
5
  "keywords": [
6
6
  "jwt",
@@ -10,38 +10,38 @@
10
10
  "workers",
11
11
  "service-worker"
12
12
  ],
13
- "main": "dist/cjs/index.js",
14
- "module": "dist/esm/index.js",
15
- "source": "src/index.ts",
16
- "types": "dist/types/index.d.ts",
13
+ "repository": "https://github.com/cfworker/cfworker",
14
+ "author": "Jeremy Danyow <jdanyow@gmail.com>",
15
+ "homepage": "https://github.com/cfworker/cfworker/tree/master/packages/jwt/README.md",
16
+ "license": "MIT",
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "type": "module",
21
+ "sideEffects": false,
22
+ "main": "./dist/commonjs/index.js",
23
+ "types": "./dist/commonjs/index.d.ts",
24
+ "module": "./dist/esm/index.js",
17
25
  "exports": {
26
+ "./package.json": "./package.json",
18
27
  ".": {
19
28
  "import": {
20
- "default": "./dist/esm/index.js",
21
- "types": "./dist/types/index.d.ts"
29
+ "types": "./dist/esm/index.d.ts",
30
+ "default": "./dist/esm/index.js"
22
31
  },
23
32
  "require": {
24
- "default": "./dist/cjs/index.js",
25
- "types": "./dist/types/index.d.ts"
33
+ "types": "./dist/commonjs/index.d.ts",
34
+ "default": "./dist/commonjs/index.js"
26
35
  }
27
36
  }
28
37
  },
29
38
  "files": [
30
- "dist/**/*",
31
- "src/**/*",
32
- "README.md",
33
- "package.json"
39
+ "dist"
34
40
  ],
35
- "repository": "https://github.com/cfworker/cfworker",
36
- "author": "Jeremy Danyow <jdanyow@gmail.com>",
37
- "homepage": "https://github.com/cfworker/cfworker/tree/master/packages/jwt/README.md",
38
- "license": "MIT",
39
- "publishConfig": {
40
- "access": "public"
41
- },
42
41
  "scripts": {
43
- "build": "tsc --build & tsc --build tsconfig.cjs.json",
44
- "clean": "tsc --build --clean && tsc --build tsconfig.cjs.json --clean",
42
+ "prepare": "node ../../patch.mjs && tshy",
43
+ "build": "tsc --build",
44
+ "clean": "tsc --build --clean",
45
45
  "pretest": "esbuild test/test.ts --target=esnext --bundle --format=esm --conditions=worker,browser --outdir=dist-test --ignore-annotations",
46
46
  "test": "node ../../test.mjs"
47
47
  },
@@ -50,11 +50,17 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/chai": "^5.0.1",
53
- "@types/mocha": "^10.0.9",
53
+ "@types/mocha": "^10.0.10",
54
54
  "chai": "^5.1.2",
55
55
  "esbuild": "^0.24.0",
56
- "mocha": "^10.8.2",
57
- "typescript": "^5.6.3",
58
- "wrangler": "^3.87.0"
56
+ "mocha": "^11.0.1",
57
+ "typescript": "^5.7.2",
58
+ "wrangler": "^3.92.0"
59
+ },
60
+ "tshy": {
61
+ "exports": {
62
+ "./package.json": "./package.json",
63
+ ".": "./src/index.ts"
64
+ }
59
65
  }
60
66
  }
@@ -1 +0,0 @@
1
- {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.webworker.d.ts","../../../node_modules/typescript/lib/lib.webworker.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/algs.ts","../src/declarations.d.ts","../../../node_modules/rfc4648/lib/src/codec.d.ts","../../../node_modules/rfc4648/lib/src/index.d.ts","../src/types.ts","../src/decode.ts","../src/discovery.ts","../src/jwks.ts","../src/verify.ts","../src/parse.ts","../src/index.ts"],"fileIdsList":[[77],[78,79],[79],[79,80,82,83,84],[75,79,81],[75,79,80,82,83]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"abee51ebffafd50c07d76be5848a34abfe4d791b5745ef1e5648718722fab924","impliedFormat":1},{"version":"30055c4694373918593a99ac50e8bc2d42922b8117f71c79719ee433320eb80c","affectsGlobalScope":true,"impliedFormat":1},{"version":"89dc16e908e1555c5fa1e2f680c793a336996f6095d743d987dc729e04cdad19","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"15c1c3d7b2e46e0025417ed6d5f03f419e57e6751f87925ca19dc88297053fe6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"338a4664a1baf17d437ac4b8a0db384ffdf70f6a01a278030f7ca30e12724ab1","signature":"92a65026787db3de09e45fec4233f1c43dec71f63d1ce46a6e0e356c22a9d7ca"},{"version":"ae1d9741986f7803e21916a3b91866c3e039f4f5a0063c04ab0250efdf9ddff2","affectsGlobalScope":true},{"version":"b85e0cacbcbddaeaed7497fc24c779c06dbe9e1f7e16e1979c120831c92f0c0e","impliedFormat":99},{"version":"3f7413da40595a5149d55455ba7c80c95eaca631d62b886b0e42c2bcbdf0ff27","impliedFormat":99},{"version":"e963efaceea653c1b2585ce1b85d4ca7b332a3bac9cff7157f56e41da09936aa","signature":"4302d32ef02c7cf08c7e3eca785667d5cc6688f8d4a5f0ac3c4175de1a7d2940"},{"version":"afcd7c8411c5f422c945e183b55b847c5cfa6ee62663d538b8d1b747e4f8e21b","signature":"75d40806d946050d89f474acf28066f26973f30e28a7f93c5300ea1decb0eefb"},{"version":"1b98bc2983d8c549b04517b788687817bad44a0592af1604128ab405078c0625","signature":"ce9006220f02a0f6acc093c788dbdcc62ace8bdebb482d0d64da3fc4a1297252"},{"version":"5d34e95e25a3edeb254e0ccf16419fef6549af5846e1140dfe5c0d92a1528292","signature":"2a7b39121b5a5ae14492e4bbe4d606b08e435422cb94fab427d3e092f71b96f4"},{"version":"d85f0062f68d39bb96120a892c71dd20830ba88d55fb4a2d73073bcf2867c3ae","signature":"a447a8efafff8d56fef76075b314e74a4094b7e0b9a27160a524f885782e526b"},{"version":"8c1fa50be5f0bef04350f0ab7e1b2467978e00d8bf4ccef1fe52242451252a6c","signature":"f71975db80858947889874100265eda412c01171e43477b31a288bf077615276"},"c0b55c29abe9d07ee39379de20db2650c46dbf903e242f21150b69a11c06ae36"],"root":[75,76,[79,85]],"options":{"composite":true,"declarationDir":"./types","esModuleInterop":true,"isolatedDeclarations":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./cjs","removeComments":true,"rootDir":"../src","strict":true,"target":99},"referencedMap":[[78,1],[80,2],[81,3],[85,4],[82,5],[84,6],[83,3]],"latestChangedDtsFile":"./types/index.d.ts","version":"5.6.3"}
@@ -1 +0,0 @@
1
- {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.webworker.d.ts","../../../node_modules/typescript/lib/lib.webworker.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/algs.ts","../src/declarations.d.ts","../../../node_modules/rfc4648/lib/src/codec.d.ts","../../../node_modules/rfc4648/lib/src/index.d.ts","../src/types.ts","../src/decode.ts","../src/discovery.ts","../src/jwks.ts","../src/verify.ts","../src/parse.ts","../src/index.ts"],"fileIdsList":[[77],[78,79],[79],[79,80,82,83,84],[75,79,81],[75,79,80,82,83]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"abee51ebffafd50c07d76be5848a34abfe4d791b5745ef1e5648718722fab924","impliedFormat":1},{"version":"30055c4694373918593a99ac50e8bc2d42922b8117f71c79719ee433320eb80c","affectsGlobalScope":true,"impliedFormat":1},{"version":"89dc16e908e1555c5fa1e2f680c793a336996f6095d743d987dc729e04cdad19","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"15c1c3d7b2e46e0025417ed6d5f03f419e57e6751f87925ca19dc88297053fe6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"338a4664a1baf17d437ac4b8a0db384ffdf70f6a01a278030f7ca30e12724ab1","signature":"92a65026787db3de09e45fec4233f1c43dec71f63d1ce46a6e0e356c22a9d7ca"},{"version":"ae1d9741986f7803e21916a3b91866c3e039f4f5a0063c04ab0250efdf9ddff2","affectsGlobalScope":true},{"version":"b85e0cacbcbddaeaed7497fc24c779c06dbe9e1f7e16e1979c120831c92f0c0e","impliedFormat":99},{"version":"3f7413da40595a5149d55455ba7c80c95eaca631d62b886b0e42c2bcbdf0ff27","impliedFormat":99},{"version":"e963efaceea653c1b2585ce1b85d4ca7b332a3bac9cff7157f56e41da09936aa","signature":"4302d32ef02c7cf08c7e3eca785667d5cc6688f8d4a5f0ac3c4175de1a7d2940"},{"version":"afcd7c8411c5f422c945e183b55b847c5cfa6ee62663d538b8d1b747e4f8e21b","signature":"75d40806d946050d89f474acf28066f26973f30e28a7f93c5300ea1decb0eefb"},{"version":"1b98bc2983d8c549b04517b788687817bad44a0592af1604128ab405078c0625","signature":"ce9006220f02a0f6acc093c788dbdcc62ace8bdebb482d0d64da3fc4a1297252"},{"version":"5d34e95e25a3edeb254e0ccf16419fef6549af5846e1140dfe5c0d92a1528292","signature":"2a7b39121b5a5ae14492e4bbe4d606b08e435422cb94fab427d3e092f71b96f4"},{"version":"d85f0062f68d39bb96120a892c71dd20830ba88d55fb4a2d73073bcf2867c3ae","signature":"a447a8efafff8d56fef76075b314e74a4094b7e0b9a27160a524f885782e526b"},{"version":"8c1fa50be5f0bef04350f0ab7e1b2467978e00d8bf4ccef1fe52242451252a6c","signature":"f71975db80858947889874100265eda412c01171e43477b31a288bf077615276"},"c0b55c29abe9d07ee39379de20db2650c46dbf903e242f21150b69a11c06ae36"],"root":[75,76,[79,85]],"options":{"composite":true,"declarationDir":"./types","esModuleInterop":true,"isolatedDeclarations":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","removeComments":true,"rootDir":"../src","strict":true,"target":99},"referencedMap":[[78,1],[80,2],[81,3],[85,4],[82,5],[84,6],[83,3]],"latestChangedDtsFile":"./types/index.d.ts","version":"5.6.3"}
package/src/algs.ts DELETED
@@ -1,7 +0,0 @@
1
- export const algToHash: Record<string, string> = {
2
- RS256: 'SHA-256',
3
- RS384: 'SHA-384',
4
- RS512: 'SHA-512'
5
- };
6
-
7
- export const algs: string[] = Object.keys(algToHash);
@@ -1,6 +0,0 @@
1
- interface JsonWebKey {
2
- x5c?: string[];
3
- kid?: string;
4
- x5t?: string;
5
- n?: string;
6
- }
package/src/decode.ts DELETED
@@ -1,20 +0,0 @@
1
- import { base64url } from 'rfc4648';
2
- import { DecodedJwt } from './types.js';
3
-
4
- /**
5
- * Decode a JWT into header, payload, and signature components.
6
- */
7
- export function decodeJwt(token: string): DecodedJwt {
8
- const [header, payload, signature] = token.split('.');
9
- const decoder = new TextDecoder();
10
- return {
11
- header: JSON.parse(
12
- decoder.decode(base64url.parse(header, { loose: true }))
13
- ),
14
- payload: JSON.parse(
15
- decoder.decode(base64url.parse(payload, { loose: true }))
16
- ),
17
- signature: base64url.parse(signature, { loose: true }),
18
- raw: { header, payload, signature }
19
- };
20
- }
package/src/discovery.ts DELETED
@@ -1,21 +0,0 @@
1
- import { IssuerMetadata } from './types';
2
-
3
- /**
4
- * Fetch an oidc discovery document
5
- */
6
- export async function getIssuerMetadata(
7
- issuer: string
8
- ): Promise<IssuerMetadata> {
9
- const url = new URL(issuer);
10
- if (!url.pathname.endsWith('/')) {
11
- url.pathname += '/';
12
- }
13
- url.pathname += '.well-known/openid-configuration';
14
- const response = await fetch(url.href);
15
- if (!response.ok) {
16
- throw new Error(
17
- `Error loading OpenID discovery document at ${url.href}. ${response.status} ${response.statusText}`
18
- );
19
- }
20
- return response.json();
21
- }
package/src/jwks.ts DELETED
@@ -1,89 +0,0 @@
1
- import { algToHash } from './algs.js';
2
- import { getIssuerMetadata } from './discovery.js';
3
- import { DecodedJwt, JsonWebKeyset } from './types.js';
4
-
5
- /**
6
- * Fetch a json web keyset.
7
- */
8
- export async function getJwks(issuer: string): Promise<JsonWebKeyset> {
9
- const issuerMetadata = await getIssuerMetadata(issuer);
10
-
11
- let url;
12
- if (issuerMetadata.jwks_uri) {
13
- url = new URL(issuerMetadata.jwks_uri);
14
- } else {
15
- url = new URL(issuer);
16
- if (!url.pathname.endsWith('/')) {
17
- url.pathname += '/';
18
- }
19
- url.pathname += '.well-known/jwks.json';
20
- }
21
-
22
- const response = await fetch(url.href);
23
- if (!response.ok) {
24
- throw new Error(
25
- `Error loading jwks at ${url.href}. ${response.status} ${response.statusText}`
26
- );
27
- }
28
- return response.json();
29
- }
30
-
31
- const importedKeys: Record<string, Record<string, CryptoKey>> = {};
32
-
33
- /**
34
- * Import and cache a JsonWebKeyset
35
- * @param iss The issuer. Serves as the first-level cache key.
36
- * @param jwks The JsonWebKeyset to import.
37
- */
38
- export async function importKey(iss: string, jwk: JsonWebKey): Promise<void> {
39
- if (jwk.kty !== 'RSA') {
40
- throw new Error(
41
- `Unsupported jwk key type (kty) "${
42
- jwk.kty
43
- }": Full JWK was ${JSON.stringify(jwk)}`
44
- );
45
- }
46
- // alg is not mandatory in a JWK but is available in the JWT, for now we default to
47
- // SHA-256 (RS256) because this is the most common but evaluating the key length
48
- // of the JWKS is probably an ideal way of identifying what the alg is.
49
- const hash = jwk.alg ? algToHash[jwk.alg] : 'SHA-256';
50
- if (!hash) {
51
- throw new Error(
52
- `Unsupported jwk Algorithm (alg) "${
53
- jwk.alg
54
- }": Full JWK was ${JSON.stringify(jwk)}`
55
- );
56
- }
57
- const key = await crypto.subtle.importKey(
58
- 'jwk',
59
- jwk,
60
- { name: 'RSASSA-PKCS1-v1_5', hash },
61
- false,
62
- ['verify']
63
- );
64
- importedKeys[iss] = importedKeys[iss] || {};
65
- importedKeys[iss][jwk.kid ?? 'default'] = key;
66
- }
67
-
68
- /**
69
- * Get the CryptoKey associated with the JWT's issuer.
70
- */
71
- export async function getKey(decoded: DecodedJwt): Promise<CryptoKey> {
72
- const {
73
- header: { kid = 'default' },
74
- payload: { iss }
75
- } = decoded;
76
-
77
- if (!importedKeys[iss]) {
78
- const jwks = await getJwks(iss);
79
- await Promise.all(jwks.keys.map(jwk => importKey(iss, jwk)));
80
- }
81
-
82
- const key = importedKeys[iss][kid];
83
-
84
- if (!key) {
85
- throw new Error(`Error jwk not found. iss: ${iss}; kid: ${kid};`);
86
- }
87
-
88
- return key;
89
- }
package/src/parse.ts DELETED
@@ -1,256 +0,0 @@
1
- import { algs, algToHash } from './algs.js';
2
- import { decodeJwt } from './decode.js';
3
- import { getKey } from './jwks.js';
4
- import { DecodedJwt, InvalidJwtReasonCode, JwtParseResult } from './types.js';
5
- import { verifyJwtSignature } from './verify.js';
6
-
7
- const defaultSkewMs = 60 * 1000;
8
-
9
- export interface JwtParseOptions {
10
- /**
11
- * The JWT to parse.
12
- */
13
- jwt: string;
14
-
15
- /**
16
- * Permitted issuer(s) of the JWT. Used to validate the iss claim.
17
- * Note: if you're using the default resolveKey function, OIDC discovery will be used
18
- * to fetch the public key(s) for the issuer.
19
- */
20
- issuer: string | string[];
21
-
22
- /**
23
- * Expected audience of the JWT.
24
- */
25
- audience: string;
26
-
27
- /**
28
- * Given a decoded (but not fully verified) JWT, resolve the public key that
29
- * should be used to verify the signature. Typical implementations will use
30
- * the "kid" claim to look up the key in a JWKS endpoint or other key store.
31
- * If the key cannot be resolved, the function should return null.
32
- * @param decoded The decoded (but not fully verified / unsafe) JWT.
33
- */
34
- resolveKey?: (decoded: DecodedJwt) => Promise<CryptoKey | null>;
35
-
36
- /**
37
- * The maximum skew in milliseconds to allow when validating iat, nbf, and exp claims.
38
- * Defaults to 60 seconds.
39
- */
40
- skewMs?: number;
41
- }
42
-
43
- /**
44
- * Parse a JWT.
45
- */
46
- export async function parseJwt({
47
- jwt,
48
- issuer,
49
- audience,
50
- resolveKey = getKey,
51
- skewMs = defaultSkewMs
52
- }: JwtParseOptions): Promise<JwtParseResult> {
53
- let decoded: DecodedJwt;
54
- try {
55
- decoded = decodeJwt(jwt);
56
- } catch {
57
- return {
58
- valid: false,
59
- reason: `Unable to decode JWT.`,
60
- reasonCode: InvalidJwtReasonCode.Other
61
- };
62
- }
63
- const { typ, alg } = decoded.header;
64
- if (typeof typ !== 'undefined' && typ !== 'JWT') {
65
- return {
66
- valid: false,
67
- reason: `Invalid JWT type ${JSON.stringify(typ)}. Expected "JWT".`,
68
- reasonCode: InvalidJwtReasonCode.Other,
69
- decoded
70
- };
71
- }
72
- if (!algToHash[alg]) {
73
- return {
74
- valid: false,
75
- reason: `Invalid JWT algorithm ${JSON.stringify(
76
- alg
77
- )}. Supported: ${algs}.`,
78
- reasonCode: InvalidJwtReasonCode.Other,
79
- decoded
80
- };
81
- }
82
-
83
- const { sub, aud, iss, iat, exp, nbf } = decoded.payload;
84
- if (typeof sub !== 'string') {
85
- return {
86
- valid: false,
87
- reason: `Subject claim (sub) is required and must be a string. Received ${JSON.stringify(
88
- sub
89
- )}.`,
90
- reasonCode: InvalidJwtReasonCode.Other,
91
- decoded
92
- };
93
- }
94
-
95
- if (typeof aud === 'string') {
96
- if (aud !== audience) {
97
- return {
98
- valid: false,
99
- reason: `Invalid JWT audience claim (aud) ${JSON.stringify(
100
- aud
101
- )}. Expected "${audience}".`,
102
- reasonCode: InvalidJwtReasonCode.Other,
103
- decoded
104
- };
105
- }
106
- } else if (
107
- Array.isArray(aud) &&
108
- aud.length > 0 &&
109
- aud.every(a => typeof a === 'string')
110
- ) {
111
- if (!aud.includes(audience)) {
112
- return {
113
- valid: false,
114
- reason: `Invalid JWT audience claim array (aud) ${JSON.stringify(
115
- aud
116
- )}. Does not include "${audience}".`,
117
- reasonCode: InvalidJwtReasonCode.Other,
118
- decoded
119
- };
120
- }
121
- } else {
122
- return {
123
- valid: false,
124
- reason: `Invalid JWT audience claim (aud) ${JSON.stringify(
125
- aud
126
- )}. Expected a string or a non-empty array of strings.`,
127
- reasonCode: InvalidJwtReasonCode.Other,
128
- decoded
129
- };
130
- }
131
-
132
- if (!(iss === issuer || (Array.isArray(issuer) && issuer.includes(iss)))) {
133
- return {
134
- valid: false,
135
- reason: `Invalid JWT issuer claim (iss) ${JSON.stringify(
136
- decoded.payload.iss
137
- )}. Expected ${JSON.stringify(issuer)}.`,
138
- reasonCode: InvalidJwtReasonCode.Other,
139
- decoded
140
- };
141
- }
142
-
143
- if (typeof exp !== 'number') {
144
- return {
145
- valid: false,
146
- reason: `Invalid JWT expiry date claim (exp) ${JSON.stringify(
147
- exp
148
- )}. Expected number.`,
149
- reasonCode: InvalidJwtReasonCode.Other,
150
- decoded
151
- };
152
- }
153
- const currentDate = new Date(Date.now());
154
- const expiryDate = new Date(0);
155
- expiryDate.setUTCSeconds(exp);
156
- const expired = expiryDate.getTime() <= currentDate.getTime() - skewMs;
157
- if (expired) {
158
- return {
159
- valid: false,
160
- reason: `JWT is expired. Expiry date: ${expiryDate}; Current date: ${currentDate};`,
161
- reasonCode: InvalidJwtReasonCode.Expired,
162
- decoded
163
- };
164
- }
165
-
166
- if (nbf !== undefined) {
167
- if (typeof nbf !== 'number') {
168
- return {
169
- valid: false,
170
- reason: `Invalid JWT not before date claim (nbf) ${JSON.stringify(
171
- nbf
172
- )}. Expected number.`,
173
- reasonCode: InvalidJwtReasonCode.Other,
174
- decoded
175
- };
176
- }
177
- const notBeforeDate = new Date(0);
178
- notBeforeDate.setUTCSeconds(nbf);
179
- const early = notBeforeDate.getTime() > currentDate.getTime() + skewMs;
180
- if (early) {
181
- return {
182
- valid: false,
183
- reason: `JWT cannot be used prior to not before date claim (nbf). Not before date: ${notBeforeDate}; Current date: ${currentDate};`,
184
- reasonCode: InvalidJwtReasonCode.Other,
185
- decoded
186
- };
187
- }
188
- }
189
-
190
- if (iat !== undefined) {
191
- if (typeof iat !== 'number') {
192
- return {
193
- valid: false,
194
- reason: `Invalid JWT issued at date claim (iat) ${JSON.stringify(
195
- iat
196
- )}. Expected number.`,
197
- reasonCode: InvalidJwtReasonCode.Other,
198
- decoded
199
- };
200
- }
201
- const issuedAtDate = new Date(0);
202
- issuedAtDate.setUTCSeconds(iat);
203
- const postIssued = issuedAtDate.getTime() > currentDate.getTime() + skewMs;
204
- if (postIssued) {
205
- return {
206
- valid: false,
207
- reason: `JWT issued at date claim (iat) is in the future. Issued at date: ${issuedAtDate}; Current date: ${currentDate};`,
208
- reasonCode: InvalidJwtReasonCode.Other,
209
- decoded
210
- };
211
- }
212
- }
213
-
214
- let key: CryptoKey | null;
215
- try {
216
- key = await resolveKey(decoded);
217
- } catch (e) {
218
- return {
219
- valid: false,
220
- reason: `Error retrieving public key to verify JWT signature: ${
221
- e instanceof Error ? e.message : e
222
- }`,
223
- reasonCode: InvalidJwtReasonCode.Other,
224
- decoded
225
- };
226
- }
227
- if (!key) {
228
- return {
229
- valid: false,
230
- reason: `Unable to resolve public key to verify JWT signature.`,
231
- reasonCode: InvalidJwtReasonCode.Other,
232
- decoded
233
- };
234
- }
235
- let signatureValid: boolean;
236
- try {
237
- signatureValid = await verifyJwtSignature(decoded, key);
238
- } catch {
239
- return {
240
- valid: false,
241
- reason: `Error verifying JWT signature.`,
242
- reasonCode: InvalidJwtReasonCode.Other,
243
- decoded
244
- };
245
- }
246
- if (!signatureValid) {
247
- return {
248
- valid: false,
249
- reason: `JWT signature is invalid.`,
250
- reasonCode: InvalidJwtReasonCode.Other,
251
- decoded
252
- };
253
- }
254
- const { header, payload } = decoded;
255
- return { valid: true, header, payload };
256
- }
package/src/types.ts DELETED
@@ -1,88 +0,0 @@
1
- export interface JwtPayload {
2
- iss: string;
3
- sub: string;
4
- aud: string | Array<string>;
5
- iat: number;
6
- exp: number;
7
- nbf?: number;
8
- jti?: string;
9
- }
10
-
11
- export interface JwtHeader {
12
- typ?: string;
13
- alg: string;
14
- kid: string;
15
- jku?: string;
16
- }
17
-
18
- export interface RawJwt {
19
- header: string;
20
- payload: string;
21
- signature: string;
22
- }
23
-
24
- /**
25
- * @typedef {object} DecodedJwt
26
- * @property {JwtHeader} header
27
- * @property {JwtPayload} payload
28
- * @property {string} signature
29
- * @property {RawJwt} raw
30
- */
31
- export interface DecodedJwt {
32
- header: JwtHeader;
33
- payload: JwtPayload;
34
- signature: Uint8Array;
35
- raw: RawJwt;
36
- }
37
-
38
- export interface JsonWebKeyset {
39
- keys: JsonWebKey[];
40
- }
41
-
42
- export interface ValidJwtParseResult {
43
- valid: true;
44
- header: JwtHeader;
45
- payload: JwtPayload;
46
- }
47
-
48
- export interface InvalidJwtParseResult {
49
- valid: false;
50
- reason: string;
51
- reasonCode: InvalidJwtReasonCode;
52
- decoded?: DecodedJwt;
53
- }
54
-
55
- export enum InvalidJwtReasonCode {
56
- Other = 0,
57
- Expired = 1
58
- }
59
-
60
- export interface IssuerMetadata {
61
- issuer: string;
62
- authorization_endpoint?: string;
63
- token_endpoint?: string;
64
- jwks_uri?: string;
65
- userinfo_endpoint?: string;
66
- revocation_endpoint?: string;
67
- end_session_endpoint?: string;
68
- registration_endpoint?: string;
69
- token_endpoint_auth_methods_supported?: string[];
70
- token_endpoint_auth_signing_alg_values_supported?: string[];
71
- introspection_endpoint_auth_methods_supported?: string[];
72
- introspection_endpoint_auth_signing_alg_values_supported?: string[];
73
- revocation_endpoint_auth_methods_supported?: string[];
74
- revocation_endpoint_auth_signing_alg_values_supported?: string[];
75
- request_object_signing_alg_values_supported?: string[];
76
- mtls_endpoint_aliases?: MtlsEndpointAliases;
77
- [key: string]: unknown;
78
- }
79
-
80
- export interface MtlsEndpointAliases {
81
- token_endpoint?: string;
82
- userinfo_endpoint?: string;
83
- revocation_endpoint?: string;
84
- introspection_endpoint?: string;
85
- device_authorization_endpoint?: string;
86
- }
87
-
88
- export type JwtParseResult = ValidJwtParseResult | InvalidJwtParseResult;
package/src/verify.ts DELETED
@@ -1,20 +0,0 @@
1
- import { DecodedJwt } from './types.js';
2
-
3
- /**
4
- * Verify the JWT's signature.
5
- * @param {DecodedJwt} decoded
6
- */
7
- export async function verifyJwtSignature(
8
- decoded: DecodedJwt,
9
- key: CryptoKey
10
- ): Promise<boolean> {
11
- const encoder = new TextEncoder();
12
- const data = encoder.encode(`${decoded.raw.header}.${decoded.raw.payload}`);
13
-
14
- return crypto.subtle.verify(
15
- 'RSASSA-PKCS1-v1_5',
16
- key,
17
- decoded.signature,
18
- data
19
- );
20
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes