express-jwt
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -8,3 +8,3 @@ var jwt = require('jsonwebtoken'); | ||
var _userProperty = options.userProperty || 'user'; | ||
var _requestProperty = options.userProperty || options.requestProperty || 'user'; | ||
var credentialsRequired = typeof options.credentialsRequired === 'undefined' ? true : options.credentialsRequired; | ||
@@ -65,3 +65,3 @@ | ||
req[_userProperty] = decoded; | ||
req[_requestProperty] = decoded; | ||
next(); | ||
@@ -68,0 +68,0 @@ }); |
{ | ||
"name": "express-jwt", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "JWT authentication middleware.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -59,6 +59,6 @@ # express-jwt | ||
By default, the decoded token is attached to `req.user` but can be configured with the `userProperty` option. | ||
By default, the decoded token is attached to `req.user` but can be configured with the `requestProperty` option. | ||
```javascript | ||
jwt({ secret: publicKey, userProperty: 'auth' }); | ||
jwt({ secret: publicKey, requestProperty: 'auth' }); | ||
``` | ||
@@ -139,4 +139,2 @@ | ||
[The MIT License](http://opensource.org/licenses/MIT) | ||
Copyright (c) 2013 Auth0 <[http://auth0.com](http://auth0.com)> | ||
This project is licensed under the MIT license. See the [LICENSE](LICENSE.txt) file for more info. |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16193
8
0
139