Skip to content

Commit

Permalink
Updated to Fastify v4 (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina authored May 10, 2022
1 parent ee78836 commit 9c7d970
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions jwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,17 @@ function fastifyJwt (fastify, options, next) {
}

const jwtDecorator = {
decode: decode,
decode,
options: {
decode: decodeOptions,
sign: initialSignOptions,
verify: initialVerifyOptions,
messages: messagesOptions
},
cookie: cookie,
sign: sign,
verify: verify,
lookupToken: lookupToken
cookie,
sign,
verify,
lookupToken
}

let jwtDecodeName = 'jwtDecode'
Expand Down Expand Up @@ -501,6 +501,6 @@ function fastifyJwt (fastify, options, next) {
}

module.exports = fp(fastifyJwt, {
fastify: '>=3.0.0',
name: 'fastify-jwt'
fastify: '4.x',
name: '@fastify/jwt'
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"devDependencies": {
"@fastify/cookie": "^6.0.0",
"@types/node": "^17.0.21",
"fastify": "^3.27.2",
"fastify": "^4.0.0-rc.2",
"pre-commit": "^1.2.2",
"standard": "^17.0.0",
"tap": "^16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/jwt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Fastify = require('fastify')
const { createSigner } = require('fast-jwt')
const jwt = require('../jwt')
const defaultExport = require('../jwt').default
const { fastifyJwt: namedExport } = require('../jwt')
const { '@fastify/jwt': namedExport } = require('../jwt')

const helper = require('./helper')

Expand Down

0 comments on commit 9c7d970

Please sign in to comment.