Comparing version 2.0.3 to 2.0.4
@@ -5,2 +5,9 @@ # Changelog | ||
## [2.0.4](https://github.com/panva/jose/compare/v2.0.3...v2.0.4) (2021-01-18) | ||
### Performance | ||
* improve base64url encoding when available in Node.js ([d5af559](https://github.com/panva/jose/commit/d5af559a94f51ee82951e1def5c5c5749dfa290a)) | ||
## [2.0.3](https://github.com/panva/jose/compare/v2.0.2...v2.0.3) (2020-10-29) | ||
@@ -7,0 +14,0 @@ |
@@ -1,13 +0,12 @@ | ||
const fromBase64 = (base64) => { | ||
return base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_') | ||
let encode; | ||
let encodeBuffer; | ||
if (Buffer.isEncoding('base64url')) { | ||
encode = (input, encoding = 'utf8') => Buffer.from(input, encoding).toString('base64url'); | ||
encodeBuffer = (buf) => buf.toString('base64url'); | ||
} else { | ||
const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); | ||
encode = (input, encoding = 'utf8') => fromBase64(Buffer.from(input, encoding).toString('base64')); | ||
encodeBuffer = (buf) => fromBase64(buf.toString('base64')); | ||
} | ||
const encode = (input, encoding = 'utf8') => { | ||
return fromBase64(Buffer.from(input, encoding).toString('base64')) | ||
} | ||
const encodeBuffer = (buf) => { | ||
return fromBase64(buf.toString('base64')) | ||
} | ||
const decodeToBuffer = (input) => { | ||
@@ -14,0 +13,0 @@ return Buffer.from(input, 'base64') |
{ | ||
"name": "jose", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "JSON Web Almost Everything - JWA, JWS, JWE, JWK, JWT, JWKS for Node.js with minimal dependencies", | ||
@@ -134,3 +134,4 @@ "keywords": [ | ||
"type": "perf", | ||
"hidden": true | ||
"section": "Performance", | ||
"hidden": false | ||
}, | ||
@@ -137,0 +138,0 @@ { |
@@ -7,2 +7,16 @@ # jose | ||
## New major version is available | ||
`v2.x` continues being supported. It will continue receiving | ||
bug fixes until 2022-04-30. It will not be receiving any new | ||
features. | ||
`v3.x` is [available](https://github.com/panva/jose) with | ||
- Revised API | ||
- No dependencies | ||
- Browser support | ||
- Promise-based API | ||
- experimental (non-blocking 🎉) Node.js libuv thread pool based runtime | ||
## Implemented specs & features | ||
@@ -53,3 +67,3 @@ | ||
```console | ||
npm install jose | ||
npm install jose@2 | ||
``` | ||
@@ -308,5 +322,5 @@ | ||
| -- | -- | -- | -- | | ||
| JWT Access Tokens - [JWT Profile for OAuth 2.0 Access Tokens][draft-ietf-oauth-access-token-jwt] | ✓ | ✕<sup>5</sup> | see [`JWT.AccessToken.verify`](/docs/README.md#jwtaccesstokenverifytoken-keyorstore-options) | | ||
| ID Token - [OpenID Connect Core 1.0][spec-oidc-id_token] | ✓ | ✓ | see [`JWT.IdToken.verify`](/docs/README.md#jwtidtokenverifytoken-keyorstore-options) | | ||
| Logout Token - [OpenID Connect Back-Channel Logout 1.0][spec-oidc-logout_token] | ✓ | ✕<sup>5</sup> | see [`JWT.LogoutToken.verify`](/docs/README.md#jwtlogouttokenverifytoken-keyorstore-options) | | ||
| JWT Access Tokens - [JWT Profile for OAuth 2.0 Access Tokens][draft-ietf-oauth-access-token-jwt] | ✓ | ✕<sup>5</sup> | see [`JWT.AccessToken.verify`]([/docs/README.md](https://github.com/panva/jose/blob/v2.x/docs/README.md)#jwtaccesstokenverifytoken-keyorstore-options) | | ||
| ID Token - [OpenID Connect Core 1.0][spec-oidc-id_token] | ✓ | ✓ | see [`JWT.IdToken.verify`]([/docs/README.md](https://github.com/panva/jose/blob/v2.x/docs/README.md)#jwtidtokenverifytoken-keyorstore-options) | | ||
| Logout Token - [OpenID Connect Back-Channel Logout 1.0][spec-oidc-logout_token] | ✓ | ✕<sup>5</sup> | see [`JWT.LogoutToken.verify`]([/docs/README.md](https://github.com/panva/jose/blob/v2.x/docs/README.md)#jwtlogouttokenverifytoken-keyorstore-options) | | ||
| JARM - [JWT Secured Authorization Response Mode for OAuth 2.0][draft-jarm] | ◯ ||| | ||
@@ -333,2 +347,9 @@ | [JWT Response for OAuth Token Introspection][draft-jwtintrospection] | ◯ ||| | ||
#### Supported Versions | ||
| Version | Bug Fixes 🐞 | New Features ⭐ | | ||
| ------- | --------- | -------- | | ||
| [3.x.x](https://github.com/panva/jose) | ✅ | ✅ | | ||
| [2.x.x](https://github.com/panva/jose/tree/v2.x) | ✅ until 2022-04-30 | ❌ | | ||
#### Semver? | ||
@@ -384,9 +405,9 @@ | ||
[documentation-jwe]: /docs/README.md#jwe-json-web-encryption | ||
[documentation-jwk]: /docs/README.md#jwk-json-web-key | ||
[documentation-jwks]: /docs/README.md#jwks-json-web-key-set | ||
[documentation-jws]: /docs/README.md#jws-json-web-signature | ||
[documentation-jwt]: /docs/README.md#jwt-json-web-token | ||
[documentation-none]: /docs/README.md#jwknone | ||
[documentation]: /docs/README.md | ||
[documentation-jwe]: https://github.com/panva/jose/blob/v2.x/docs/README.md#jwe-json-web-encryption | ||
[documentation-jwk]: https://github.com/panva/jose/blob/v2.x/docs/README.md#jwk-json-web-key | ||
[documentation-jwks]: https://github.com/panva/jose/blob/v2.x/docs/README.md#jwks-json-web-key-set | ||
[documentation-jws]: https://github.com/panva/jose/blob/v2.x/docs/README.md#jws-json-web-signature | ||
[documentation-jwt]: https://github.com/panva/jose/blob/v2.x/docs/README.md#jwt-json-web-token | ||
[documentation-none]: https://github.com/panva/jose/blob/v2.x/docs/README.md#jwknone | ||
[documentation]: https://github.com/panva/jose/blob/v2.x/docs/README.md | ||
[node-jose]: https://github.com/cisco/node-jose | ||
@@ -393,0 +414,0 @@ [spec-b64]: https://tools.ietf.org/html/rfc7797 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
239920
4923
427