@ne1410s/xprest
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -109,3 +109,3 @@ 'use strict'; | ||
payload: payload, | ||
secret: this.secret | ||
secret: this.secret, | ||
}); | ||
@@ -117,6 +117,6 @@ }; | ||
var payload = this.parseRaw(token); | ||
return payload | ||
&& (!payload.exp || now < payload.exp) | ||
&& (!payload.nbf || now >= payload.nbf) | ||
&& jws.verify(token, 'HS256', this.secret) | ||
return payload && | ||
(!payload.exp || now < payload.exp) && | ||
(!payload.nbf || now >= payload.nbf) && | ||
jws.verify(token, 'HS256', this.secret) | ||
? payload | ||
@@ -123,0 +123,0 @@ : null; |
@@ -103,3 +103,3 @@ import cors from 'cors'; | ||
payload: payload, | ||
secret: this.secret | ||
secret: this.secret, | ||
}); | ||
@@ -111,6 +111,6 @@ }; | ||
var payload = this.parseRaw(token); | ||
return payload | ||
&& (!payload.exp || now < payload.exp) | ||
&& (!payload.nbf || now >= payload.nbf) | ||
&& verify(token, 'HS256', this.secret) | ||
return payload && | ||
(!payload.exp || now < payload.exp) && | ||
(!payload.nbf || now >= payload.nbf) && | ||
verify(token, 'HS256', this.secret) | ||
? payload | ||
@@ -117,0 +117,0 @@ : null; |
{ | ||
"name": "@ne1410s/xprest", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "RESTful express core library", | ||
@@ -13,4 +13,6 @@ "main": "dist/ne14_xprest.cjs.min.js", | ||
"clean": "npx rimraf dist", | ||
"is-pretty": "npx prettier --list-different . --ignore-path .gitignore", | ||
"prettify": "npx prettier --write . --ignore-path .gitignore", | ||
"build": "npm run clean && npx rollup -c", | ||
"test": "npm run build && mocha --exit", | ||
"test": "npm run is-pretty && npm run build && mocha --exit", | ||
"publish-local": "npm run build && npm pack", | ||
@@ -43,8 +45,9 @@ "publish-patch": "npm run build && npm version patch && npm publish --access public", | ||
"@types/jws": "^3.2.2", | ||
"@types/node": "^14.0.11", | ||
"@types/node": "^14.0.14", | ||
"chai": "^4.2.0", | ||
"ejs": "^3.1.3", | ||
"mocha": "^7.2.0", | ||
"mocha": "^8.0.1", | ||
"prettier": "^2.0.5", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.15.0", | ||
"rollup": "^2.18.0", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
@@ -51,0 +54,0 @@ "typescript": "^3.9.5" |
# @ne1410s/xprest | ||
RESTful Express core library | ||
## Designed For: | ||
- Server-side packages using `express` | ||
- Simplifying `express` routing for local resources | ||
- Propagating dynamic rendering capabilities | ||
- Server-side packages using `express` | ||
- Simplifying `express` routing for local resources | ||
- Propagating dynamic rendering capabilities | ||
## Not Designed For: | ||
- Client-side | ||
- Consuming another api (see `@ne1410s/http`) | ||
- Client-side | ||
- Consuming another api (see `@ne1410s/http`) |
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
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
16195
15
13