@abtnode/auth 1.16.14-beta-d802cd3c → 1.16.14-beta-1936d3d0
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/passport.js +2 -2
- package/lib/server.js +2 -2
- package/lib/util/create-passport-svg.js +2 -1
- package/package.json +8 -8
package/lib/passport.js
CHANGED
|
@@ -180,8 +180,8 @@ const createUserPassport = (vc, { status = PASSPORT_STATUS.VALID, role = ROLES.G
|
|
|
180
180
|
return x;
|
|
181
181
|
};
|
|
182
182
|
|
|
183
|
-
const getPassportClaimUrl = (baseUrl) =>
|
|
184
|
-
baseUrl ? joinUrl(new URL(baseUrl).origin, WELLKNOWN_SERVICE_PATH_PREFIX, '/lost-passport') : '';
|
|
183
|
+
const getPassportClaimUrl = (baseUrl, prefix = '') =>
|
|
184
|
+
baseUrl ? joinUrl(new URL(baseUrl).origin, prefix, WELLKNOWN_SERVICE_PATH_PREFIX, '/lost-passport') : '';
|
|
185
185
|
|
|
186
186
|
module.exports = {
|
|
187
187
|
validatePassport,
|
package/lib/server.js
CHANGED
|
@@ -286,7 +286,7 @@ const authenticateBySession = async ({ node, userDid, locale, allowedRoles = ['o
|
|
|
286
286
|
};
|
|
287
287
|
|
|
288
288
|
const getAuthVcClaim =
|
|
289
|
-
({ node, launchBlocklet, blocklet, options }) =>
|
|
289
|
+
({ node, launchBlocklet, blocklet, options, source = 'blocklet' }) =>
|
|
290
290
|
async ({ extraParams: { locale, passportId }, context: { didwallet, baseUrl } }) => {
|
|
291
291
|
checkWalletVersion({ didwallet, locale });
|
|
292
292
|
|
|
@@ -321,7 +321,7 @@ const getAuthVcClaim =
|
|
|
321
321
|
...baseClaim,
|
|
322
322
|
trustedIssuers,
|
|
323
323
|
...(options || {}),
|
|
324
|
-
claimUrl: getPassportClaimUrl(baseUrl),
|
|
324
|
+
claimUrl: getPassportClaimUrl(baseUrl, source === 'server' ? info.routing.adminPath : ''),
|
|
325
325
|
};
|
|
326
326
|
};
|
|
327
327
|
|
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-1936d3d0",
|
|
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-1936d3d0",
|
|
24
|
+
"@abtnode/logger": "1.16.14-beta-1936d3d0",
|
|
25
|
+
"@abtnode/util": "1.16.14-beta-1936d3d0",
|
|
26
26
|
"@arcblock/did": "1.18.87",
|
|
27
|
-
"@arcblock/nft-display": "2.5.
|
|
27
|
+
"@arcblock/nft-display": "2.5.62",
|
|
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-1936d3d0",
|
|
30
|
+
"@blocklet/meta": "1.16.14-beta-1936d3d0",
|
|
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": "32bcf5b55889ebd7302887eedd306d331e9cd3b8"
|
|
47
47
|
}
|