Comparing version 5.1.0 to 5.1.1
# Change Log | ||
## v5.1.1 (2020/05/25) | ||
- **Fix:** The upcoming Grant constructor | ||
## v5.1.0 (2020/05/25) | ||
@@ -5,0 +8,0 @@ - **New:** Support for `private_key_jwt` client authentication |
19
grant.js
function grant ({handler, ...rest}) { | ||
var version = () => ({ | ||
express: 4, | ||
koa: parseInt(require('koa/package.json').version.split('.')[0]) >= 2 ? 2 : 1, | ||
hapi: (() => { | ||
if (handler === 'express') { | ||
var version = 4 | ||
} | ||
else if (handler === 'koa') { | ||
var version = | ||
parseInt(require('koa/package.json').version.split('.')[0]) >= 2 ? 2 : 1 | ||
} | ||
else if (handler === 'hapi') { | ||
var version = (() => { | ||
var pkg | ||
@@ -16,6 +21,6 @@ try { | ||
})() >= 17 ? 17 : 16 | ||
}[handler]) | ||
} | ||
if (/express|koa|hapi/.test(handler) && !/-\d+$/.test(handler)) { | ||
return require(`./lib/handler/${handler}-${version()}`)(rest) | ||
if (/^(?:express|koa|hapi)$/.test(handler)) { | ||
return require(`./lib/handler/${handler}-${version}`)(rest) | ||
} | ||
@@ -22,0 +27,0 @@ else { |
{ | ||
"name": "grant", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "OAuth Proxy", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
138897
2816