jose 5.9.4 → 5.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -32
- package/dist/browser/jwks/remote.js +1 -1
- package/dist/node/cjs/jwe/compact/decrypt.js +1 -2
- package/dist/node/cjs/jwe/flattened/decrypt.js +1 -2
- package/dist/node/cjs/jwe/general/decrypt.js +1 -2
- package/dist/node/cjs/jwk/embedded.js +1 -2
- package/dist/node/cjs/jwk/thumbprint.js +2 -3
- package/dist/node/cjs/jwks/local.js +1 -2
- package/dist/node/cjs/jwks/remote.js +3 -3
- package/dist/node/cjs/jws/compact/verify.js +1 -2
- package/dist/node/cjs/jws/flattened/verify.js +1 -2
- package/dist/node/cjs/jws/general/verify.js +1 -2
- package/dist/node/cjs/jwt/decrypt.js +1 -2
- package/dist/node/cjs/jwt/verify.js +1 -2
- package/dist/node/cjs/key/export.js +3 -4
- package/dist/node/cjs/key/generate_key_pair.js +1 -2
- package/dist/node/cjs/key/generate_secret.js +1 -2
- package/dist/node/cjs/key/import.js +4 -5
- package/dist/node/cjs/lib/aesgcmkw.js +2 -3
- package/dist/node/cjs/lib/buffer_utils.js +7 -7
- package/dist/node/cjs/lib/cek.js +1 -2
- package/dist/node/cjs/lib/check_p2s.js +1 -1
- package/dist/node/cjs/lib/crypto_key.js +2 -3
- package/dist/node/cjs/lib/invalid_key_input.js +1 -2
- package/dist/node/cjs/lib/is_jwk.js +4 -5
- package/dist/node/cjs/lib/is_object.js +1 -1
- package/dist/node/cjs/lib/iv.js +1 -2
- package/dist/node/cjs/runtime/cbc_tag.js +1 -1
- package/dist/node/cjs/runtime/dsa_digest.js +1 -1
- package/dist/node/cjs/runtime/ecdhes.js +3 -3
- package/dist/node/cjs/runtime/generate.js +2 -3
- package/dist/node/cjs/runtime/get_sign_verify_key.js +1 -1
- package/dist/node/cjs/runtime/hmac_digest.js +1 -1
- package/dist/node/cjs/runtime/node_key.js +1 -1
- package/dist/node/cjs/util/decode_jwt.js +1 -2
- package/dist/node/cjs/util/decode_protected_header.js +1 -2
- package/dist/node/esm/jwks/remote.js +1 -1
- package/package.json +151 -211
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<source media="(prefers-color-scheme: dark)" srcset="./sponsor/Auth0byOkta_dark.png">
|
|
9
9
|
<source media="(prefers-color-scheme: light)" srcset="./sponsor/Auth0byOkta_light.png">
|
|
10
10
|
<img height="65" align="left" alt="Auth0 by Okta" src="./sponsor/Auth0byOkta_light.png">
|
|
11
|
-
</picture>
|
|
11
|
+
</picture>
|
|
12
12
|
|
|
13
13
|
If you want to quickly add JWT authentication to JavaScript apps, feel free to check out Auth0's JavaScript SDK and free plan. [Create an Auth0 account; it's free!][sponsor-auth0]<br><br>
|
|
14
14
|
|
|
@@ -38,69 +38,69 @@ const jose = require('jose')
|
|
|
38
38
|
|
|
39
39
|
The `jose` module supports JSON Web Tokens (JWT) and provides functionality for signing and verifying tokens, as well as their JWT Claims Set validation.
|
|
40
40
|
|
|
41
|
-
- [JWT Claims Set Validation & Signature Verification](docs/functions/
|
|
42
|
-
- [Using a remote JSON Web Key Set (JWKS)](docs/functions/
|
|
43
|
-
- [Using a local JSON Web Key Set (JWKS)](docs/functions/
|
|
44
|
-
- [Signing](docs/classes/
|
|
41
|
+
- [JWT Claims Set Validation & Signature Verification](docs/jwt/verify/functions/jwtVerify.md) using the `jwtVerify` function
|
|
42
|
+
- [Using a remote JSON Web Key Set (JWKS)](docs/jwks/remote/functions/createRemoteJWKSet.md)
|
|
43
|
+
- [Using a local JSON Web Key Set (JWKS)](docs/jwks/local/functions/createLocalJWKSet.md)
|
|
44
|
+
- [Signing](docs/jwt/sign/classes/SignJWT.md) using the `SignJWT` class
|
|
45
45
|
- Utility functions
|
|
46
|
-
- [Decoding Token's Protected Header](docs/functions/
|
|
47
|
-
- [Decoding JWT Claims Set](docs/functions/
|
|
46
|
+
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
|
47
|
+
- [Decoding JWT Claims Set](docs/util/decode_jwt/functions/decodeJwt.md) prior to its validation
|
|
48
48
|
|
|
49
49
|
### Encrypted JSON Web Tokens
|
|
50
50
|
|
|
51
51
|
The `jose` module supports encrypted JSON Web Tokens and provides functionality for encrypting and decrypting tokens, as well as their JWT Claims Set validation.
|
|
52
52
|
|
|
53
|
-
- [Decryption & JWT Claims Set Validation](docs/functions/
|
|
54
|
-
- [Encryption](docs/classes/
|
|
53
|
+
- [Decryption & JWT Claims Set Validation](docs/jwt/decrypt/functions/jwtDecrypt.md) using the `jwtDecrypt` function
|
|
54
|
+
- [Encryption](docs/jwt/encrypt/classes/EncryptJWT.md) using the `EncryptJWT` class
|
|
55
55
|
- Utility functions
|
|
56
|
-
- [Decoding Token's Protected Header](docs/functions/
|
|
56
|
+
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
|
57
57
|
|
|
58
58
|
### Key Utilities
|
|
59
59
|
|
|
60
60
|
The `jose` module supports importing, exporting, and generating keys and secrets in various formats, including PEM formats like SPKI, X.509 certificate, and PKCS #8, as well as JSON Web Key (JWK).
|
|
61
61
|
|
|
62
62
|
- Key Import Functions
|
|
63
|
-
- [JWK Import](docs/functions/
|
|
64
|
-
- [Public Key Import (SPKI)](docs/functions/
|
|
65
|
-
- [Public Key Import (X.509 Certificate)](docs/functions/
|
|
66
|
-
- [Private Key Import (PKCS #8)](docs/functions/
|
|
63
|
+
- [JWK Import](docs/key/import/functions/importJWK.md)
|
|
64
|
+
- [Public Key Import (SPKI)](docs/key/import/functions/importSPKI.md)
|
|
65
|
+
- [Public Key Import (X.509 Certificate)](docs/key/import/functions/importX509.md)
|
|
66
|
+
- [Private Key Import (PKCS #8)](docs/key/import/functions/importPKCS8.md)
|
|
67
67
|
- Key and Secret Generation Functions
|
|
68
|
-
- [Asymmetric Key Pair Generation](docs/functions/
|
|
69
|
-
- [Symmetric Secret Generation](docs/functions/
|
|
68
|
+
- [Asymmetric Key Pair Generation](docs/key/generate_key_pair/functions/generateKeyPair.md)
|
|
69
|
+
- [Symmetric Secret Generation](docs/key/generate_secret/functions/generateSecret.md)
|
|
70
70
|
- Key Export Functions
|
|
71
|
-
- [JWK Export](docs/functions/
|
|
72
|
-
- [Private Key Export](docs/functions/
|
|
73
|
-
- [Public Key Export](docs/functions/
|
|
71
|
+
- [JWK Export](docs/key/export/functions/exportJWK.md)
|
|
72
|
+
- [Private Key Export](docs/key/export/functions/exportPKCS8.md)
|
|
73
|
+
- [Public Key Export](docs/key/export/functions/exportSPKI.md)
|
|
74
74
|
|
|
75
75
|
### JSON Web Signature (JWS)
|
|
76
76
|
|
|
77
77
|
The `jose` module supports signing and verification of JWS messages with arbitrary payloads in Compact, Flattened JSON, and General JSON serialization syntaxes.
|
|
78
78
|
|
|
79
|
-
- Signing - [Compact](docs/classes/
|
|
80
|
-
- Verification - [Compact](docs/functions/
|
|
81
|
-
- [Using a remote JSON Web Key Set (JWKS)](docs/functions/
|
|
82
|
-
- [Using a local JSON Web Key Set (JWKS)](docs/functions/
|
|
79
|
+
- Signing - [Compact](docs/jws/compact/sign/classes/CompactSign.md), [Flattened JSON](docs/jws/flattened/sign/classes/FlattenedSign.md), [General JSON](docs/jws/general/sign/classes/GeneralSign.md)
|
|
80
|
+
- Verification - [Compact](docs/jws/compact/verify/functions/compactVerify.md), [Flattened JSON](docs/jws/flattened/verify/functions/flattenedVerify.md), [General JSON](docs/jws/general/verify/functions/generalVerify.md)
|
|
81
|
+
- [Using a remote JSON Web Key Set (JWKS)](docs/jwks/remote/functions/createRemoteJWKSet.md)
|
|
82
|
+
- [Using a local JSON Web Key Set (JWKS)](docs/jwks/local/functions/createLocalJWKSet.md)
|
|
83
83
|
- Utility functions
|
|
84
|
-
- [Decoding Token's Protected Header](docs/functions/
|
|
84
|
+
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
|
85
85
|
|
|
86
86
|
### JSON Web Encryption (JWE)
|
|
87
87
|
|
|
88
88
|
The `jose` module supports encryption and decryption of JWE messages with arbitrary plaintext in Compact, Flattened JSON, and General JSON serialization syntaxes.
|
|
89
89
|
|
|
90
|
-
- Encryption - [Compact](docs/classes/
|
|
91
|
-
- Decryption - [Compact](docs/functions/
|
|
90
|
+
- Encryption - [Compact](docs/jwe/compact/encrypt/classes/CompactEncrypt.md), [Flattened JSON](docs/jwe/flattened/encrypt/classes/FlattenedEncrypt.md), [General JSON](docs/jwe/general/encrypt/classes/GeneralEncrypt.md)
|
|
91
|
+
- Decryption - [Compact](docs/jwe/compact/decrypt/functions/compactDecrypt.md), [Flattened JSON](docs/jwe/flattened/decrypt/functions/flattenedDecrypt.md), [General JSON](docs/jwe/general/decrypt/functions/generalDecrypt.md)
|
|
92
92
|
- Utility functions
|
|
93
|
-
- [Decoding Token's Protected Header](docs/functions/
|
|
93
|
+
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
|
94
94
|
|
|
95
95
|
### Other
|
|
96
96
|
|
|
97
97
|
The following are additional features and utilities provided by the `jose` module:
|
|
98
98
|
|
|
99
|
-
- [Calculating JWK Thumbprint](docs/functions/
|
|
100
|
-
- [Calculating JWK Thumbprint URI](docs/functions/
|
|
101
|
-
- [Verification using a JWK Embedded in a JWS Header](docs/functions/
|
|
102
|
-
- [Unsecured JWT](docs/classes/
|
|
103
|
-
- [JOSE Errors](docs/
|
|
99
|
+
- [Calculating JWK Thumbprint](docs/jwk/thumbprint/functions/calculateJwkThumbprint.md)
|
|
100
|
+
- [Calculating JWK Thumbprint URI](docs/jwk/thumbprint/functions/calculateJwkThumbprintUri.md)
|
|
101
|
+
- [Verification using a JWK Embedded in a JWS Header](docs/jwk/embedded/functions/EmbeddedJWK.md)
|
|
102
|
+
- [Unsecured JWT](docs/jwt/unsecured/classes/UnsecuredJWT.md)
|
|
103
|
+
- [JOSE Errors](docs/util/errors/README.md)
|
|
104
104
|
|
|
105
105
|
## Supported Runtimes
|
|
106
106
|
|
|
@@ -10,7 +10,7 @@ function isCloudflareWorkers() {
|
|
|
10
10
|
let USER_AGENT;
|
|
11
11
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
12
12
|
const NAME = 'jose';
|
|
13
|
-
const VERSION = 'v5.9.
|
|
13
|
+
const VERSION = 'v5.9.5';
|
|
14
14
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
15
15
|
}
|
|
16
16
|
export const jwksCache = Symbol();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compactDecrypt =
|
|
3
|
+
exports.compactDecrypt = compactDecrypt;
|
|
4
4
|
const decrypt_js_1 = require("../flattened/decrypt.js");
|
|
5
5
|
const errors_js_1 = require("../../util/errors.js");
|
|
6
6
|
const buffer_utils_js_1 = require("../../lib/buffer_utils.js");
|
|
@@ -28,4 +28,3 @@ async function compactDecrypt(jwe, key, options) {
|
|
|
28
28
|
}
|
|
29
29
|
return result;
|
|
30
30
|
}
|
|
31
|
-
exports.compactDecrypt = compactDecrypt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flattenedDecrypt =
|
|
3
|
+
exports.flattenedDecrypt = flattenedDecrypt;
|
|
4
4
|
const base64url_js_1 = require("../../runtime/base64url.js");
|
|
5
5
|
const decrypt_js_1 = require("../../runtime/decrypt.js");
|
|
6
6
|
const errors_js_1 = require("../../util/errors.js");
|
|
@@ -162,4 +162,3 @@ async function flattenedDecrypt(jwe, key, options) {
|
|
|
162
162
|
}
|
|
163
163
|
return result;
|
|
164
164
|
}
|
|
165
|
-
exports.flattenedDecrypt = flattenedDecrypt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generalDecrypt =
|
|
3
|
+
exports.generalDecrypt = generalDecrypt;
|
|
4
4
|
const decrypt_js_1 = require("../flattened/decrypt.js");
|
|
5
5
|
const errors_js_1 = require("../../util/errors.js");
|
|
6
6
|
const is_object_js_1 = require("../../lib/is_object.js");
|
|
@@ -32,4 +32,3 @@ async function generalDecrypt(jwe, key, options) {
|
|
|
32
32
|
}
|
|
33
33
|
throw new errors_js_1.JWEDecryptionFailed();
|
|
34
34
|
}
|
|
35
|
-
exports.generalDecrypt = generalDecrypt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmbeddedJWK =
|
|
3
|
+
exports.EmbeddedJWK = EmbeddedJWK;
|
|
4
4
|
const import_js_1 = require("../key/import.js");
|
|
5
5
|
const is_object_js_1 = require("../lib/is_object.js");
|
|
6
6
|
const errors_js_1 = require("../util/errors.js");
|
|
@@ -18,4 +18,3 @@ async function EmbeddedJWK(protectedHeader, token) {
|
|
|
18
18
|
}
|
|
19
19
|
return key;
|
|
20
20
|
}
|
|
21
|
-
exports.EmbeddedJWK = EmbeddedJWK;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.calculateJwkThumbprint = calculateJwkThumbprint;
|
|
4
|
+
exports.calculateJwkThumbprintUri = calculateJwkThumbprintUri;
|
|
4
5
|
const digest_js_1 = require("../runtime/digest.js");
|
|
5
6
|
const base64url_js_1 = require("../runtime/base64url.js");
|
|
6
7
|
const errors_js_1 = require("../util/errors.js");
|
|
@@ -49,10 +50,8 @@ async function calculateJwkThumbprint(jwk, digestAlgorithm) {
|
|
|
49
50
|
const data = buffer_utils_js_1.encoder.encode(JSON.stringify(components));
|
|
50
51
|
return (0, base64url_js_1.encode)(await (0, digest_js_1.default)(digestAlgorithm, data));
|
|
51
52
|
}
|
|
52
|
-
exports.calculateJwkThumbprint = calculateJwkThumbprint;
|
|
53
53
|
async function calculateJwkThumbprintUri(jwk, digestAlgorithm) {
|
|
54
54
|
digestAlgorithm ??= 'sha256';
|
|
55
55
|
const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm);
|
|
56
56
|
return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`;
|
|
57
57
|
}
|
|
58
|
-
exports.calculateJwkThumbprintUri = calculateJwkThumbprintUri;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createLocalJWKSet =
|
|
3
|
+
exports.createLocalJWKSet = createLocalJWKSet;
|
|
4
4
|
const import_js_1 = require("../key/import.js");
|
|
5
5
|
const errors_js_1 = require("../util/errors.js");
|
|
6
6
|
const is_object_js_1 = require("../lib/is_object.js");
|
|
@@ -123,4 +123,3 @@ function createLocalJWKSet(jwks) {
|
|
|
123
123
|
});
|
|
124
124
|
return localJWKSet;
|
|
125
125
|
}
|
|
126
|
-
exports.createLocalJWKSet = createLocalJWKSet;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.experimental_jwksCache = exports.
|
|
3
|
+
exports.experimental_jwksCache = exports.jwksCache = void 0;
|
|
4
|
+
exports.createRemoteJWKSet = createRemoteJWKSet;
|
|
4
5
|
const fetch_jwks_js_1 = require("../runtime/fetch_jwks.js");
|
|
5
6
|
const errors_js_1 = require("../util/errors.js");
|
|
6
7
|
const local_js_1 = require("./local.js");
|
|
@@ -13,7 +14,7 @@ function isCloudflareWorkers() {
|
|
|
13
14
|
let USER_AGENT;
|
|
14
15
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
15
16
|
const NAME = 'jose';
|
|
16
|
-
const VERSION = 'v5.9.
|
|
17
|
+
const VERSION = 'v5.9.5';
|
|
17
18
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
18
19
|
}
|
|
19
20
|
exports.jwksCache = Symbol();
|
|
@@ -148,5 +149,4 @@ function createRemoteJWKSet(url, options) {
|
|
|
148
149
|
});
|
|
149
150
|
return remoteJWKSet;
|
|
150
151
|
}
|
|
151
|
-
exports.createRemoteJWKSet = createRemoteJWKSet;
|
|
152
152
|
exports.experimental_jwksCache = exports.jwksCache;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compactVerify =
|
|
3
|
+
exports.compactVerify = compactVerify;
|
|
4
4
|
const verify_js_1 = require("../flattened/verify.js");
|
|
5
5
|
const errors_js_1 = require("../../util/errors.js");
|
|
6
6
|
const buffer_utils_js_1 = require("../../lib/buffer_utils.js");
|
|
@@ -22,4 +22,3 @@ async function compactVerify(jws, key, options) {
|
|
|
22
22
|
}
|
|
23
23
|
return result;
|
|
24
24
|
}
|
|
25
|
-
exports.compactVerify = compactVerify;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flattenedVerify =
|
|
3
|
+
exports.flattenedVerify = flattenedVerify;
|
|
4
4
|
const base64url_js_1 = require("../../runtime/base64url.js");
|
|
5
5
|
const verify_js_1 = require("../../runtime/verify.js");
|
|
6
6
|
const errors_js_1 = require("../../util/errors.js");
|
|
@@ -123,4 +123,3 @@ async function flattenedVerify(jws, key, options) {
|
|
|
123
123
|
}
|
|
124
124
|
return result;
|
|
125
125
|
}
|
|
126
|
-
exports.flattenedVerify = flattenedVerify;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generalVerify =
|
|
3
|
+
exports.generalVerify = generalVerify;
|
|
4
4
|
const verify_js_1 = require("../flattened/verify.js");
|
|
5
5
|
const errors_js_1 = require("../../util/errors.js");
|
|
6
6
|
const is_object_js_1 = require("../../lib/is_object.js");
|
|
@@ -25,4 +25,3 @@ async function generalVerify(jws, key, options) {
|
|
|
25
25
|
}
|
|
26
26
|
throw new errors_js_1.JWSSignatureVerificationFailed();
|
|
27
27
|
}
|
|
28
|
-
exports.generalVerify = generalVerify;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jwtDecrypt =
|
|
3
|
+
exports.jwtDecrypt = jwtDecrypt;
|
|
4
4
|
const decrypt_js_1 = require("../jwe/compact/decrypt.js");
|
|
5
5
|
const jwt_claims_set_js_1 = require("../lib/jwt_claims_set.js");
|
|
6
6
|
const errors_js_1 = require("../util/errors.js");
|
|
@@ -24,4 +24,3 @@ async function jwtDecrypt(jwt, key, options) {
|
|
|
24
24
|
}
|
|
25
25
|
return result;
|
|
26
26
|
}
|
|
27
|
-
exports.jwtDecrypt = jwtDecrypt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jwtVerify =
|
|
3
|
+
exports.jwtVerify = jwtVerify;
|
|
4
4
|
const verify_js_1 = require("../jws/compact/verify.js");
|
|
5
5
|
const jwt_claims_set_js_1 = require("../lib/jwt_claims_set.js");
|
|
6
6
|
const errors_js_1 = require("../util/errors.js");
|
|
@@ -16,4 +16,3 @@ async function jwtVerify(jwt, key, options) {
|
|
|
16
16
|
}
|
|
17
17
|
return result;
|
|
18
18
|
}
|
|
19
|
-
exports.jwtVerify = jwtVerify;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.exportSPKI = exportSPKI;
|
|
4
|
+
exports.exportPKCS8 = exportPKCS8;
|
|
5
|
+
exports.exportJWK = exportJWK;
|
|
4
6
|
const asn1_js_1 = require("../runtime/asn1.js");
|
|
5
7
|
const asn1_js_2 = require("../runtime/asn1.js");
|
|
6
8
|
const key_to_jwk_js_1 = require("../runtime/key_to_jwk.js");
|
|
7
9
|
async function exportSPKI(key) {
|
|
8
10
|
return (0, asn1_js_1.toSPKI)(key);
|
|
9
11
|
}
|
|
10
|
-
exports.exportSPKI = exportSPKI;
|
|
11
12
|
async function exportPKCS8(key) {
|
|
12
13
|
return (0, asn1_js_2.toPKCS8)(key);
|
|
13
14
|
}
|
|
14
|
-
exports.exportPKCS8 = exportPKCS8;
|
|
15
15
|
async function exportJWK(key) {
|
|
16
16
|
return (0, key_to_jwk_js_1.default)(key);
|
|
17
17
|
}
|
|
18
|
-
exports.exportJWK = exportJWK;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateKeyPair =
|
|
3
|
+
exports.generateKeyPair = generateKeyPair;
|
|
4
4
|
const generate_js_1 = require("../runtime/generate.js");
|
|
5
5
|
async function generateKeyPair(alg, options) {
|
|
6
6
|
return (0, generate_js_1.generateKeyPair)(alg, options);
|
|
7
7
|
}
|
|
8
|
-
exports.generateKeyPair = generateKeyPair;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateSecret =
|
|
3
|
+
exports.generateSecret = generateSecret;
|
|
4
4
|
const generate_js_1 = require("../runtime/generate.js");
|
|
5
5
|
async function generateSecret(alg, options) {
|
|
6
6
|
return (0, generate_js_1.generateSecret)(alg, options);
|
|
7
7
|
}
|
|
8
|
-
exports.generateSecret = generateSecret;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.importSPKI = importSPKI;
|
|
4
|
+
exports.importX509 = importX509;
|
|
5
|
+
exports.importPKCS8 = importPKCS8;
|
|
6
|
+
exports.importJWK = importJWK;
|
|
4
7
|
const base64url_js_1 = require("../runtime/base64url.js");
|
|
5
8
|
const asn1_js_1 = require("../runtime/asn1.js");
|
|
6
9
|
const jwk_to_key_js_1 = require("../runtime/jwk_to_key.js");
|
|
@@ -12,21 +15,18 @@ async function importSPKI(spki, alg, options) {
|
|
|
12
15
|
}
|
|
13
16
|
return (0, asn1_js_1.fromSPKI)(spki, alg, options);
|
|
14
17
|
}
|
|
15
|
-
exports.importSPKI = importSPKI;
|
|
16
18
|
async function importX509(x509, alg, options) {
|
|
17
19
|
if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) {
|
|
18
20
|
throw new TypeError('"x509" must be X.509 formatted string');
|
|
19
21
|
}
|
|
20
22
|
return (0, asn1_js_1.fromX509)(x509, alg, options);
|
|
21
23
|
}
|
|
22
|
-
exports.importX509 = importX509;
|
|
23
24
|
async function importPKCS8(pkcs8, alg, options) {
|
|
24
25
|
if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) {
|
|
25
26
|
throw new TypeError('"pkcs8" must be PKCS#8 formatted string');
|
|
26
27
|
}
|
|
27
28
|
return (0, asn1_js_1.fromPKCS8)(pkcs8, alg, options);
|
|
28
29
|
}
|
|
29
|
-
exports.importPKCS8 = importPKCS8;
|
|
30
30
|
async function importJWK(jwk, alg) {
|
|
31
31
|
if (!(0, is_object_js_1.default)(jwk)) {
|
|
32
32
|
throw new TypeError('JWK must be an object');
|
|
@@ -49,4 +49,3 @@ async function importJWK(jwk, alg) {
|
|
|
49
49
|
throw new errors_js_1.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value');
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
exports.importJWK = importJWK;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.wrap = wrap;
|
|
4
|
+
exports.unwrap = unwrap;
|
|
4
5
|
const encrypt_js_1 = require("../runtime/encrypt.js");
|
|
5
6
|
const decrypt_js_1 = require("../runtime/decrypt.js");
|
|
6
7
|
const base64url_js_1 = require("../runtime/base64url.js");
|
|
@@ -13,9 +14,7 @@ async function wrap(alg, key, cek, iv) {
|
|
|
13
14
|
tag: (0, base64url_js_1.encode)(wrapped.tag),
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
exports.wrap = wrap;
|
|
17
17
|
async function unwrap(alg, key, encryptedKey, iv, tag) {
|
|
18
18
|
const jweAlgorithm = alg.slice(0, 7);
|
|
19
19
|
return (0, decrypt_js_1.default)(jweAlgorithm, key, encryptedKey, iv, tag, new Uint8Array(0));
|
|
20
20
|
}
|
|
21
|
-
exports.unwrap = unwrap;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.decoder = exports.encoder = void 0;
|
|
4
|
+
exports.concat = concat;
|
|
5
|
+
exports.p2s = p2s;
|
|
6
|
+
exports.uint64be = uint64be;
|
|
7
|
+
exports.uint32be = uint32be;
|
|
8
|
+
exports.lengthAndInput = lengthAndInput;
|
|
9
|
+
exports.concatKdf = concatKdf;
|
|
4
10
|
const digest_js_1 = require("../runtime/digest.js");
|
|
5
11
|
exports.encoder = new TextEncoder();
|
|
6
12
|
exports.decoder = new TextDecoder();
|
|
@@ -15,11 +21,9 @@ function concat(...buffers) {
|
|
|
15
21
|
}
|
|
16
22
|
return buf;
|
|
17
23
|
}
|
|
18
|
-
exports.concat = concat;
|
|
19
24
|
function p2s(alg, p2sInput) {
|
|
20
25
|
return concat(exports.encoder.encode(alg), new Uint8Array([0]), p2sInput);
|
|
21
26
|
}
|
|
22
|
-
exports.p2s = p2s;
|
|
23
27
|
function writeUInt32BE(buf, value, offset) {
|
|
24
28
|
if (value < 0 || value >= MAX_INT32) {
|
|
25
29
|
throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);
|
|
@@ -34,17 +38,14 @@ function uint64be(value) {
|
|
|
34
38
|
writeUInt32BE(buf, low, 4);
|
|
35
39
|
return buf;
|
|
36
40
|
}
|
|
37
|
-
exports.uint64be = uint64be;
|
|
38
41
|
function uint32be(value) {
|
|
39
42
|
const buf = new Uint8Array(4);
|
|
40
43
|
writeUInt32BE(buf, value);
|
|
41
44
|
return buf;
|
|
42
45
|
}
|
|
43
|
-
exports.uint32be = uint32be;
|
|
44
46
|
function lengthAndInput(input) {
|
|
45
47
|
return concat(uint32be(input.length), input);
|
|
46
48
|
}
|
|
47
|
-
exports.lengthAndInput = lengthAndInput;
|
|
48
49
|
async function concatKdf(secret, bits, value) {
|
|
49
50
|
const iterations = Math.ceil((bits >> 3) / 32);
|
|
50
51
|
const res = new Uint8Array(iterations * 32);
|
|
@@ -57,4 +58,3 @@ async function concatKdf(secret, bits, value) {
|
|
|
57
58
|
}
|
|
58
59
|
return res.slice(0, bits >> 3);
|
|
59
60
|
}
|
|
60
|
-
exports.concatKdf = concatKdf;
|
package/dist/node/cjs/lib/cek.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bitLength =
|
|
3
|
+
exports.bitLength = bitLength;
|
|
4
4
|
const errors_js_1 = require("../util/errors.js");
|
|
5
5
|
const random_js_1 = require("../runtime/random.js");
|
|
6
6
|
function bitLength(alg) {
|
|
@@ -20,5 +20,4 @@ function bitLength(alg) {
|
|
|
20
20
|
throw new errors_js_1.JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
exports.bitLength = bitLength;
|
|
24
23
|
exports.default = (alg) => (0, random_js_1.default)(new Uint8Array(bitLength(alg) >> 3));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = checkP2s;
|
|
3
4
|
const errors_js_1 = require("../util/errors.js");
|
|
4
5
|
function checkP2s(p2s) {
|
|
5
6
|
if (!(p2s instanceof Uint8Array) || p2s.length < 8) {
|
|
6
7
|
throw new errors_js_1.JWEInvalid('PBES2 Salt Input must be 8 or more octets');
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
exports.default = checkP2s;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.checkSigCryptoKey = checkSigCryptoKey;
|
|
4
|
+
exports.checkEncCryptoKey = checkEncCryptoKey;
|
|
4
5
|
function unusable(name, prop = 'algorithm.name') {
|
|
5
6
|
return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);
|
|
6
7
|
}
|
|
@@ -95,7 +96,6 @@ function checkSigCryptoKey(key, alg, ...usages) {
|
|
|
95
96
|
}
|
|
96
97
|
checkUsage(key, usages);
|
|
97
98
|
}
|
|
98
|
-
exports.checkSigCryptoKey = checkSigCryptoKey;
|
|
99
99
|
function checkEncCryptoKey(key, alg, ...usages) {
|
|
100
100
|
switch (alg) {
|
|
101
101
|
case 'A128GCM':
|
|
@@ -154,4 +154,3 @@ function checkEncCryptoKey(key, alg, ...usages) {
|
|
|
154
154
|
}
|
|
155
155
|
checkUsage(key, usages);
|
|
156
156
|
}
|
|
157
|
-
exports.checkEncCryptoKey = checkEncCryptoKey;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withAlg =
|
|
3
|
+
exports.withAlg = withAlg;
|
|
4
4
|
function message(msg, actual, ...types) {
|
|
5
5
|
types = types.filter(Boolean);
|
|
6
6
|
if (types.length > 2) {
|
|
@@ -32,4 +32,3 @@ exports.default = (actual, ...types) => {
|
|
|
32
32
|
function withAlg(alg, actual, ...types) {
|
|
33
33
|
return message(`Key for the ${alg} algorithm must be `, actual, ...types);
|
|
34
34
|
}
|
|
35
|
-
exports.withAlg = withAlg;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isJWK = isJWK;
|
|
4
|
+
exports.isPrivateJWK = isPrivateJWK;
|
|
5
|
+
exports.isPublicJWK = isPublicJWK;
|
|
6
|
+
exports.isSecretJWK = isSecretJWK;
|
|
4
7
|
const is_object_js_1 = require("./is_object.js");
|
|
5
8
|
function isJWK(key) {
|
|
6
9
|
return (0, is_object_js_1.default)(key) && typeof key.kty === 'string';
|
|
7
10
|
}
|
|
8
|
-
exports.isJWK = isJWK;
|
|
9
11
|
function isPrivateJWK(key) {
|
|
10
12
|
return key.kty !== 'oct' && typeof key.d === 'string';
|
|
11
13
|
}
|
|
12
|
-
exports.isPrivateJWK = isPrivateJWK;
|
|
13
14
|
function isPublicJWK(key) {
|
|
14
15
|
return key.kty !== 'oct' && typeof key.d === 'undefined';
|
|
15
16
|
}
|
|
16
|
-
exports.isPublicJWK = isPublicJWK;
|
|
17
17
|
function isSecretJWK(key) {
|
|
18
18
|
return isJWK(key) && key.kty === 'oct' && typeof key.k === 'string';
|
|
19
19
|
}
|
|
20
|
-
exports.isSecretJWK = isSecretJWK;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = isObject;
|
|
3
4
|
function isObjectLike(value) {
|
|
4
5
|
return typeof value === 'object' && value !== null;
|
|
5
6
|
}
|
|
@@ -16,4 +17,3 @@ function isObject(input) {
|
|
|
16
17
|
}
|
|
17
18
|
return Object.getPrototypeOf(input) === proto;
|
|
18
19
|
}
|
|
19
|
-
exports.default = isObject;
|
package/dist/node/cjs/lib/iv.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bitLength =
|
|
3
|
+
exports.bitLength = bitLength;
|
|
4
4
|
const errors_js_1 = require("../util/errors.js");
|
|
5
5
|
const random_js_1 = require("../runtime/random.js");
|
|
6
6
|
function bitLength(alg) {
|
|
@@ -20,5 +20,4 @@ function bitLength(alg) {
|
|
|
20
20
|
throw new errors_js_1.JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
exports.bitLength = bitLength;
|
|
24
23
|
exports.default = (alg) => (0, random_js_1.default)(new Uint8Array(bitLength(alg) >> 3));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = cbcTag;
|
|
3
4
|
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const buffer_utils_js_1 = require("../lib/buffer_utils.js");
|
|
5
6
|
function cbcTag(aad, iv, ciphertext, macSize, macKey, keySize) {
|
|
@@ -8,4 +9,3 @@ function cbcTag(aad, iv, ciphertext, macSize, macKey, keySize) {
|
|
|
8
9
|
hmac.update(macData);
|
|
9
10
|
return hmac.digest().slice(0, keySize >> 3);
|
|
10
11
|
}
|
|
11
|
-
exports.default = cbcTag;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = dsaDigest;
|
|
3
4
|
const errors_js_1 = require("../util/errors.js");
|
|
4
5
|
function dsaDigest(alg) {
|
|
5
6
|
switch (alg) {
|
|
@@ -22,4 +23,3 @@ function dsaDigest(alg) {
|
|
|
22
23
|
throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
exports.default = dsaDigest;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ecdhAllowed =
|
|
3
|
+
exports.ecdhAllowed = void 0;
|
|
4
|
+
exports.deriveKey = deriveKey;
|
|
5
|
+
exports.generateEpk = generateEpk;
|
|
4
6
|
const node_crypto_1 = require("node:crypto");
|
|
5
7
|
const node_util_1 = require("node:util");
|
|
6
8
|
const get_named_curve_js_1 = require("./get_named_curve.js");
|
|
@@ -39,7 +41,6 @@ async function deriveKey(publicKee, privateKee, algorithm, keyLength, apu = new
|
|
|
39
41
|
const sharedSecret = (0, node_crypto_1.diffieHellman)({ privateKey, publicKey });
|
|
40
42
|
return (0, buffer_utils_js_1.concatKdf)(sharedSecret, keyLength, value);
|
|
41
43
|
}
|
|
42
|
-
exports.deriveKey = deriveKey;
|
|
43
44
|
async function generateEpk(kee) {
|
|
44
45
|
let key;
|
|
45
46
|
if ((0, webcrypto_js_1.isCryptoKey)(kee)) {
|
|
@@ -65,6 +66,5 @@ async function generateEpk(kee) {
|
|
|
65
66
|
throw new errors_js_1.JOSENotSupported('Invalid or unsupported EPK');
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
|
-
exports.generateEpk = generateEpk;
|
|
69
69
|
const ecdhAllowed = (key) => ['P-256', 'P-384', 'P-521', 'X25519', 'X448'].includes((0, get_named_curve_js_1.default)(key));
|
|
70
70
|
exports.ecdhAllowed = ecdhAllowed;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.generateSecret = generateSecret;
|
|
4
|
+
exports.generateKeyPair = generateKeyPair;
|
|
4
5
|
const node_crypto_1 = require("node:crypto");
|
|
5
6
|
const node_util_1 = require("node:util");
|
|
6
7
|
const random_js_1 = require("./random.js");
|
|
@@ -33,7 +34,6 @@ async function generateSecret(alg, options) {
|
|
|
33
34
|
}
|
|
34
35
|
return (0, node_crypto_1.createSecretKey)((0, random_js_1.default)(new Uint8Array(length >> 3)));
|
|
35
36
|
}
|
|
36
|
-
exports.generateSecret = generateSecret;
|
|
37
37
|
async function generateKeyPair(alg, options) {
|
|
38
38
|
switch (alg) {
|
|
39
39
|
case 'RS256':
|
|
@@ -99,4 +99,3 @@ async function generateKeyPair(alg, options) {
|
|
|
99
99
|
throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
exports.generateKeyPair = generateKeyPair;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = getSignVerifyKey;
|
|
3
4
|
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const webcrypto_js_1 = require("./webcrypto.js");
|
|
5
6
|
const crypto_key_js_1 = require("../lib/crypto_key.js");
|
|
@@ -28,4 +29,3 @@ function getSignVerifyKey(alg, key, usage) {
|
|
|
28
29
|
}
|
|
29
30
|
throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array', 'JSON Web Key'));
|
|
30
31
|
}
|
|
31
|
-
exports.default = getSignVerifyKey;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = hmacDigest;
|
|
3
4
|
const errors_js_1 = require("../util/errors.js");
|
|
4
5
|
function hmacDigest(alg) {
|
|
5
6
|
switch (alg) {
|
|
@@ -13,4 +14,3 @@ function hmacDigest(alg) {
|
|
|
13
14
|
throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
exports.default = hmacDigest;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = keyForCrypto;
|
|
3
4
|
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const get_named_curve_js_1 = require("./get_named_curve.js");
|
|
5
6
|
const errors_js_1 = require("../util/errors.js");
|
|
@@ -103,4 +104,3 @@ function keyForCrypto(alg, key) {
|
|
|
103
104
|
}
|
|
104
105
|
return options ? { ...options, key } : key;
|
|
105
106
|
}
|
|
106
|
-
exports.default = keyForCrypto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeJwt =
|
|
3
|
+
exports.decodeJwt = decodeJwt;
|
|
4
4
|
const base64url_js_1 = require("./base64url.js");
|
|
5
5
|
const buffer_utils_js_1 = require("../lib/buffer_utils.js");
|
|
6
6
|
const is_object_js_1 = require("../lib/is_object.js");
|
|
@@ -33,4 +33,3 @@ function decodeJwt(jwt) {
|
|
|
33
33
|
throw new errors_js_1.JWTInvalid('Invalid JWT Claims Set');
|
|
34
34
|
return result;
|
|
35
35
|
}
|
|
36
|
-
exports.decodeJwt = decodeJwt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeProtectedHeader =
|
|
3
|
+
exports.decodeProtectedHeader = decodeProtectedHeader;
|
|
4
4
|
const base64url_js_1 = require("./base64url.js");
|
|
5
5
|
const buffer_utils_js_1 = require("../lib/buffer_utils.js");
|
|
6
6
|
const is_object_js_1 = require("../lib/is_object.js");
|
|
@@ -35,4 +35,3 @@ function decodeProtectedHeader(token) {
|
|
|
35
35
|
throw new TypeError('Invalid Token or Protected Header formatting');
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
exports.decodeProtectedHeader = decodeProtectedHeader;
|
|
@@ -10,7 +10,7 @@ function isCloudflareWorkers() {
|
|
|
10
10
|
let USER_AGENT;
|
|
11
11
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
12
12
|
const NAME = 'jose';
|
|
13
|
-
const VERSION = 'v5.9.
|
|
13
|
+
const VERSION = 'v5.9.5';
|
|
14
14
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
15
15
|
}
|
|
16
16
|
export const jwksCache = Symbol();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jose",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.5",
|
|
4
4
|
"description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"browser",
|
|
@@ -62,303 +62,243 @@
|
|
|
62
62
|
"exports": {
|
|
63
63
|
".": {
|
|
64
64
|
"types": "./dist/types/index.d.ts",
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"import": "./dist/node/esm/index.js",
|
|
71
|
-
"require": "./dist/node/cjs/index.js"
|
|
65
|
+
"node": {
|
|
66
|
+
"import": "./dist/node/esm/index.js",
|
|
67
|
+
"require": "./dist/node/cjs/index.js"
|
|
68
|
+
},
|
|
69
|
+
"default": "./dist/browser/index.js"
|
|
72
70
|
},
|
|
73
71
|
"./jwk/embedded": {
|
|
74
72
|
"types": "./dist/types/jwk/embedded.d.ts",
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
"import": "./dist/node/esm/jwk/embedded.js",
|
|
81
|
-
"require": "./dist/node/cjs/jwk/embedded.js"
|
|
73
|
+
"node": {
|
|
74
|
+
"import": "./dist/node/esm/jwk/embedded.js",
|
|
75
|
+
"require": "./dist/node/cjs/jwk/embedded.js"
|
|
76
|
+
},
|
|
77
|
+
"default": "./dist/browser/jwk/embedded.js"
|
|
82
78
|
},
|
|
83
79
|
"./jwk/thumbprint": {
|
|
84
80
|
"types": "./dist/types/jwk/thumbprint.d.ts",
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"import": "./dist/node/esm/jwk/thumbprint.js",
|
|
91
|
-
"require": "./dist/node/cjs/jwk/thumbprint.js"
|
|
81
|
+
"node": {
|
|
82
|
+
"import": "./dist/node/esm/jwk/thumbprint.js",
|
|
83
|
+
"require": "./dist/node/cjs/jwk/thumbprint.js"
|
|
84
|
+
},
|
|
85
|
+
"default": "./dist/browser/jwk/thumbprint.js"
|
|
92
86
|
},
|
|
93
87
|
"./key/import": {
|
|
94
88
|
"types": "./dist/types/key/import.d.ts",
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"import": "./dist/node/esm/key/import.js",
|
|
101
|
-
"require": "./dist/node/cjs/key/import.js"
|
|
89
|
+
"node": {
|
|
90
|
+
"import": "./dist/node/esm/key/import.js",
|
|
91
|
+
"require": "./dist/node/cjs/key/import.js"
|
|
92
|
+
},
|
|
93
|
+
"default": "./dist/browser/key/import.js"
|
|
102
94
|
},
|
|
103
95
|
"./key/export": {
|
|
104
96
|
"types": "./dist/types/key/export.d.ts",
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
"import": "./dist/node/esm/key/export.js",
|
|
111
|
-
"require": "./dist/node/cjs/key/export.js"
|
|
97
|
+
"node": {
|
|
98
|
+
"import": "./dist/node/esm/key/export.js",
|
|
99
|
+
"require": "./dist/node/cjs/key/export.js"
|
|
100
|
+
},
|
|
101
|
+
"default": "./dist/browser/key/export.js"
|
|
112
102
|
},
|
|
113
103
|
"./key/generate/keypair": {
|
|
114
104
|
"types": "./dist/types/key/generate_key_pair.d.ts",
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
"import": "./dist/node/esm/key/generate_key_pair.js",
|
|
121
|
-
"require": "./dist/node/cjs/key/generate_key_pair.js"
|
|
105
|
+
"node": {
|
|
106
|
+
"import": "./dist/node/esm/key/generate_key_pair.js",
|
|
107
|
+
"require": "./dist/node/cjs/key/generate_key_pair.js"
|
|
108
|
+
},
|
|
109
|
+
"default": "./dist/browser/key/generate_key_pair.js"
|
|
122
110
|
},
|
|
123
111
|
"./key/generate/secret": {
|
|
124
112
|
"types": "./dist/types/key/generate_secret.d.ts",
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
"import": "./dist/node/esm/key/generate_secret.js",
|
|
131
|
-
"require": "./dist/node/cjs/key/generate_secret.js"
|
|
113
|
+
"node": {
|
|
114
|
+
"import": "./dist/node/esm/key/generate_secret.js",
|
|
115
|
+
"require": "./dist/node/cjs/key/generate_secret.js"
|
|
116
|
+
},
|
|
117
|
+
"default": "./dist/browser/key/generate_secret.js"
|
|
132
118
|
},
|
|
133
119
|
"./jwks/remote": {
|
|
134
120
|
"types": "./dist/types/jwks/remote.d.ts",
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"
|
|
140
|
-
"import": "./dist/node/esm/jwks/remote.js",
|
|
141
|
-
"require": "./dist/node/cjs/jwks/remote.js"
|
|
121
|
+
"node": {
|
|
122
|
+
"import": "./dist/node/esm/jwks/remote.js",
|
|
123
|
+
"require": "./dist/node/cjs/jwks/remote.js"
|
|
124
|
+
},
|
|
125
|
+
"default": "./dist/browser/jwks/remote.js"
|
|
142
126
|
},
|
|
143
127
|
"./jwks/local": {
|
|
144
128
|
"types": "./dist/types/jwks/local.d.ts",
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"
|
|
150
|
-
"import": "./dist/node/esm/jwks/local.js",
|
|
151
|
-
"require": "./dist/node/cjs/jwks/local.js"
|
|
129
|
+
"node": {
|
|
130
|
+
"import": "./dist/node/esm/jwks/local.js",
|
|
131
|
+
"require": "./dist/node/cjs/jwks/local.js"
|
|
132
|
+
},
|
|
133
|
+
"default": "./dist/browser/jwks/local.js"
|
|
152
134
|
},
|
|
153
135
|
"./jwt/sign": {
|
|
154
136
|
"types": "./dist/types/jwt/sign.d.ts",
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
"import": "./dist/node/esm/jwt/sign.js",
|
|
161
|
-
"require": "./dist/node/cjs/jwt/sign.js"
|
|
137
|
+
"node": {
|
|
138
|
+
"import": "./dist/node/esm/jwt/sign.js",
|
|
139
|
+
"require": "./dist/node/cjs/jwt/sign.js"
|
|
140
|
+
},
|
|
141
|
+
"default": "./dist/browser/jwt/sign.js"
|
|
162
142
|
},
|
|
163
143
|
"./jwt/verify": {
|
|
164
144
|
"types": "./dist/types/jwt/verify.d.ts",
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
"
|
|
170
|
-
"import": "./dist/node/esm/jwt/verify.js",
|
|
171
|
-
"require": "./dist/node/cjs/jwt/verify.js"
|
|
145
|
+
"node": {
|
|
146
|
+
"import": "./dist/node/esm/jwt/verify.js",
|
|
147
|
+
"require": "./dist/node/cjs/jwt/verify.js"
|
|
148
|
+
},
|
|
149
|
+
"default": "./dist/browser/jwt/verify.js"
|
|
172
150
|
},
|
|
173
151
|
"./jwt/encrypt": {
|
|
174
152
|
"types": "./dist/types/jwt/encrypt.d.ts",
|
|
175
|
-
"
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"
|
|
180
|
-
"import": "./dist/node/esm/jwt/encrypt.js",
|
|
181
|
-
"require": "./dist/node/cjs/jwt/encrypt.js"
|
|
153
|
+
"node": {
|
|
154
|
+
"import": "./dist/node/esm/jwt/encrypt.js",
|
|
155
|
+
"require": "./dist/node/cjs/jwt/encrypt.js"
|
|
156
|
+
},
|
|
157
|
+
"default": "./dist/browser/jwt/encrypt.js"
|
|
182
158
|
},
|
|
183
159
|
"./jwt/decrypt": {
|
|
184
160
|
"types": "./dist/types/jwt/decrypt.d.ts",
|
|
185
|
-
"
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
"
|
|
190
|
-
"import": "./dist/node/esm/jwt/decrypt.js",
|
|
191
|
-
"require": "./dist/node/cjs/jwt/decrypt.js"
|
|
161
|
+
"node": {
|
|
162
|
+
"import": "./dist/node/esm/jwt/decrypt.js",
|
|
163
|
+
"require": "./dist/node/cjs/jwt/decrypt.js"
|
|
164
|
+
},
|
|
165
|
+
"default": "./dist/browser/jwt/decrypt.js"
|
|
192
166
|
},
|
|
193
167
|
"./jwt/unsecured": {
|
|
194
168
|
"types": "./dist/types/jwt/unsecured.d.ts",
|
|
195
|
-
"
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
"
|
|
200
|
-
"import": "./dist/node/esm/jwt/unsecured.js",
|
|
201
|
-
"require": "./dist/node/cjs/jwt/unsecured.js"
|
|
169
|
+
"node": {
|
|
170
|
+
"import": "./dist/node/esm/jwt/unsecured.js",
|
|
171
|
+
"require": "./dist/node/cjs/jwt/unsecured.js"
|
|
172
|
+
},
|
|
173
|
+
"default": "./dist/browser/jwt/unsecured.js"
|
|
202
174
|
},
|
|
203
175
|
"./jwt/decode": {
|
|
204
176
|
"types": "./dist/types/util/decode_jwt.d.ts",
|
|
205
|
-
"
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
"
|
|
210
|
-
"import": "./dist/node/esm/util/decode_jwt.js",
|
|
211
|
-
"require": "./dist/node/cjs/util/decode_jwt.js"
|
|
177
|
+
"node": {
|
|
178
|
+
"import": "./dist/node/esm/util/decode_jwt.js",
|
|
179
|
+
"require": "./dist/node/cjs/util/decode_jwt.js"
|
|
180
|
+
},
|
|
181
|
+
"default": "./dist/browser/util/decode_jwt.js"
|
|
212
182
|
},
|
|
213
183
|
"./decode/protected_header": {
|
|
214
184
|
"types": "./dist/types/util/decode_protected_header.d.ts",
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
"import": "./dist/node/esm/util/decode_protected_header.js",
|
|
221
|
-
"require": "./dist/node/cjs/util/decode_protected_header.js"
|
|
185
|
+
"node": {
|
|
186
|
+
"import": "./dist/node/esm/util/decode_protected_header.js",
|
|
187
|
+
"require": "./dist/node/cjs/util/decode_protected_header.js"
|
|
188
|
+
},
|
|
189
|
+
"default": "./dist/browser/util/decode_protected_header.js"
|
|
222
190
|
},
|
|
223
191
|
"./jws/compact/sign": {
|
|
224
192
|
"types": "./dist/types/jws/compact/sign.d.ts",
|
|
225
|
-
"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
"import": "./dist/node/esm/jws/compact/sign.js",
|
|
231
|
-
"require": "./dist/node/cjs/jws/compact/sign.js"
|
|
193
|
+
"node": {
|
|
194
|
+
"import": "./dist/node/esm/jws/compact/sign.js",
|
|
195
|
+
"require": "./dist/node/cjs/jws/compact/sign.js"
|
|
196
|
+
},
|
|
197
|
+
"default": "./dist/browser/jws/compact/sign.js"
|
|
232
198
|
},
|
|
233
199
|
"./jws/compact/verify": {
|
|
234
200
|
"types": "./dist/types/jws/compact/verify.d.ts",
|
|
235
|
-
"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
"
|
|
240
|
-
"import": "./dist/node/esm/jws/compact/verify.js",
|
|
241
|
-
"require": "./dist/node/cjs/jws/compact/verify.js"
|
|
201
|
+
"node": {
|
|
202
|
+
"import": "./dist/node/esm/jws/compact/verify.js",
|
|
203
|
+
"require": "./dist/node/cjs/jws/compact/verify.js"
|
|
204
|
+
},
|
|
205
|
+
"default": "./dist/browser/jws/compact/verify.js"
|
|
242
206
|
},
|
|
243
207
|
"./jws/flattened/sign": {
|
|
244
208
|
"types": "./dist/types/jws/flattened/sign.d.ts",
|
|
245
|
-
"
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
"
|
|
250
|
-
"import": "./dist/node/esm/jws/flattened/sign.js",
|
|
251
|
-
"require": "./dist/node/cjs/jws/flattened/sign.js"
|
|
209
|
+
"node": {
|
|
210
|
+
"import": "./dist/node/esm/jws/flattened/sign.js",
|
|
211
|
+
"require": "./dist/node/cjs/jws/flattened/sign.js"
|
|
212
|
+
},
|
|
213
|
+
"default": "./dist/browser/jws/flattened/sign.js"
|
|
252
214
|
},
|
|
253
215
|
"./jws/flattened/verify": {
|
|
254
216
|
"types": "./dist/types/jws/flattened/verify.d.ts",
|
|
255
|
-
"
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
"
|
|
260
|
-
"import": "./dist/node/esm/jws/flattened/verify.js",
|
|
261
|
-
"require": "./dist/node/cjs/jws/flattened/verify.js"
|
|
217
|
+
"node": {
|
|
218
|
+
"import": "./dist/node/esm/jws/flattened/verify.js",
|
|
219
|
+
"require": "./dist/node/cjs/jws/flattened/verify.js"
|
|
220
|
+
},
|
|
221
|
+
"default": "./dist/browser/jws/flattened/verify.js"
|
|
262
222
|
},
|
|
263
223
|
"./jws/general/sign": {
|
|
264
224
|
"types": "./dist/types/jws/general/sign.d.ts",
|
|
265
|
-
"
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
"
|
|
270
|
-
"import": "./dist/node/esm/jws/general/sign.js",
|
|
271
|
-
"require": "./dist/node/cjs/jws/general/sign.js"
|
|
225
|
+
"node": {
|
|
226
|
+
"import": "./dist/node/esm/jws/general/sign.js",
|
|
227
|
+
"require": "./dist/node/cjs/jws/general/sign.js"
|
|
228
|
+
},
|
|
229
|
+
"default": "./dist/browser/jws/general/sign.js"
|
|
272
230
|
},
|
|
273
231
|
"./jws/general/verify": {
|
|
274
232
|
"types": "./dist/types/jws/general/verify.d.ts",
|
|
275
|
-
"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
"
|
|
280
|
-
"import": "./dist/node/esm/jws/general/verify.js",
|
|
281
|
-
"require": "./dist/node/cjs/jws/general/verify.js"
|
|
233
|
+
"node": {
|
|
234
|
+
"import": "./dist/node/esm/jws/general/verify.js",
|
|
235
|
+
"require": "./dist/node/cjs/jws/general/verify.js"
|
|
236
|
+
},
|
|
237
|
+
"default": "./dist/browser/jws/general/verify.js"
|
|
282
238
|
},
|
|
283
239
|
"./jwe/compact/encrypt": {
|
|
284
240
|
"types": "./dist/types/jwe/compact/encrypt.d.ts",
|
|
285
|
-
"
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
"
|
|
290
|
-
"import": "./dist/node/esm/jwe/compact/encrypt.js",
|
|
291
|
-
"require": "./dist/node/cjs/jwe/compact/encrypt.js"
|
|
241
|
+
"node": {
|
|
242
|
+
"import": "./dist/node/esm/jwe/compact/encrypt.js",
|
|
243
|
+
"require": "./dist/node/cjs/jwe/compact/encrypt.js"
|
|
244
|
+
},
|
|
245
|
+
"default": "./dist/browser/jwe/compact/encrypt.js"
|
|
292
246
|
},
|
|
293
247
|
"./jwe/compact/decrypt": {
|
|
294
248
|
"types": "./dist/types/jwe/compact/decrypt.d.ts",
|
|
295
|
-
"
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
"
|
|
300
|
-
"import": "./dist/node/esm/jwe/compact/decrypt.js",
|
|
301
|
-
"require": "./dist/node/cjs/jwe/compact/decrypt.js"
|
|
249
|
+
"node": {
|
|
250
|
+
"import": "./dist/node/esm/jwe/compact/decrypt.js",
|
|
251
|
+
"require": "./dist/node/cjs/jwe/compact/decrypt.js"
|
|
252
|
+
},
|
|
253
|
+
"default": "./dist/browser/jwe/compact/decrypt.js"
|
|
302
254
|
},
|
|
303
255
|
"./jwe/flattened/encrypt": {
|
|
304
256
|
"types": "./dist/types/jwe/flattened/encrypt.d.ts",
|
|
305
|
-
"
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
"
|
|
310
|
-
"import": "./dist/node/esm/jwe/flattened/encrypt.js",
|
|
311
|
-
"require": "./dist/node/cjs/jwe/flattened/encrypt.js"
|
|
257
|
+
"node": {
|
|
258
|
+
"import": "./dist/node/esm/jwe/flattened/encrypt.js",
|
|
259
|
+
"require": "./dist/node/cjs/jwe/flattened/encrypt.js"
|
|
260
|
+
},
|
|
261
|
+
"default": "./dist/browser/jwe/flattened/encrypt.js"
|
|
312
262
|
},
|
|
313
263
|
"./jwe/flattened/decrypt": {
|
|
314
264
|
"types": "./dist/types/jwe/flattened/decrypt.d.ts",
|
|
315
|
-
"
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
"
|
|
320
|
-
"import": "./dist/node/esm/jwe/flattened/decrypt.js",
|
|
321
|
-
"require": "./dist/node/cjs/jwe/flattened/decrypt.js"
|
|
265
|
+
"node": {
|
|
266
|
+
"import": "./dist/node/esm/jwe/flattened/decrypt.js",
|
|
267
|
+
"require": "./dist/node/cjs/jwe/flattened/decrypt.js"
|
|
268
|
+
},
|
|
269
|
+
"default": "./dist/browser/jwe/flattened/decrypt.js"
|
|
322
270
|
},
|
|
323
271
|
"./jwe/general/encrypt": {
|
|
324
272
|
"types": "./dist/types/jwe/general/encrypt.d.ts",
|
|
325
|
-
"
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
"
|
|
330
|
-
"import": "./dist/node/esm/jwe/general/encrypt.js",
|
|
331
|
-
"require": "./dist/node/cjs/jwe/general/encrypt.js"
|
|
273
|
+
"node": {
|
|
274
|
+
"import": "./dist/node/esm/jwe/general/encrypt.js",
|
|
275
|
+
"require": "./dist/node/cjs/jwe/general/encrypt.js"
|
|
276
|
+
},
|
|
277
|
+
"default": "./dist/browser/jwe/general/encrypt.js"
|
|
332
278
|
},
|
|
333
279
|
"./jwe/general/decrypt": {
|
|
334
280
|
"types": "./dist/types/jwe/general/decrypt.d.ts",
|
|
335
|
-
"
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
"
|
|
340
|
-
"import": "./dist/node/esm/jwe/general/decrypt.js",
|
|
341
|
-
"require": "./dist/node/cjs/jwe/general/decrypt.js"
|
|
281
|
+
"node": {
|
|
282
|
+
"import": "./dist/node/esm/jwe/general/decrypt.js",
|
|
283
|
+
"require": "./dist/node/cjs/jwe/general/decrypt.js"
|
|
284
|
+
},
|
|
285
|
+
"default": "./dist/browser/jwe/general/decrypt.js"
|
|
342
286
|
},
|
|
343
287
|
"./errors": {
|
|
344
288
|
"types": "./dist/types/util/errors.d.ts",
|
|
345
|
-
"
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
"
|
|
350
|
-
"import": "./dist/node/esm/util/errors.js",
|
|
351
|
-
"require": "./dist/node/cjs/util/errors.js"
|
|
289
|
+
"node": {
|
|
290
|
+
"import": "./dist/node/esm/util/errors.js",
|
|
291
|
+
"require": "./dist/node/cjs/util/errors.js"
|
|
292
|
+
},
|
|
293
|
+
"default": "./dist/browser/util/errors.js"
|
|
352
294
|
},
|
|
353
295
|
"./base64url": {
|
|
354
296
|
"types": "./dist/types/util/base64url.d.ts",
|
|
355
|
-
"
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
"
|
|
360
|
-
"import": "./dist/node/esm/util/base64url.js",
|
|
361
|
-
"require": "./dist/node/cjs/util/base64url.js"
|
|
297
|
+
"node": {
|
|
298
|
+
"import": "./dist/node/esm/util/base64url.js",
|
|
299
|
+
"require": "./dist/node/cjs/util/base64url.js"
|
|
300
|
+
},
|
|
301
|
+
"default": "./dist/browser/util/base64url.js"
|
|
362
302
|
},
|
|
363
303
|
"./package.json": "./package.json"
|
|
364
304
|
},
|