Gathering detailed insights and metrics for jwks-fetch
Gathering detailed insights and metrics for jwks-fetch
Gathering detailed insights and metrics for jwks-fetch
Gathering detailed insights and metrics for jwks-fetch
npm install jwks-fetch
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (97.85%)
JavaScript (2.15%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
452 Commits
21 Branches
2 Contributors
Updated on Jul 31, 2020
Latest Version
1.0.1
Package Id
jwks-fetch@1.0.1
Unpacked Size
33.57 kB
Size
12.47 kB
File Count
12
NPM Version
6.4.1
Node Version
10.15.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
jwks-fetch is a NodeJS library which retrieves asymmetric keys in JWKs format. It supports both RSA and EC keys.
npm install --save jwks-fetch
It implements a Promise based API. NodeJS 8 or above is required. For now it's only compatible with Node, but isomorphic support is planned.
1const {JWKSClient, HTTPError} = require('jwks-fetch'); 2 3const client = JWKSClient({ cache: true, ttl: 60, strictSSL: false }); 4const url = 'https://demo.com/static/jwks.json'; 5const kid = 'auth'; 6 7client.retrieve(url, kid) 8 .then(r => { 9 console.log(r); 10 11 /* 12 * -----BEGIN PUBLIC KEY----- 13 * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Mv6SZ2mcGjVBwfAIfCZ 14 * 9MjnMuJpKrSFCcLJQ44TIh01zmOogxvobC+tm4sv+hiJ8F9S7CDxVJ7Xs6JNV+I8 15 * XgqK+ZfrjCLNTsuxv5Y/ByFaq0pjHmWa8mKfsQ389qo4AuoILaj40f1Ai4KXkjWu 16 * UkKj1t+PAusOazpN3InOLHfUKWhXNMyWFuVfACDlHuOPq9wzbD+AmrM76GwY/xSO 17 * DvtNCM4pSF4FWTBRTZhelr7POERxd5Lb2uZxfiXCcyLVNf7DTzHjPB40lyrQ+bv4 18 * t5/FuaqMBMCtOPYNUqBwdQ79k3jJkPQNoyjuyXwzeP90jkBEZxmR/j/si56r0urQ 19 * tQIDAQAB 20 * -----END PUBLIC KEY----- 21 */ 22 }) 23 .catch(err => { 24 if (err instanceof HTTPError) { 25 console.error(`status code ${err.status}`); 26 } 27 console.error(err); 28 });
1{ 2 cache: false // Enable or disable cache 3 ttl: 60, // Amount of time in seconds to cache a key 4 strictSSL: true // Throw error if SSL certificate could not be validated 5}
If the jwks_uri
didn't respond with an HTTP status code 200 a custom HTTPError exception will be thrown. From there you can access the raw response with err.res
and the status code with err.status
.
If an exception occurs when requesting the JWKs an HTTPError will also be thrown, but with a null res
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More