You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@fastify/jwt

Package Overview
Dependencies
Maintainers
18
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0 to 6.1.0

8

jwt.js

@@ -78,2 +78,3 @@ 'use strict'

trusted,
decoratorName = 'user',
verify: initialVerifyOptions = {},

@@ -135,3 +136,4 @@ ...pluginOptions

verify: initialVerifyOptions,
messages: messagesOptions
messages: messagesOptions,
decoratorName
},

@@ -149,3 +151,3 @@ cookie,

if (!fastify.jwt) {
fastify.decorateRequest('user', null)
fastify.decorateRequest(decoratorName, null)
fastify.decorate('jwt', Object.create(null))

@@ -163,3 +165,3 @@ }

} else {
fastify.decorateRequest('user', null)
fastify.decorateRequest(decoratorName, null)
fastify.decorate('jwt', jwtDecorator)

@@ -166,0 +168,0 @@ }

{
"name": "@fastify/jwt",
"version": "6.0.0",
"version": "6.1.0",
"description": "JWT utils for Fastify",

@@ -5,0 +5,0 @@ "main": "jwt.js",

@@ -5,3 +5,2 @@ # @fastify/jwt

[![NPM version](https://img.shields.io/npm/v/@fastify/jwt.svg?style=flat)](https://www.npmjs.com/package/@fastify/jwt)
[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-jwt/badge.svg)](https://snyk.io/test/github/fastify/fastify-jwt)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)

@@ -415,2 +414,15 @@

### `decoratorName`
If this plugin is used together with fastify/passport, we might get an error as both plugins use the same name for a decorator. We can change the name of the decorator, or `user` will default
#### Example
```js
const fastify = require('fastify')
fastify.register(require('@fastify/jwt'), {
secret: 'supersecret',
decoratorName: 'customName'
})
```
### `decode`

@@ -417,0 +429,0 @@

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc