Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "fast-jwt", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Fast JSON Web Token implementation", | ||
@@ -5,0 +5,0 @@ "author": "NearForm Ltd", |
@@ -47,4 +47,4 @@ import 'node' | ||
type KeyFetcher = | ||
| ((key: string, header: string) => Promise<string | Buffer>) | ||
| ((key: string, header: string, cb: (err: Error | TokenError | null, key: string | Buffer) => void) => void) | ||
| ((header: { [key: string]: any }) => Promise<string | Buffer>) | ||
| ((header: { [key: string]: any }, cb: (err: Error | TokenError | null, key: string | Buffer) => void) => void) | ||
@@ -98,3 +98,3 @@ declare function Signer(payload: string | Buffer | { [key: string]: any }): Promise<string> | ||
export function createSigner(options?: Partial<SignerOptions>): typeof Signer | ||
export function createDecoder(options: Partial<DecoderOptions>): (token: string | Buffer) => any | ||
export function createVerifier(options: Partial<VerifierOptions>): typeof Verifier | ||
export function createDecoder(options?: Partial<DecoderOptions>): (token: string | Buffer) => any | ||
export function createVerifier(options?: Partial<VerifierOptions>): typeof Verifier |
@@ -14,3 +14,3 @@ /* eslint-disable @typescript-eslint/no-unused-expressions */ | ||
clockTimestamp: 10, | ||
key(_key: string, _header: string, cb: (e: Error | null, key: string) => void): void { | ||
key(_header: { [key: string]: any }, cb: (e: Error | null, key: string) => void): void { | ||
cb(null, 'KEY') | ||
@@ -23,3 +23,3 @@ } | ||
clockTimestamp: 10, | ||
async key(_key: string, _header: string) { | ||
async key(_header: { [key: string]: any }) { | ||
return 'KEY' | ||
@@ -43,3 +43,3 @@ } | ||
clockTimestamp: 10, | ||
key(_key: string, _header: string, cb: (e: Error | null, key: string) => void): void { | ||
key(_header: { [key: string]: any }, cb: (e: Error | null, key: string) => void): void { | ||
cb(null, 'KEY') | ||
@@ -52,3 +52,3 @@ } | ||
clockTimestamp: 10, | ||
async key(_key: string, _header: string) { | ||
async key(_header: { [key: string]: any }) { | ||
return 'KEY' | ||
@@ -55,0 +55,0 @@ } |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
204542
0