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

get-jwks

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-jwks - npm Package Compare versions

Comparing version 9.0.1 to 9.0.2

8

package.json
{
"name": "get-jwks",
"version": "9.0.1",
"version": "9.0.2",
"description": "Fetch utils for JWKS keys",

@@ -44,3 +44,3 @@ "main": "src/get-jwks.js",

"eslint": "^8.6.0",
"fast-jwt": "^3.0.0",
"fast-jwt": "^4.0.0",
"fastify": "^4.0.3",

@@ -50,7 +50,7 @@ "jsonwebtoken": "^9.0.0",

"prettier": "^3.0.0",
"sinon": "^17.0.0",
"sinon": "^18.0.0",
"tap": "^16.0.0",
"tsd": "^0.30.0",
"tsd": "^0.31.0",
"typescript": "^5.0.2"
}
}
# get-jwks
[![Build](https://github.com/nearform/get-jwks/workflows/CI/badge.svg)](https://github.com/nearform/get-jwks/actions?query=workflow%3ACI)
[![ci](https://github.com/nearform/get-jwks/actions/workflows/ci.yml/badge.svg)](https://github.com/nearform/get-jwks/actions/workflows/ci.yml)

@@ -5,0 +5,0 @@ Fetch utils for JWKS keys

import type { LRUCache } from 'lru-cache'
import type { Agent } from 'https'
export type JWKSignature = { domain: string; alg: string; kid: string }
export type JWK = { [key: string]: any; domain: string; alg: string; kid: string }
export type GetPublicKeyOptions = {
type GetPublicKeyOptions = {
domain?: string

@@ -13,3 +10,14 @@ alg?: string

export type GetJwksOptions = {
type JWKSignature = { domain: string; alg: string; kid: string }
type JWK = { [key: string]: any; domain: string; alg: string; kid: string }
type GetJwks = {
getPublicKey: (options?: GetPublicKeyOptions) => Promise<string>
getJwk: (signature: JWKSignature) => Promise<JWK>
getJwksUri: (normalizedDomain: string) => Promise<string>
cache: LRUCache<string, JWK>
staleCache: LRUCache<string, JWK>
}
type GetJwksOptions = {
max?: number

@@ -24,10 +32,7 @@ ttl?: number

export type GetJwks = {
getPublicKey: (options?: GetPublicKeyOptions) => Promise<string>
getJwk: (signature: JWKSignature) => Promise<JWK>
getJwksUri: (normalizedDomain: string) => Promise<string>
cache: LRUCache<string, JWK>
staleCache: LRUCache<string, JWK>
declare namespace buildGetJwks {
export type { JWKSignature, JWK, GetPublicKeyOptions, GetJwksOptions, GetJwks }
}
export default function buildGetJwks(options?: GetJwksOptions): GetJwks
declare function buildGetJwks(options?: GetJwksOptions): GetJwks
export = buildGetJwks
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