@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 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
 
@@ -46,7 +46,8 @@ const createPassportSvg = ({
46
46
  width,
47
47
  height,
48
48
 
49
- revoked,
49
+ tag: revoked ? 'revoked' : '',
50
+ tagVariant: revoked ? 'error' : 'info',
50
51
 
51
52
  color,
52
53
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.14-beta-d802cd3c",
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-d802cd3c",
24
- "@abtnode/logger": "1.16.14-beta-d802cd3c",
25
- "@abtnode/util": "1.16.14-beta-d802cd3c",
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.60",
27
+ "@arcblock/nft-display": "2.5.62",
28
28
  "@arcblock/vc": "1.18.87",
29
- "@blocklet/constant": "1.16.14-beta-d802cd3c",
30
- "@blocklet/meta": "1.16.14-beta-d802cd3c",
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": "f8e2dcefd8d6876e5dedee833ac976b4a0496b20"
46
+ "gitHead": "32bcf5b55889ebd7302887eedd306d331e9cd3b8"
47
47
  }