@abtnode/auth 1.16.14-beta-1936d3d0 → 1.16.14-beta-dc99d0a2
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 +2 -0
- package/package.json +8 -8
package/lib/auth.js
CHANGED
|
@@ -1134,11 +1134,13 @@ const setUserInfoHeaders = (req) => {
|
|
|
1134
1134
|
req.headers['x-user-did'] = req.user.did;
|
|
1135
1135
|
req.headers['x-user-fullname'] = encodeURIComponent(req.user.fullName);
|
|
1136
1136
|
req.headers['x-user-role'] = req.user.role;
|
|
1137
|
+
req.headers['x-user-provider'] = req.user.provider || LOGIN_PROVIDER.WALLET;
|
|
1137
1138
|
req.headers['x-connected-did'] = req.user.did;
|
|
1138
1139
|
} else {
|
|
1139
1140
|
delete req.headers['x-user-did'];
|
|
1140
1141
|
delete req.headers['x-user-fullname'];
|
|
1141
1142
|
delete req.headers['x-user-role'];
|
|
1143
|
+
delete req.headers['x-user-provider'];
|
|
1142
1144
|
|
|
1143
1145
|
if (req.cookies && req.cookies.connected_did) {
|
|
1144
1146
|
req.headers['x-connected-did'] = req.cookies.connected_did;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.14-beta-
|
|
6
|
+
"version": "1.16.14-beta-dc99d0a2",
|
|
7
7
|
"description": "Simple lib to manage auth in ABT Node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -20,14 +20,14 @@
|
|
|
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.14-beta-
|
|
24
|
-
"@abtnode/logger": "1.16.14-beta-
|
|
25
|
-
"@abtnode/util": "1.16.14-beta-
|
|
23
|
+
"@abtnode/constant": "1.16.14-beta-dc99d0a2",
|
|
24
|
+
"@abtnode/logger": "1.16.14-beta-dc99d0a2",
|
|
25
|
+
"@abtnode/util": "1.16.14-beta-dc99d0a2",
|
|
26
26
|
"@arcblock/did": "1.18.87",
|
|
27
|
-
"@arcblock/nft-display": "2.5.
|
|
27
|
+
"@arcblock/nft-display": "2.5.65",
|
|
28
28
|
"@arcblock/vc": "1.18.87",
|
|
29
|
-
"@blocklet/constant": "1.16.14-beta-
|
|
30
|
-
"@blocklet/meta": "1.16.14-beta-
|
|
29
|
+
"@blocklet/constant": "1.16.14-beta-dc99d0a2",
|
|
30
|
+
"@blocklet/meta": "1.16.14-beta-dc99d0a2",
|
|
31
31
|
"@ocap/mcrypto": "1.18.87",
|
|
32
32
|
"@ocap/util": "1.18.87",
|
|
33
33
|
"@ocap/wallet": "1.18.87",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"jest": "^27.5.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "a00766d660ede97e2036f3a785f4f5cfb2e6d870"
|
|
47
47
|
}
|