Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jwks-rsa

Package Overview
Dependencies
Maintainers
42
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwks-rsa - npm Package Versions

134

2.0.4

Diff

Changelog

Source

[2.0.4] - (2021-07-16)

Fixed

  • [SDK-2626] getKeysInterceptor types #251 (davidpatrick)
davidpatrick0
published 2.0.3 •

Changelog

Source

[2.0.3] - (2021-04-20)

Fixed

Security

davidpatrick0
published 2.0.2 •

Changelog

Source

[2.0.2] - (2021-03-24)

Fixed

davidpatrick0
published 2.0.1 •

Changelog

Source

[2.0.1] - (2021-03-12)

Added

  • Callback backwards compatbility for getSigningKey #227 (davidpatrick)

Fixed

davidpatrick0
published 2.0.0 •

Changelog

Source

[2.0.0] - (2021-03-01)

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.

Breaking Changes

  • Drops support for Node < 10
  • No more callbacks, using async/await(promises)
  • Removed Axios and changed the API to JwksClient

Changes

Added

Changed

Migration Guide from v1 to v2

Proxies

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, or by completely overriding the request library with the fetcher option.

// OLD
const oldClient = jwksClient({
  jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json',
  proxy: 'https://username:pass@address:port'
});

// NEW
const HttpsProxyAgent = require('https-proxy-agent');
const newClient = jwksClient({
  jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json',
  requestAgent: new HttpsProxyAgent('https://username:pass@address:port')
});
Request Agent Options

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.

// OLD
const oldClient = jwksClient({
  jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json',
  requestAgentOptions: {
    ca: fs.readFileSync(caFile)
  }
});

// NEW
const newClient = jwksClient({
  jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json',
  requestAgent: new https.Agent({
    ca: fs.readFileSync(caFile)
  })
});
Migrated Callbacks to Async/Await

The library no longer supports callbacks. We have migrated to async/await(promises).

// OLD
client.getSigningKey(kid, (err, key) => {
  const signingKey = key.getPublicKey();
});

// NEW
const key = await client.getSigningKey(kid);
const signingKey = key.getPublicKey();
davidpatrick0
published 1.12.3 •

Changelog

Source

[1.12.3] - (2021-02-25)

Added

Fixed

davidpatrick0
published 1.12.2 •

Changelog

Source

[1.12.2] - (2021-01-07)

Fixed

  • Added coverage folders to .npmignore
lbalmaceda
published 1.12.1 •

Changelog

Source

[1.12.1] - (2020-12-29)

Security

davidpatrick0
published 1.12.0 •

Changelog

Source

[1.12.0] - (2020-12-08)

Added

Deprecation We are deprecating passing in a jwksObject to the client for reasons laid out in #202. In order to load keys from anything other than the jwksUri, please use the getKeysInterceptor.

  const client = new JwksClient({ 
    jwksUri: 'https://my-enterprise-id-provider/.well-known/jwks.json',
    getKeysInterceptor: (cb) => {
      const file = fs.readFileSync(jwksFile);
      return cb(null, file.keys);
    }
  });
davidpatrick0
published 1.11.0 •

Changelog

Source

[1.11.0] - (2020-10-23)

Added

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc