@abtnode/auth 1.7.12 → 1.7.15
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/server.js +2 -2
- package/package.json +12 -12
package/lib/server.js
CHANGED
|
@@ -147,7 +147,7 @@ const authenticateByNFT = async ({ node, claims, userDid, challenge, locale }) =
|
|
|
147
147
|
if (!state) {
|
|
148
148
|
throw new Error(messages.invalidNft[locale]);
|
|
149
149
|
}
|
|
150
|
-
if (state.owner !== ownerDid
|
|
150
|
+
if (state.owner !== ownerDid) {
|
|
151
151
|
throw new Error(messages.invalidNftHolder[locale]);
|
|
152
152
|
}
|
|
153
153
|
if (state.issuer !== info.launcher.did) {
|
|
@@ -223,7 +223,7 @@ const getLaunchPaidBlockletClaims = (node, authMethod) => {
|
|
|
223
223
|
|
|
224
224
|
const getOwnershipNFTClaim = async (node, locale) => {
|
|
225
225
|
const info = await node.getNodeInfo();
|
|
226
|
-
if (!info.ownerNft && !info.ownerNft.
|
|
226
|
+
if (!info.ownerNft && !info.ownerNft.issuer) {
|
|
227
227
|
throw new Error(messages.noNft[locale]);
|
|
228
228
|
}
|
|
229
229
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.7.
|
|
6
|
+
"version": "1.7.15",
|
|
7
7
|
"description": "Simple lib to manage auth in ABT Node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@abtnode/constant": "1.7.
|
|
24
|
-
"@abtnode/logger": "1.7.
|
|
25
|
-
"@abtnode/util": "1.7.
|
|
26
|
-
"@arcblock/did": "^1.16.
|
|
27
|
-
"@arcblock/vc": "^1.16.
|
|
28
|
-
"@blocklet/meta": "1.7.
|
|
29
|
-
"@ocap/client": "1.16.
|
|
30
|
-
"@ocap/mcrypto": "^1.16.
|
|
31
|
-
"@ocap/util": "^1.16.
|
|
32
|
-
"@ocap/wallet": "^1.16.
|
|
23
|
+
"@abtnode/constant": "1.7.15",
|
|
24
|
+
"@abtnode/logger": "1.7.15",
|
|
25
|
+
"@abtnode/util": "1.7.15",
|
|
26
|
+
"@arcblock/did": "^1.16.8",
|
|
27
|
+
"@arcblock/vc": "^1.16.8",
|
|
28
|
+
"@blocklet/meta": "1.7.15",
|
|
29
|
+
"@ocap/client": "1.16.8",
|
|
30
|
+
"@ocap/mcrypto": "^1.16.8",
|
|
31
|
+
"@ocap/util": "^1.16.8",
|
|
32
|
+
"@ocap/wallet": "^1.16.8",
|
|
33
33
|
"axios": "^0.26.1",
|
|
34
34
|
"joi": "^17.6.0",
|
|
35
35
|
"jsonwebtoken": "^8.5.1",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"jest": "^27.4.5"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "d95421b38c281ed41fa7490a707f149aa737f3d3"
|
|
44
44
|
}
|