Comparing version 2.6.0 to 2.7.0
@@ -69,2 +69,3 @@ var _ = require('underscore'); | ||
* @param {string} [opts.identity] - The identity of the first person | ||
* @param {number} [opts.nbf] - Time from epoch in seconds for not before value | ||
*/ | ||
@@ -82,2 +83,3 @@ function AccessToken(accountSid, keySid, secret, opts) { | ||
this.identity = opts.identity; | ||
this.nbf = opts.nbf; | ||
this.grants = []; | ||
@@ -109,3 +111,3 @@ } | ||
var grants = {}; | ||
if (this.identity) { grants.identity = this.identity; } | ||
if (_.isString(this.identity)) { grants.identity = this.identity; } | ||
@@ -119,5 +121,5 @@ _.each(this.grants, function(grant) { | ||
jti: this.keySid + '-' + now, | ||
nbf: now, | ||
grants: grants | ||
}; | ||
if (_.isNumber(this.nbf)) { payload.nbf = this.nbf; } | ||
@@ -124,0 +126,0 @@ return jwt.sign(payload, this.secret, { |
{ | ||
"name": "twilio", | ||
"description": "A Twilio helper library", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"author": "Kevin Whinnery <kevin.whinnery@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
2081
0
96437
1
0