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

express-jwt

Package Overview
Dependencies
Maintainers
4
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-jwt - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

7

lib/index.js

@@ -8,2 +8,7 @@ var jwt = require('jsonwebtoken');

var getClass = {}.toString;
function isFunction(object) {
return object && getClass.call(object) == '[object Function]';
}
function wrapStaticSecretInCallback(secret){

@@ -20,3 +25,3 @@ return function(_, __, cb){

if (typeof secretCallback === 'string'){
if (!isFunction(secretCallback)){
secretCallback = wrapStaticSecretInCallback(secretCallback);

@@ -23,0 +28,0 @@ }

2

package.json
{
"name": "express-jwt",
"version": "2.0.0",
"version": "2.0.1",
"description": "JWT authentication middleware.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -186,21 +186,7 @@ # express-jwt

## Credits
## Contributors
Check them our [here](https://github.com/auth0/express-jwt/graphs/contributors)
- @jfromaniello ([20 contributions](https://github.com/auth0/express-jwt/commits?author=jfromaniello))
- @woloski ([16 contributions](https://github.com/auth0/express-jwt/commits?author=woloski))
- @aaronogle ([3 contributions](https://github.com/auth0/express-jwt/commits?author=aaronogle))
- @mck- ([3 contributions](https://github.com/auth0/express-jwt/commits?author=mck-))
- @CLevasseur ([2 contributions](https://github.com/auth0/express-jwt/commits?author=CLevasseur))
- @wiherek5 ([1 contributions](https://github.com/auth0/express-jwt/commits?author=wiherek5))
- @davis ([1 contributions](https://github.com/auth0/express-jwt/commits?author=davis))
- @godeatgod ([1 contributions](https://github.com/auth0/express-jwt/commits?author=godeatgod))
- @nkcmr ([1 contributions](https://github.com/auth0/express-jwt/commits?author=nkcmr))
- @philosoralphter ([1 contributions](https://github.com/auth0/express-jwt/commits?author=philosoralphter))
- @iamsebastian ([1 contributions](https://github.com/auth0/express-jwt/commits?author=iamsebastian))
- @tonytamps ([1 contributions](https://github.com/auth0/express-jwt/commits?author=tonytamps))
- @dannyrscott ([1 contributions](https://github.com/auth0/express-jwt/commits?author=dannyrscott))
- @dschenkelman ([1 contributions](https://github.com/auth0/express-jwt/commits?author=dschenkelman))
## License
This project is licensed under the MIT license. See the [LICENSE](LICENSE.txt) file for more info.

@@ -180,2 +180,13 @@ var jwt = require('jsonwebtoken');

it('should work if authorization header is valid with a buffer secret', function() {
var secret = new Buffer('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'base64');
var token = jwt.sign({foo: 'bar'}, secret);
req.headers = {};
req.headers.authorization = 'Bearer ' + token;
expressjwt({secret: secret})(req, res, function() {
assert.equal('bar', req.user.foo);
});
});
it('should set userProperty if option provided', function() {

@@ -182,0 +193,0 @@ var secret = 'shhhhhh';

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