Comparing version 2.0.0 to 3.0.0
{ | ||
"extends": "es/2015/server" | ||
"extends": "es/node" | ||
} |
{ | ||
"name": "limes", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "limes authenticates users.", | ||
@@ -15,12 +15,11 @@ "contributors": [ | ||
], | ||
"main": "dist/Limes.js", | ||
"main": "lib/Limes.js", | ||
"dependencies": { | ||
"@babel/runtime": "7.3.4", | ||
"jsonwebtoken": "8.5.0" | ||
"jsonwebtoken": "8.5.1" | ||
}, | ||
"devDependencies": { | ||
"assertthat": "2.0.3", | ||
"express": "4.16.4", | ||
"roboter": "4.0.2", | ||
"supertest": "4.0.0" | ||
"assertthat": "3.0.0", | ||
"express": "4.17.0", | ||
"roboter": "6.1.0", | ||
"supertest": "4.0.2" | ||
}, | ||
@@ -27,0 +26,0 @@ "repository": { |
@@ -57,6 +57,6 @@ # limes | ||
From time to time, e.g. for testing, you may want to get a JSON object that looks like a decoded token, but avoid the effort to create a signed token first. For this, use the static `issueUntrustedTokenAsJson` function and hand over the desired `issuer`, the `subject`, and an optional `payload`: | ||
From time to time, e.g. for testing, you may want to get a JSON object that looks like a decoded token, but avoid the effort to create a signed token first. For this, use the static `issueUntrustedToken` function and hand over the desired `issuer`, the `subject`, and an optional `payload`: | ||
```javascript | ||
const decodedToken = Limes.issueUntrustedTokenAsJson({ | ||
const { token, decodedToken } = Limes.issueUntrustedToken({ | ||
issuer: 'https://untrusted.thenativeweb.io', | ||
@@ -99,3 +99,3 @@ subject: 'jane.doe' | ||
Either way, the verified and decoded token will be attached to the `req.user` property: | ||
Either way, the verified and decoded token will be attached to the `req.user` property, while the original token will be attached to the `req.token` property: | ||
@@ -110,3 +110,3 @@ ```javascript | ||
app.get('/', (req, res) => { | ||
res.json(req.user); | ||
res.json({ user: req.user, token: req.token }); | ||
}); | ||
@@ -113,0 +113,0 @@ ``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
0
10791
5
158
+ Addedjsonwebtoken@8.5.1(transitive)
- Removed@babel/runtime@7.3.4
- Removed@babel/runtime@7.3.4(transitive)
- Removedjsonwebtoken@8.5.0(transitive)
- Removedregenerator-runtime@0.12.1(transitive)
Updatedjsonwebtoken@8.5.1