Skip to content

Commit dbffa3d

Browse files
Verify webid provider when extracting webid from claim
1 parent 9ba7cb3 commit dbffa3d

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

lib/api/authn/webid-oidc.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ function initialize (app, argv) {
4040

4141
// Expose session.userId
4242
app.use('/', (req, res, next) => {
43-
const userId = oidc.webIdFromClaims(req.claims)
44-
if (userId) {
45-
req.session.userId = userId
46-
}
47-
next()
43+
oidc.webIdFromClaims(req.claims)
44+
.then(webId => {
45+
if (webId) {
46+
req.session.userId = webId
47+
}
48+
49+
next()
50+
})
51+
.catch(next)
4852
})
4953
}
5054

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"node-forge": "^0.6.38",
6060
"nodemailer": "^3.1.4",
6161
"nomnom": "^1.8.1",
62-
"oidc-auth-manager": "^0.9.0",
62+
"oidc-auth-manager": "^0.10.0",
6363
"oidc-op-express": "^0.0.3",
6464
"rdflib": "^0.15.0",
6565
"recursive-readdir": "^2.1.0",

0 commit comments

Comments
 (0)