express-oauth2-jwt-bearer
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -88,3 +88,3 @@ 'use strict'; | ||
if (!fromQuery && !fromHeader && !fromBody) { | ||
throw new InvalidRequestError('Bearer token is missing'); | ||
throw new UnauthorizedError(); | ||
} | ||
@@ -290,3 +290,3 @@ if (+!!fromQuery + +!!fromBody + +!!fromHeader > 1) { | ||
if (!(claim in payload)) { | ||
return false; | ||
throw new InvalidTokenError(`Missing '${claim}' claim`); | ||
} | ||
@@ -332,3 +332,3 @@ let actual = payload[claim]; | ||
if (!(claim in payload)) { | ||
return false; | ||
throw new InvalidTokenError(`Missing '${claim}' claim`); | ||
} | ||
@@ -335,0 +335,0 @@ return payload[claim] === expected; |
{ | ||
"name": "express-oauth2-jwt-bearer", | ||
"description": "Authentication middleware for Express.js that validates JWT bearer access tokens.", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"main": "dist/index.js", | ||
@@ -10,3 +10,3 @@ "types": "dist/index.d.ts", | ||
"lint": "eslint --fix --ext .ts ./src", | ||
"prepublishOnly": "npm test && npm run lint", | ||
"prepublishOnly": "npm run build", | ||
"prebuild": "rimraf dist", | ||
@@ -13,0 +13,0 @@ "build": "rollup -c" |
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
25369
5