@semapps/auth 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@semapps/auth",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
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.9.0",
9
- "@semapps/middlewares": "0.9.0",
10
- "@semapps/mime-types": "0.9.0",
11
- "@semapps/triplestore": "0.9.0",
8
+ "@semapps/ldp": "0.9.1",
9
+ "@semapps/middlewares": "0.9.1",
10
+ "@semapps/mime-types": "0.9.1",
11
+ "@semapps/triplestore": "0.9.1",
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": "c37090ef1e0394e3e7be95df90f07605d55afc7b"
32
+ "gitHead": "7a337e5056d74edd3f789adf5592ae13a504646a"
33
33
  }
@@ -46,7 +46,7 @@ const AuthLocalService = {
46
46
  },
47
47
  actions: {
48
48
  async signup(ctx) {
49
- const { username, email, password, interactionId, ...rest } = ctx.params;
49
+ const { username, email, password, ...rest } = ctx.params;
50
50
  // This is going to get in our way otherwise when waiting for completions.
51
51
  ctx.meta.skipObjectsWatcher = true;
52
52
 
@@ -72,7 +72,7 @@ const AuthLocalService = {
72
72
  // Link the webId with the account
73
73
  accountData = await ctx.call('auth.account.attachWebId', { accountUri: accountData['@id'], webId });
74
74
 
75
- ctx.emit('auth.registered', { webId, profileData, accountData, interactionId });
75
+ ctx.emit('auth.registered', { webId, profileData, accountData });
76
76
 
77
77
  const token = await ctx.call('auth.jwt.generateToken', { payload: { webId } });
78
78
 
@@ -84,15 +84,11 @@ const AuthLocalService = {
84
84
  }
85
85
  },
86
86
  async login(ctx) {
87
- const { username, password, interactionId } = ctx.params;
87
+ const { username, password } = ctx.params;
88
88
 
89
89
  const accountData = await ctx.call('auth.account.verify', { username, password });
90
90
 
91
- ctx.emit(
92
- 'auth.connected',
93
- { webId: accountData.webId, accountData, interactionId },
94
- { meta: { webId: null, dataset: null } }
95
- );
91
+ ctx.emit('auth.connected', { webId: accountData.webId, accountData }, { meta: { webId: null, dataset: null } });
96
92
 
97
93
  const token = await ctx.call('auth.jwt.generateToken', { payload: { webId: accountData.webId } });
98
94