Socket
Socket
Sign inDemoInstall

fast-jwt

Package Overview
Dependencies
Maintainers
3
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 0.5.0 to 0.5.1

2

package.json
{
"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 @@ }

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