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 Compare versions

Comparing version 2.0.0 to 2.0.1

src/wrappers/callbackSupport.js

7

CHANGELOG.md
# Changelog
## [2.0.1] - (2021-03-12)
**Added**
- Callback backwards compatbility for `getSigningKey` [\#227](https://github.com/auth0/node-jwks-rsa/pull/227) ([davidpatrick](https://github.com/davidpatrick))
**Fixed**
- Fix typescript declarations for v2 [\#229](https://github.com/auth0/node-jwks-rsa/pull/229) ([davidpatrick](https://github.com/baywet))
- Fix typescript types for fetcher [\#231](https://github.com/auth0/node-jwks-rsa/pull/231) ([itajaja](https://github.com/itajaja))
## [2.0.0] - (2021-03-01)

@@ -4,0 +11,0 @@ 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.

12

index.d.ts

@@ -11,8 +11,6 @@ import { SecretCallback, SecretCallbackLong } from 'express-jwt';

getKeys(cb: (err: Error | null, keys: unknown) => void): void;
getKeysAsync(): Promise<unknown>;
getSigningKeys(cb: (err: Error | null, keys: SigningKey[]) => void): void;
getSigningKeysAsync(): Promise<SigningKey[]>;
getKeys(): Promise<unknown>;
getSigningKeys(): Promise<SigningKey[]>;
getSigningKey(kid: string): Promise<SigningKey>;
getSigningKey(kid: string, cb: (err: Error | null, key: SigningKey) => void): void;
getSigningKeyAsync(kid: string): Promise<SigningKey>;
}

@@ -35,4 +33,4 @@

requestAgent?: HttpAgent | HttpsAgent;
fetcher?(jwksUri: string): Promise<{ keys: SigningKey[] }>;
getKeysInterceptor?(cb: (err: Error | null, keys: SigningKey[]) => void): void;
fetcher?(jwksUri: string): Promise<{ keys: any }>;
getKeysInterceptor?(): Promise<SigningKey[]>;
}

@@ -39,0 +37,0 @@

{
"name": "jwks-rsa",
"version": "2.0.0",
"version": "2.0.1",
"description": "Library to retrieve RSA public keys from a JWKS endpoint",

@@ -5,0 +5,0 @@ "main": "src/index.js",

const debug = require('debug');
const { retrieveSigningKeys } = require('./utils') ;
const { request, cacheSigningKey, rateLimitSigningKey, getKeysInterceptor } = require('./wrappers');
const { request, cacheSigningKey, rateLimitSigningKey, getKeysInterceptor, callbackSupport } = require('./wrappers');
const JwksError = require('./errors/JwksError');

@@ -28,2 +28,4 @@ const SigningKeyNotFoundError = require('./errors/SigningKeyNotFoundError');

}
this.getSigningKey = callbackSupport(this, options);
}

@@ -30,0 +32,0 @@

@@ -5,3 +5,4 @@ module.exports = {

rateLimitSigningKey: require('./rateLimit').default,
getKeysInterceptor: require('./interceptor').default
getKeysInterceptor: require('./interceptor').default,
callbackSupport: require('./callbackSupport').default
};
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