@abtnode/auth 1.16.11-next-ca5f18b5 → 1.16.11-next-3e55bc95

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 CHANGED
@@ -904,7 +904,7 @@ const handleIssuePassportResponse = async ({
904
904
  };
905
905
  };
906
906
 
907
- const getVCFromClaims = async ({ claims, challenge, trustedIssuers, vcTypes, locale = 'en', vcId }) => {
907
+ const getVCFromClaims = ({ claims, challenge, trustedIssuers, vcTypes, locale = 'en', vcId }) => {
908
908
  const credential = claims
909
909
  .filter(Boolean) // FIXES: https://github.com/ArcBlock/did-connect/issues/74
910
910
  .find((x) => x.type === 'verifiableCredential' && vcTypes.some((item) => x.item.includes(item)));
package/lib/launcher.js CHANGED
@@ -14,6 +14,7 @@ const schema = Joi.object({
14
14
  launcherUrl: Joi.string().uri().required(),
15
15
  });
16
16
 
17
+ // eslint-disable-next-line require-await
17
18
  const doRequest = async (serverSk, { launcherUrl, pathname, payload, method = 'post' }) => {
18
19
  if (!serverSk) {
19
20
  throw new Error('serverSk is required to request launcher');
@@ -89,7 +89,7 @@ const createLostPassportListRoute = ({ node, type }) => ({
89
89
  action: 'lost-passport-list',
90
90
 
91
91
  claims: {
92
- profile: async ({ extraParams }) => {
92
+ profile: ({ extraParams }) => {
93
93
  const { locale } = extraParams;
94
94
  return {
95
95
  fields: ['fullName'],
package/lib/server.js CHANGED
@@ -327,7 +327,7 @@ const getAuthVcClaim =
327
327
 
328
328
  const getAuthNFTClaim =
329
329
  ({ node }) =>
330
- async ({ extraParams: { locale, launchType, nftId }, context: { didwallet } }) => {
330
+ ({ extraParams: { locale, launchType, nftId }, context: { didwallet } }) => {
331
331
  checkWalletVersion({ didwallet, locale });
332
332
  if (launchType === 'serverless') {
333
333
  if (!nftId) {
@@ -565,7 +565,7 @@ const getOwnershipNFTClaim = async (node, locale) => {
565
565
  };
566
566
  };
567
567
 
568
- const getServerlessNFTClaim = async (nftId, locale) => {
568
+ const getServerlessNFTClaim = (nftId, locale) => {
569
569
  return {
570
570
  description: messages.requestBlockletSpaceNFT[locale],
571
571
  address: nftId,
@@ -777,7 +777,6 @@ const createLaunchBlockletHandler =
777
777
  description,
778
778
  appSk,
779
779
  skSource: didwallet?.version ? `${didwallet.os}-wallet-v${didwallet.version}` : '',
780
- delay: 4000, // wait for ws connection from frontend
781
780
  downloadTokenList: extraParams?.previousWorkflowData?.downloadTokenList,
782
781
  controller: role === SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER ? controller : null,
783
782
  },
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.11-next-ca5f18b5",
6
+ "version": "1.16.11-next-3e55bc95",
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.11-next-ca5f18b5",
24
- "@abtnode/logger": "1.16.11-next-ca5f18b5",
25
- "@abtnode/util": "1.16.11-next-ca5f18b5",
23
+ "@abtnode/constant": "1.16.11-next-3e55bc95",
24
+ "@abtnode/logger": "1.16.11-next-3e55bc95",
25
+ "@abtnode/util": "1.16.11-next-3e55bc95",
26
26
  "@arcblock/did": "1.18.80",
27
27
  "@arcblock/vc": "1.18.80",
28
- "@blocklet/constant": "1.16.11-next-ca5f18b5",
29
- "@blocklet/meta": "1.16.11-next-ca5f18b5",
28
+ "@blocklet/constant": "1.16.11-next-3e55bc95",
29
+ "@blocklet/meta": "1.16.11-next-3e55bc95",
30
30
  "@ocap/mcrypto": "1.18.80",
31
31
  "@ocap/util": "1.18.80",
32
32
  "@ocap/wallet": "1.18.80",
@@ -42,5 +42,5 @@
42
42
  "devDependencies": {
43
43
  "jest": "^27.5.1"
44
44
  },
45
- "gitHead": "d797d0177d585b66d17876c99c994fda4d812f37"
45
+ "gitHead": "cf0251c2d85c617b03151495b5944061ceb373e5"
46
46
  }