jose 6.0.10 → 6.0.11
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
CHANGED
|
@@ -118,10 +118,10 @@ Please note that certain algorithms may not be available depending on the runtim
|
|
|
118
118
|
|
|
119
119
|
| Version | Security Fixes 🔑 | Other Bug Fixes 🐞 | New Features ⭐ | Runtime and Module type |
|
|
120
120
|
| ----------------------------------------------- | ----------------- | ------------------ | --------------- | ------------------------------- |
|
|
121
|
-
| [v6.x](https://github.com/panva/jose/tree/v6.x) |
|
|
122
|
-
| [v5.x](https://github.com/panva/jose/tree/v5.x) |
|
|
123
|
-
| [v4.x](https://github.com/panva/jose/tree/v4.x) |
|
|
124
|
-
| [v2.x](https://github.com/panva/jose/tree/v2.x) |
|
|
121
|
+
| [v6.x](https://github.com/panva/jose/tree/v6.x) | [Security Policy] | ✅ | ✅ | Universal[^universal] ESM[^cjs] |
|
|
122
|
+
| [v5.x](https://github.com/panva/jose/tree/v5.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM |
|
|
123
|
+
| [v4.x](https://github.com/panva/jose/tree/v4.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM |
|
|
124
|
+
| [v2.x](https://github.com/panva/jose/tree/v2.x) | [Security Policy] | ❌ | ❌ | Node.js CJS |
|
|
125
125
|
|
|
126
126
|
## Specifications
|
|
127
127
|
|
|
@@ -145,7 +145,8 @@ The algorithm implementations in `jose` have been tested using test vectors from
|
|
|
145
145
|
[sponsor-auth0]: https://a0.to/signup/panva
|
|
146
146
|
[WebCryptoAPI]: https://w3c.github.io/webcrypto/
|
|
147
147
|
[Fetch API]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
|
148
|
+
[Security Policy]: https://github.com/panva/jose/security/policy
|
|
148
149
|
|
|
149
|
-
[^cjs]: CJS style `let jose = require('jose')` is possible in Node.js versions where `
|
|
150
|
+
[^cjs]: CJS style `let jose = require('jose')` is possible in Node.js versions where the `require(esm)` feature is enabled by default (^20.19.0 || ^22.12.0 || >= 23.0.0).
|
|
150
151
|
|
|
151
152
|
[^universal]: Assumes runtime support of [WebCryptoAPI][] and [Fetch API][]
|
|
@@ -9,7 +9,7 @@ function isCloudflareWorkers() {
|
|
|
9
9
|
let USER_AGENT;
|
|
10
10
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
11
11
|
const NAME = 'jose';
|
|
12
|
-
const VERSION = 'v6.0.
|
|
12
|
+
const VERSION = 'v6.0.11';
|
|
13
13
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
14
14
|
}
|
|
15
15
|
export const customFetch = Symbol();
|
|
@@ -10,7 +10,12 @@ function validateInput(label, input) {
|
|
|
10
10
|
}
|
|
11
11
|
return input;
|
|
12
12
|
}
|
|
13
|
-
const normalizeTyp = (value) =>
|
|
13
|
+
const normalizeTyp = (value) => {
|
|
14
|
+
if (value.includes('/')) {
|
|
15
|
+
return value.toLowerCase();
|
|
16
|
+
}
|
|
17
|
+
return `application/${value.toLowerCase()}`;
|
|
18
|
+
};
|
|
14
19
|
const checkAudiencePresence = (audPayload, audOption) => {
|
|
15
20
|
if (typeof audPayload === 'string') {
|
|
16
21
|
return audOption.includes(audPayload);
|