Comparing version 9.0.1 to 9.0.2
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14132
196