@abtnode/auth 1.16.23-beta-06c3a221 → 1.16.23-beta-a2f9b088
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/connect-to-did-spaces.js +1 -1
- package/lib/server.js +6 -3
- package/package.json +15 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { getAppUrl, getAppName, getAppDescription } = require('@blocklet/meta/lib/util');
|
|
2
2
|
const { Joi } = require('@arcblock/validator');
|
|
3
|
-
const logger = require('@abtnode/logger')(require('../../../package.json').name);
|
|
4
3
|
const { DID_SPACES } = require('@blocklet/constant');
|
|
4
|
+
const logger = require('./logger');
|
|
5
5
|
const { messages } = require('./auth');
|
|
6
6
|
const { getDidSpacesInfoByClaims, silentAuthorizationInConnect } = require('./util/spaces');
|
|
7
7
|
|
package/lib/server.js
CHANGED
|
@@ -200,9 +200,12 @@ const authenticateByNFT = async ({ node, claims, userDid, challenge, locale, isA
|
|
|
200
200
|
// serverless 应用通过 querystring 传递 chainHost
|
|
201
201
|
const state = await verifyNFT({ claims, challenge, chainHost: chainHost || info.launcher.chainHost, locale });
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
if (
|
|
205
|
-
|
|
203
|
+
// 本地开发模式下,不校验 nft issuer, Launcher 会使用该字段
|
|
204
|
+
if (info.launcher?.mode !== 'development') {
|
|
205
|
+
const trustedLaunchers = await getLauncherAppIdList(get(info, 'launcher.url'));
|
|
206
|
+
if (!trustedLaunchers.includes(state.issuer)) {
|
|
207
|
+
throw new Error(messages.invalidNftIssuer[locale]);
|
|
208
|
+
}
|
|
206
209
|
}
|
|
207
210
|
|
|
208
211
|
if (state.tags.includes(NFT_TYPE_SERVERLESS)) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.23-beta-
|
|
6
|
+
"version": "1.16.23-beta-a2f9b088",
|
|
7
7
|
"description": "Simple lib to manage auth in ABT Node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -20,19 +20,19 @@
|
|
|
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.23-beta-
|
|
24
|
-
"@abtnode/logger": "1.16.23-beta-
|
|
25
|
-
"@abtnode/util": "1.16.23-beta-
|
|
26
|
-
"@arcblock/did": "1.18.
|
|
27
|
-
"@arcblock/nft-display": "2.9.
|
|
28
|
-
"@arcblock/validator": "^1.18.
|
|
29
|
-
"@arcblock/vc": "1.18.
|
|
30
|
-
"@blocklet/constant": "1.16.23-beta-
|
|
31
|
-
"@blocklet/meta": "1.16.23-beta-
|
|
32
|
-
"@ocap/client": "^1.18.
|
|
33
|
-
"@ocap/mcrypto": "1.18.
|
|
34
|
-
"@ocap/util": "1.18.
|
|
35
|
-
"@ocap/wallet": "1.18.
|
|
23
|
+
"@abtnode/constant": "1.16.23-beta-a2f9b088",
|
|
24
|
+
"@abtnode/logger": "1.16.23-beta-a2f9b088",
|
|
25
|
+
"@abtnode/util": "1.16.23-beta-a2f9b088",
|
|
26
|
+
"@arcblock/did": "1.18.110",
|
|
27
|
+
"@arcblock/nft-display": "2.9.24",
|
|
28
|
+
"@arcblock/validator": "^1.18.110",
|
|
29
|
+
"@arcblock/vc": "1.18.110",
|
|
30
|
+
"@blocklet/constant": "1.16.23-beta-a2f9b088",
|
|
31
|
+
"@blocklet/meta": "1.16.23-beta-a2f9b088",
|
|
32
|
+
"@ocap/client": "^1.18.110",
|
|
33
|
+
"@ocap/mcrypto": "1.18.110",
|
|
34
|
+
"@ocap/util": "1.18.110",
|
|
35
|
+
"@ocap/wallet": "1.18.110",
|
|
36
36
|
"axios": "^0.27.2",
|
|
37
37
|
"flat": "^5.0.2",
|
|
38
38
|
"fs-extra": "^11.2.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"jest": "^29.7.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "cc060de5d06e1759112a787dd10b780e628ce0b7"
|
|
53
53
|
}
|