@abtnode/auth 1.16.20-beta-9c254d14 → 1.16.20-beta-e6e3b017

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.
Files changed (2) hide show
  1. package/lib/server.js +10 -1
  2. package/package.json +8 -8
package/lib/server.js CHANGED
@@ -755,7 +755,7 @@ const createLaunchBlockletHandler =
755
755
  if (existedBlocklet) {
756
756
  await updateSession({ isInstalled: true });
757
757
  logger.info('blocklet already exists', { appDid });
758
- return;
758
+ return null;
759
759
  }
760
760
 
761
761
  // 如果是 serverless, 并且已经消费过了,但是没有安装,则抛出异常
@@ -782,6 +782,15 @@ const createLaunchBlockletHandler =
782
782
  },
783
783
  formatContext(Object.assign(req, { user: { ...pick(user, ['did', 'fullName']), role } }))
784
784
  );
785
+
786
+ const result = await node.setupAppOwner(node, sessionId);
787
+ await updateSession({ setupToken: result.setupToken });
788
+
789
+ return {
790
+ disposition: 'attachment',
791
+ type: 'VerifiableCredential',
792
+ data: result.passport,
793
+ };
785
794
  };
786
795
 
787
796
  const getBlockletPermissionChecker =
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.20-beta-9c254d14",
6
+ "version": "1.16.20-beta-e6e3b017",
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.20-beta-9c254d14",
24
- "@abtnode/logger": "1.16.20-beta-9c254d14",
25
- "@abtnode/util": "1.16.20-beta-9c254d14",
23
+ "@abtnode/constant": "1.16.20-beta-e6e3b017",
24
+ "@abtnode/logger": "1.16.20-beta-e6e3b017",
25
+ "@abtnode/util": "1.16.20-beta-e6e3b017",
26
26
  "@arcblock/did": "1.18.103",
27
- "@arcblock/nft-display": "2.8.20",
27
+ "@arcblock/nft-display": "2.8.21",
28
28
  "@arcblock/vc": "1.18.103",
29
- "@blocklet/constant": "1.16.20-beta-9c254d14",
30
- "@blocklet/meta": "1.16.20-beta-9c254d14",
29
+ "@blocklet/constant": "1.16.20-beta-e6e3b017",
30
+ "@blocklet/meta": "1.16.20-beta-e6e3b017",
31
31
  "@ocap/mcrypto": "1.18.103",
32
32
  "@ocap/util": "1.18.103",
33
33
  "@ocap/wallet": "1.18.103",
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "jest": "^27.5.1"
45
45
  },
46
- "gitHead": "2f74601e9a8f2e07e872a629b6abc8d4bc1fd371"
46
+ "gitHead": "764869cd8c889713e56416f4e60385cc70b9482e"
47
47
  }