@semapps/auth 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mixins/auth.js +5 -0
- package/package.json +7 -7
package/mixins/auth.js
CHANGED
@@ -189,6 +189,11 @@ const AuthMixin = {
|
|
189
189
|
// We do not use the VC-JOSE spec to sign and envelop presentations. Instead we go
|
190
190
|
// with embedded signatures. This way, the signature persists within the resource.
|
191
191
|
|
192
|
+
const hasCapabilityService = ctx.broker.registry.actions.isAvailable(
|
193
|
+
'crypto.vc.verifier.verifyCapabilityPresentation'
|
194
|
+
);
|
195
|
+
if (!hasCapabilityService) return Promise.reject(new E.UnAuthorizedError(E.ERR_INVALID_TOKEN));
|
196
|
+
|
192
197
|
// Decode JTW to JSON.
|
193
198
|
const decodedToken = await ctx.call('auth.jwt.decodeToken', { token });
|
194
199
|
if (!decodedToken) return Promise.reject(new E.UnAuthorizedError(E.ERR_INVALID_TOKEN));
|
package/package.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "@semapps/auth",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.4",
|
4
4
|
"description": "Authentification module for SemApps",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "Virtual Assembly",
|
7
7
|
"dependencies": {
|
8
|
-
"@semapps/ldp": "1.1.
|
9
|
-
"@semapps/middlewares": "1.1.
|
10
|
-
"@semapps/mime-types": "1.1.
|
11
|
-
"@semapps/triplestore": "1.1.
|
8
|
+
"@semapps/ldp": "1.1.4",
|
9
|
+
"@semapps/middlewares": "1.1.4",
|
10
|
+
"@semapps/mime-types": "1.1.4",
|
11
|
+
"@semapps/triplestore": "1.1.4",
|
12
12
|
"bcrypt": "^5.0.1",
|
13
13
|
"express-session": "^1.17.0",
|
14
|
-
"jsonwebtoken": "^
|
14
|
+
"jsonwebtoken": "^9.0.2",
|
15
15
|
"moleculer": "^0.14.17",
|
16
16
|
"moleculer-db": "^0.8.16",
|
17
17
|
"moleculer-mail": "^1.2.5",
|
@@ -30,5 +30,5 @@
|
|
30
30
|
"engines": {
|
31
31
|
"node": ">=14"
|
32
32
|
},
|
33
|
-
"gitHead": "
|
33
|
+
"gitHead": "b8e1061c9d94cbaa42ef5c5bca87f38f0da9fb1a"
|
34
34
|
}
|