@ministryofjustice/fb-jwt-client-node
Advanced tools
Comparing version 0.0.27 to 0.0.28
@@ -41,3 +41,3 @@ const crypto = require('crypto') | ||
let sha256 = crypto.createHash('sha256') | ||
const sha256 = crypto.createHash('sha256') | ||
sha256.update(key) | ||
@@ -44,0 +44,0 @@ |
@@ -126,3 +126,3 @@ const got = require('got') | ||
// NB. jsonwebtoken helpfully sets ‘iat’ option by default | ||
let checksum = crypto.createHash('sha256').update(JSON.stringify(data)).digest('hex') | ||
const checksum = crypto.createHash('sha256').update(JSON.stringify(data)).digest('hex') | ||
const payload = {checksum} | ||
@@ -129,0 +129,0 @@ const accessToken = jwt.sign(payload, this.serviceToken, {algorithm}) |
@@ -638,3 +638,3 @@ const test = require('tape') | ||
gotStub.callsFake(options => { | ||
let error = new Error() | ||
const error = new Error() | ||
error.statusCode = 400 | ||
@@ -664,3 +664,3 @@ error.statusMessage = 'boom' | ||
gotStub.callsFake(options => { | ||
let error = new Error() | ||
const error = new Error() | ||
error.statusCode = 400 | ||
@@ -686,3 +686,3 @@ error.error = { | ||
gotStub.callsFake(options => { | ||
let error = new Error() | ||
const error = new Error() | ||
error.statusCode = 400 | ||
@@ -722,3 +722,3 @@ error.error = { | ||
const gotStub = stub(got, 'get') | ||
let error = new Error() | ||
const error = new Error() | ||
error.code = 'EBANG' | ||
@@ -764,3 +764,3 @@ error.statusCode = 400 | ||
const gotStub = stub(got, 'post') | ||
let error = new Error() | ||
const error = new Error() | ||
error.gotOptions = { | ||
@@ -767,0 +767,0 @@ headers: { |
{ | ||
"name": "@ministryofjustice/fb-jwt-client-node", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "Form Builder JSON Web Token Client (Node)", | ||
"main": "lib/fb-jwt-client.js", | ||
"scripts": { | ||
"lint": "eslint lib", | ||
"lint:fix": "eslint lib --fix", | ||
"test": "tap --reporter spec" | ||
}, | ||
"author": "Form Builder Team <form-builder-team@digital.justice.gov.uk>", | ||
"repository": { | ||
@@ -10,20 +16,3 @@ "type": "git", | ||
}, | ||
"scripts": { | ||
"lint": "npm-run-all lint:lib", | ||
"lint:lib": "eslint lib", | ||
"test": "npm-run-all lint test:all", | ||
"test:all": "npm-run-all test:unit", | ||
"test:unit": "multi-tape lib/**/*.unit.spec.js" | ||
}, | ||
"author": "github@alex.fu2k.org", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@ministryofjustice/eslint-config-fb": "^1.0.7", | ||
"multi-tape": "^1.2.1", | ||
"nock": "^10.0.6", | ||
"npm-run-all": "^4.1.5", | ||
"proxyquire": "^2.1.0", | ||
"sinon": "^7.3.2", | ||
"tape": "^4.10.2" | ||
}, | ||
"dependencies": { | ||
@@ -34,5 +23,11 @@ "@ministryofjustice/fb-utils-node": "^0.1.6", | ||
"jsonwebtoken": "^8.5.1", | ||
"path-to-regexp": "^3.0.0", | ||
"prom-client": "^11.5.2" | ||
"path-to-regexp": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"@ministryofjustice/eslint-config-fb": "^1.1.2", | ||
"nock": "^11.6.0", | ||
"sinon": "^7.5.0", | ||
"tap": "^14.8.2", | ||
"tape": "^4.11.0" | ||
} | ||
} |
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
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
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
5
5
52252
10
1337
1
- Removedprom-client@^11.5.2
- Removedbintrees@1.0.2(transitive)
- Removedprom-client@11.5.3(transitive)
- Removedtdigest@0.1.2(transitive)
Updatedpath-to-regexp@^3.1.0