@abtnode/auth 1.16.13-beta-d17a7de4 → 1.16.13-beta-90ded76f
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/lib/auth.js +6 -1
- package/package.json +7 -7
package/lib/auth.js
CHANGED
|
@@ -376,7 +376,7 @@ const getApplicationInfo = async ({ node, nodeInfo = {}, teamDid }) => {
|
|
|
376
376
|
};
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
-
const createAuthToken = ({ did, passport, role, secret, expiresIn, tokenType } = {}) => {
|
|
379
|
+
const createAuthToken = ({ did, passport, role, secret, expiresIn, fullName, tokenType } = {}) => {
|
|
380
380
|
const payload = {
|
|
381
381
|
type: 'user',
|
|
382
382
|
did,
|
|
@@ -394,6 +394,10 @@ const createAuthToken = ({ did, passport, role, secret, expiresIn, tokenType } =
|
|
|
394
394
|
payload.tokenType = tokenType;
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
+
if (fullName) {
|
|
398
|
+
payload.fullName = fullName;
|
|
399
|
+
}
|
|
400
|
+
|
|
397
401
|
const token = jwt.sign(payload, secret, { expiresIn });
|
|
398
402
|
return token;
|
|
399
403
|
};
|
|
@@ -675,6 +679,7 @@ const handleInvitationReceive = async ({
|
|
|
675
679
|
type: 'VerifiableCredential',
|
|
676
680
|
data: vc,
|
|
677
681
|
},
|
|
682
|
+
profile,
|
|
678
683
|
};
|
|
679
684
|
};
|
|
680
685
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.13-beta-
|
|
6
|
+
"version": "1.16.13-beta-90ded76f",
|
|
7
7
|
"description": "Simple lib to manage auth in ABT Node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@abtnode/constant": "1.16.13-beta-
|
|
24
|
-
"@abtnode/logger": "1.16.13-beta-
|
|
25
|
-
"@abtnode/util": "1.16.13-beta-
|
|
23
|
+
"@abtnode/constant": "1.16.13-beta-90ded76f",
|
|
24
|
+
"@abtnode/logger": "1.16.13-beta-90ded76f",
|
|
25
|
+
"@abtnode/util": "1.16.13-beta-90ded76f",
|
|
26
26
|
"@arcblock/did": "1.18.84",
|
|
27
27
|
"@arcblock/vc": "1.18.84",
|
|
28
|
-
"@blocklet/constant": "1.16.13-beta-
|
|
29
|
-
"@blocklet/meta": "1.16.13-beta-
|
|
28
|
+
"@blocklet/constant": "1.16.13-beta-90ded76f",
|
|
29
|
+
"@blocklet/meta": "1.16.13-beta-90ded76f",
|
|
30
30
|
"@ocap/mcrypto": "1.18.84",
|
|
31
31
|
"@ocap/util": "1.18.84",
|
|
32
32
|
"@ocap/wallet": "1.18.84",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"jest": "^27.5.1"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e6d4b88fe2cb45e00e5d745e1cd148dc76a019a4"
|
|
46
46
|
}
|