|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## [2.0.0] - (2021-03-01) |
| 4 | +With version 2 we have added full JWK/JWS support. With this we have bumped the node version to minimum 10. We have also removed Axios and exposed a `fetcher` option to allow user's to completely override how the request to the `jwksUri` endpoint is made. |
| 5 | + |
| 6 | +### Breaking Changes |
| 7 | +* Drops support for Node < 10 |
| 8 | +* No more callbacks, using async/await(promises) |
| 9 | +* Removed Axios and changed the API to JwksClient |
| 10 | + |
| 11 | +### Changes |
| 12 | +**Added** |
| 13 | +- Full JWK/JWS Support [\#205](https://github.com/auth0/node-jwks-rsa/pull/205) ([panva](https://github.com/panva)) |
| 14 | + |
| 15 | +**Changed** |
| 16 | +- Simplify request wrapper [\#218](https://github.com/auth0/node-jwks-rsa/pull/218) ([davidpatrick](https://github.com/davidpatrick)) |
| 17 | +- Pins to Node Version 10,12,14 [\#212](https://github.com/auth0/node-jwks-rsa/pull/212) ([davidpatrick](https://github.com/davidpatrick)) |
| 18 | +- Migrate from callbacks to async/await [\#222](https://github.com/auth0/node-jwks-rsa/pull/222) ([davidpatrick](https://github.com/davidpatrick)) |
| 19 | + |
| 20 | +### Migration Guide from v1 to v2 |
| 21 | +#### Proxies |
| 22 | +The proxy option has been removed from the JwksClient. Support for it was a little spotty through Axios, and we wanted to allow users to have more control over the flow. Now you can specify your proxy by overriding the `requestAgent` used with an [agent with built-in proxy support](https://github.com/TooTallNate/node-https-proxy-agent), or by completely overriding the request library with the `fetcher` option. |
| 23 | + |
| 24 | +```js |
| 25 | +// OLD |
| 26 | +const oldClient = jwksClient({ |
| 27 | + jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json', |
| 28 | + proxy: 'https://username:pass@address:port' |
| 29 | +}); |
| 30 | + |
| 31 | +// NEW |
| 32 | +const HttpsProxyAgent = require('https-proxy-agent'); |
| 33 | +const newClient = jwksClient({ |
| 34 | + jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json', |
| 35 | + requestAgent: new HttpsProxyAgent('https://username:pass@address:port') |
| 36 | +}); |
| 37 | +``` |
| 38 | + |
| 39 | +#### Request Agent Options |
| 40 | +The library no longer gates what http(s) Agent is used, so we have removed `requestAgentOptions` and now expose the `requestAgent` option when creating a `jwksClient`. |
| 41 | + |
| 42 | +```js |
| 43 | +// OLD |
| 44 | +const oldClient = jwksClient({ |
| 45 | + jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json', |
| 46 | + requestAgentOptions: { |
| 47 | + ca: fs.readFileSync(caFile) |
| 48 | + } |
| 49 | +}); |
| 50 | + |
| 51 | +// NEW |
| 52 | +const newClient = jwksClient({ |
| 53 | + jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json', |
| 54 | + requestAgent: new https.Agent({ |
| 55 | + ca: fs.readFileSync(caFile) |
| 56 | + }) |
| 57 | +}); |
| 58 | +``` |
| 59 | + |
| 60 | +#### Migrated Callbacks to Async/Await |
| 61 | +The library no longer supports callbacks. We have migrated to async/await(promises). |
| 62 | + |
| 63 | +```js |
| 64 | +// OLD |
| 65 | +client.getSigningKey(kid, (err, key) => { |
| 66 | + const signingKey = key.getPublicKey(); |
| 67 | +}); |
| 68 | + |
| 69 | +// NEW |
| 70 | +const key = await client.getSigningKey(kid); |
| 71 | +const signingKey = key.getPublicKey(); |
| 72 | +``` |
| 73 | + |
| 74 | +## [1.12.3] - (2021-02-25) |
| 75 | + |
| 76 | +**Added** |
| 77 | +- Add alg to SigningKey types [\#220](https://github.com/auth0/node-jwks-rsa/pull/220) ([okko](https://github.com/okko)) |
| 78 | + |
| 79 | +**Fixed** |
| 80 | + |
| 81 | +- Fix npmjs resolves [\#221](https://github.com/auth0/node-jwks-rsa/pull/221) ([adamjmcgrath](https://github.com/adamjmcgrath)) |
| 82 | +- Fix Import default Axios instance [\#216](https://github.com/auth0/node-jwks-rsa/pull/216) ([dsebastien](https://github.com/dsebastien)) |
| 83 | + |
| 84 | + |
3 | 85 | ## [1.12.2] - (2021-01-07)
|
4 | 86 |
|
5 | 87 | **Fixed**
|
|
0 commit comments