@semapps/auth 0.4.0-alpha.11 → 0.4.0-alpha.12
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 +8 -5
- package/package.json +4 -4
package/mixins/auth.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
const passport = require('passport');
|
2
|
+
const { Errors: E } = require('moleculer-web');
|
3
|
+
const { TripleStoreAdapter } = require('@semapps/triplestore');
|
1
4
|
const AuthAccountService = require('../services/account');
|
2
5
|
const AuthJWTService = require('../services/jwt');
|
3
|
-
const { Errors: E } = require('moleculer-web');
|
4
|
-
const passport = require('passport');
|
5
6
|
|
6
7
|
const AuthMixin = {
|
7
8
|
settings: {
|
@@ -9,18 +10,20 @@ const AuthMixin = {
|
|
9
10
|
jwtPath: null,
|
10
11
|
registrationAllowed: true,
|
11
12
|
reservedUsernames: [],
|
12
|
-
webIdSelection: []
|
13
|
+
webIdSelection: [],
|
14
|
+
accountsDataset: 'settings'
|
13
15
|
},
|
14
16
|
dependencies: ['api', 'webid'],
|
15
17
|
async created() {
|
16
|
-
const { jwtPath, reservedUsernames } = this.settings;
|
18
|
+
const { jwtPath, reservedUsernames, accountsDataset } = this.settings;
|
17
19
|
|
18
20
|
await this.broker.createService(AuthJWTService, {
|
19
21
|
settings: { jwtPath }
|
20
22
|
});
|
21
23
|
|
22
24
|
await this.broker.createService(AuthAccountService, {
|
23
|
-
settings: { reservedUsernames }
|
25
|
+
settings: { reservedUsernames },
|
26
|
+
adapter: new TripleStoreAdapter({ type: 'AuthAccount', dataset: accountsDataset }),
|
24
27
|
});
|
25
28
|
},
|
26
29
|
async started() {
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@semapps/auth",
|
3
|
-
"version": "0.4.0-alpha.
|
3
|
+
"version": "0.4.0-alpha.12",
|
4
4
|
"description": "Authentification module for SemApps",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "Virtual Assembly",
|
7
7
|
"dependencies": {
|
8
|
-
"@semapps/mime-types": "0.4.0-alpha.
|
9
|
-
"@semapps/triplestore": "0.4.0-alpha.
|
8
|
+
"@semapps/mime-types": "0.4.0-alpha.12",
|
9
|
+
"@semapps/triplestore": "0.4.0-alpha.12",
|
10
10
|
"bcrypt": "^5.0.1",
|
11
11
|
"express-session": "^1.17.0",
|
12
12
|
"jsonwebtoken": "^8.5.1",
|
@@ -22,5 +22,5 @@
|
|
22
22
|
"publishConfig": {
|
23
23
|
"access": "public"
|
24
24
|
},
|
25
|
-
"gitHead": "
|
25
|
+
"gitHead": "69f22b8c24503034a70fcefe452cede38b09a2cd"
|
26
26
|
}
|