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

jwt-authentication

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwt-authentication - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

4

docs/CHANGELOG.md

@@ -0,1 +1,5 @@

<a name"0.3.6"></a>
### 0.3.6 (2018-05-17)
<a name"0.3.3"></a>

@@ -2,0 +6,0 @@ ### 0.3.3 (2017-08-30)

16

lib/jwt-authentication/json-web-token.js

@@ -28,7 +28,11 @@ var _ = require('lodash');

create: function (claims, options) {
var jsonWebTokenClaims = _.merge({}, claims, {
jti: crypto.randomBytes(20).toString('hex'),
nbf: options.notBefore,
iat: options.iat
});
var jsonWebTokenClaims = _.merge(
{},
claims,
_.omitBy({
jti: crypto.randomBytes(20).toString('hex'),
nbf: options.notBefore,
iat: options.iat
}, _.isUndefined)
);

@@ -45,2 +49,2 @@ var jsonWebTokenOptions = {

}
};
};

@@ -23,3 +23,3 @@ var currentTime = require('../../common/current-time');

var issuerAuthorization = function(authorizedSubjects, issuer) {
if (!_.contains(authorizedSubjects, issuer)) {
if (!_.includes(authorizedSubjects, issuer)) {
return q.reject(new Error('Unknown or unauthorized subject'));

@@ -26,0 +26,0 @@ }

{
"name": "jwt-authentication",
"version": "0.3.5",
"version": "0.3.6",
"description": "Library that is used to create and verify json web tokens for service to service authentication purposes.",

@@ -51,3 +51,3 @@ "main": "index.js",

"jsonwebtoken": "^5.0.0",
"lodash": "^3.0.0",
"lodash": "^4.17.10",
"node-cache": "^3.0.0",

@@ -54,0 +54,0 @@ "node-forge": "^0.7.1",

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