Socket
Socket
Sign inDemoInstall

fast-jwt

Package Overview
Dependencies
Maintainers
5
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-jwt - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

package.json
{
"name": "fast-jwt",
"version": "1.4.0",
"version": "1.4.1",
"description": "Fast JSON Web Token implementation",

@@ -61,3 +61,3 @@ "author": "NearForm Ltd",

"@sinonjs/fake-timers": "^8.0.1",
"@types/node": "^16.0.0",
"@types/node": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^4.4.0",

@@ -64,0 +64,0 @@ "@typescript-eslint/parser": "^4.4.0",

@@ -50,7 +50,9 @@ import 'node'

declare function Signer(payload: string | Buffer | { [key: string]: any }): Promise<string>
declare function Signer(payload: string | Buffer | { [key: string]: any }, cb: SignerCallback): void
declare function SignerSync(payload: string | Buffer | { [key: string]: any }): string
declare function SignerAsync(payload: string | Buffer | { [key: string]: any }): Promise<string>
declare function SignerAsync(payload: string | Buffer | { [key: string]: any }, cb: SignerCallback): void
declare function Verifier(token: string | Buffer): Promise<any>
declare function Verifier(token: string | Buffer, cb: object): void
declare function VerifierSync(token: string | Buffer): any
declare function VerifierAsync(token: string | Buffer): Promise<any>
declare function VerifierAsync(token: string | Buffer, cb: object): void

@@ -71,3 +73,2 @@ export interface JwtHeader {

export interface SignerOptions {
key: string | Buffer | KeyFetcher
algorithm: Algorithm

@@ -94,3 +95,2 @@ mutatePayload: boolean

export interface VerifierOptions {
key: string | Buffer | KeyFetcher
algorithms: Algorithm[]

@@ -112,4 +112,6 @@ complete: boolean

export function createSigner(options?: Partial<SignerOptions>): typeof Signer
export function createSigner(options?: Partial<SignerOptions & { key: string | Buffer }>): typeof SignerSync
export function createSigner(options?: Partial<SignerOptions & { key: KeyFetcher }>): typeof SignerAsync
export function createDecoder(options?: Partial<DecoderOptions>): (token: string | Buffer) => any
export function createVerifier(options?: Partial<VerifierOptions>): typeof Verifier
export function createVerifier(options?: Partial<VerifierOptions & { key: string | Buffer }>): typeof VerifierSync
export function createVerifier(options?: Partial<VerifierOptions & { key: KeyFetcher }>): typeof VerifierAsync
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