@semapps/auth 0.8.4 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +6 -6
- package/services/account.js +2 -2
- package/services/jwt.js +1 -1
package/package.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@semapps/auth",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.6",
|
4
4
|
"description": "Authentification module for SemApps",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "Virtual Assembly",
|
7
7
|
"dependencies": {
|
8
|
-
"@semapps/ldp": "0.8.
|
9
|
-
"@semapps/middlewares": "0.8.
|
10
|
-
"@semapps/mime-types": "0.8.
|
11
|
-
"@semapps/triplestore": "0.8.
|
8
|
+
"@semapps/ldp": "0.8.6",
|
9
|
+
"@semapps/middlewares": "0.8.6",
|
10
|
+
"@semapps/mime-types": "0.8.6",
|
11
|
+
"@semapps/triplestore": "0.8.6",
|
12
12
|
"bcrypt": "^5.0.1",
|
13
13
|
"express-session": "^1.17.0",
|
14
14
|
"jsonwebtoken": "^8.5.1",
|
@@ -29,5 +29,5 @@
|
|
29
29
|
"engines": {
|
30
30
|
"node": ">=14"
|
31
31
|
},
|
32
|
-
"gitHead": "
|
32
|
+
"gitHead": "8431d0ecf0cc3fe9c6bb71ffb5985f1401126f24"
|
33
33
|
}
|
package/services/account.js
CHANGED
@@ -147,13 +147,13 @@ module.exports = {
|
|
147
147
|
return resetPasswordToken;
|
148
148
|
},
|
149
149
|
async findDatasetByWebId(ctx) {
|
150
|
-
const
|
150
|
+
const webId = ctx.params.webId || ctx.meta.webId;
|
151
151
|
const account = await ctx.call('auth.account.findByWebId', { webId });
|
152
152
|
// If no podUri exist, it means we are not in Pod config
|
153
153
|
return account?.podUri ? getSlugFromUri(webId) : undefined;
|
154
154
|
},
|
155
155
|
async findSettingsByWebId(ctx) {
|
156
|
-
const
|
156
|
+
const webId = ctx.params.webId || ctx.meta.webId;
|
157
157
|
const account = await ctx.call('auth.account.findByWebId', { webId });
|
158
158
|
|
159
159
|
return {
|
package/services/jwt.js
CHANGED
@@ -13,7 +13,7 @@ module.exports = {
|
|
13
13
|
const publicKeyPath = path.resolve(this.settings.jwtPath, 'jwtRS256.key.pub');
|
14
14
|
|
15
15
|
if (!fs.existsSync(privateKeyPath) && !fs.existsSync(publicKeyPath)) {
|
16
|
-
|
16
|
+
this.logger.info('JWT keypair not found, generating...');
|
17
17
|
if (!fs.existsSync(this.settings.jwtPath)) {
|
18
18
|
fs.mkdirSync(this.settings.jwtPath);
|
19
19
|
}
|