fastify-jwt
Advanced tools
Comparing version 2.5.0 to 3.0.0
@@ -97,3 +97,2 @@ 'use strict' | ||
cookie: cookie, | ||
secret: secret, | ||
sign: sign, | ||
@@ -100,0 +99,0 @@ verify: verify |
{ | ||
"name": "fastify-jwt", | ||
"version": "2.5.0", | ||
"version": "3.0.0", | ||
"description": "JWT utils for Fastify", | ||
@@ -5,0 +5,0 @@ "main": "jwt.js", |
@@ -491,5 +491,2 @@ # fastify-jwt | ||
### fastify.jwt.secret | ||
For your convenience, the `secret` you specify during `.register` is made available via `fastify.jwt.secret`. `request.jwtVerify()` and `reply.jwtSign()` will wrap non-function secrets in a callback function. `request.jwtVerify()` and `reply.jwtSign()` use an asynchronous waterfall method to retrieve your secret. It's recommended that your use these methods if your `secret` method is asynchronous. | ||
### fastify.jwt.cookie | ||
@@ -496,0 +493,0 @@ For your convenience, `request.jwtVerify()` will look for the token in the cookies property of the decorated request. You must specify `cookieName`. Refer to the [cookie example](https://github.com/fastify/fastify-jwt#example-using-cookie) to see sample usage and important caveats. |
@@ -20,3 +20,3 @@ 'use strict' | ||
t.test('Expose jwt methods', function (t) { | ||
t.plan(7) | ||
t.plan(6) | ||
@@ -34,3 +34,2 @@ const fastify = Fastify() | ||
t.ok(fastify.jwt.options) | ||
t.ok(fastify.jwt.secret) | ||
t.ok(fastify.jwt.sign) | ||
@@ -37,0 +36,0 @@ t.ok(fastify.jwt.verify) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
106685
2406
653