Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-jwt

Package Overview
Dependencies
Maintainers
7
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-jwt - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

0

certs/readme.md

@@ -0,0 +0,0 @@ # Certificates generation

@@ -0,0 +0,0 @@ 'use strict'

2

package.json
{
"name": "fastify-jwt",
"version": "0.9.0",
"version": "0.9.1",
"description": "JWT utils for Fastify",

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

@@ -32,3 +32,3 @@ # fastify-jwt

For verifying & accessing the decoded token inside your services, you can use a global `preHandler` hook to define the verification process like so:
For verifying & accessing the decoded token inside your services, you can use a global `onRequest` hook to define the verification process like so:

@@ -41,3 +41,3 @@ ```js

fastify.addHook("preHandler", async (request, reply) => {
fastify.addHook("onRequest", async (request, reply) => {
try {

@@ -81,3 +81,3 @@ await request.jwtVerify()

Then use the `preHandler` of a route to protect it & access the user information inside:
Then use the `onRequest` of a route to protect it & access the user information inside:

@@ -89,3 +89,3 @@ ```js

{
preHandler: [fastify.authenticate]
onRequest: [fastify.authenticate]
},

@@ -92,0 +92,0 @@ async function(request, reply) {

@@ -0,0 +0,0 @@ 'use strict'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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