@semapps/auth 0.8.3 → 0.8.5

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/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@semapps/auth",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
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.3",
9
- "@semapps/middlewares": "0.8.3",
10
- "@semapps/mime-types": "0.8.3",
11
- "@semapps/triplestore": "0.8.3",
8
+ "@semapps/ldp": "0.8.5",
9
+ "@semapps/middlewares": "0.8.5",
10
+ "@semapps/mime-types": "0.8.5",
11
+ "@semapps/triplestore": "0.8.5",
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": "191e9bb4b0ab7b0801ff7faab022f16e167a9993"
32
+ "gitHead": "ee84441fa453484498a9a52d211ec277d0699d62"
33
33
  }
@@ -147,13 +147,13 @@ module.exports = {
147
147
  return resetPasswordToken;
148
148
  },
149
149
  async findDatasetByWebId(ctx) {
150
- const { webId } = ctx.meta;
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 { webId } = ctx.meta;
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
- console.log('JWT keypair not found, generating...');
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
  }