Socket
Socket
Sign inDemoInstall

@fastify/jwt

Package Overview
Dependencies
5
Maintainers
18
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.7.0 to 6.7.1

1

jwt.d.ts

@@ -121,2 +121,3 @@ import {

authorizationTokenUntrusted?: string
authorizationTokenUnsigned?: string
}

@@ -123,0 +124,0 @@ trusted?: (request: FastifyRequest, decodedToken: { [k: string]: any }) => boolean | Promise<boolean> | SignPayloadType | Promise<SignPayloadType>

@@ -17,3 +17,4 @@ 'use strict'

authorizationTokenInvalid: (err) => `Authorization token is invalid: ${err.message}`,
authorizationTokenUntrusted: 'Untrusted authorization token'
authorizationTokenUntrusted: 'Untrusted authorization token',
authorizationTokenUnsigned: 'Unsigned authorization token'
}

@@ -113,2 +114,3 @@

const AuthorizationTokenUntrustedError = createError('FST_JWT_AUTHORIZATION_TOKEN_UNTRUSTED', messagesOptions.authorizationTokenUntrusted, 401)
const AuthorizationTokenUnsignedError = createError('FAST_JWT_MISSING_SIGNATURE', messagesOptions.authorizationTokenUnsigned, 401)
const NoAuthorizationInHeaderError = createError('FST_JWT_NO_AUTHORIZATION_IN_HEADER', messagesOptions.noAuthorizationInHeaderMessage, 401)

@@ -503,2 +505,6 @@ const AuthorizationTokenInvalidError = createError('FST_JWT_AUTHORIZATION_TOKEN_INVALID', typeof messagesOptions.authorizationTokenInvalid === 'function'

if (error.code === TokenError.codes.missingSignature) {
return callback(new AuthorizationTokenUnsignedError())
}
return callback(error)

@@ -505,0 +511,0 @@ }

4

package.json
{
"name": "@fastify/jwt",
"version": "6.7.0",
"version": "6.7.1",
"description": "JWT utils for Fastify",

@@ -47,3 +47,3 @@ "main": "jwt.js",

"tap": "^16.0.0",
"tsd": "^0.25.0"
"tsd": "^0.27.0"
},

@@ -50,0 +50,0 @@ "tsd": {

@@ -457,4 +457,8 @@ # @fastify/jwt

badRequestErrorMessage: 'Format is Authorization: Bearer [token]',
badCookieRequestErrorMessage: 'Cookie could not be parsed in request',
noAuthorizationInHeaderMessage: 'Autorization header is missing!',
noAuthorizationInCookieMessage: 'No Authorization was found in request.cookies',
authorizationTokenExpiredMessage: 'Authorization token expired',
authorizationTokenUntrusted: 'Untrusted authorization token',
authorizationTokenUnsigned: 'Unsigned authorization token
// for the below message you can pass a sync function that must return a string as shown or a string

@@ -461,0 +465,0 @@ authorizationTokenInvalid: (err) => {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc