@abtnode/auth 1.16.18-beta-7aa6be5a → 1.16.18-beta-bb4ebacc

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/auth.js +1 -31
  2. package/package.json +14 -14
package/lib/auth.js CHANGED
@@ -364,7 +364,7 @@ const getApplicationInfo = async ({ node, nodeInfo = {}, teamDid, baseUrl = '' }
364
364
  owner = get(blocklet, 'settings.owner');
365
365
  dataDir = blocklet.env.dataDir;
366
366
  secret = blockletInfo.secret;
367
- logo = getAppAvatarUrl(baseUrl);
367
+ logo = getAppAvatarUrl(baseUrl || blockletInfo.appUrl);
368
368
  }
369
369
 
370
370
  return {
@@ -1249,35 +1249,6 @@ const verifyNFT = async ({ claims, challenge, chainHost, locale }) => {
1249
1249
  * @property {string} [appPid] - 统一登录的 master appPid
1250
1250
  */
1251
1251
 
1252
- /**
1253
- *
1254
- * @param {UserSessionRequstData} data
1255
- * @param {UserSessionRequstOption} options
1256
- * @returns
1257
- */
1258
- async function upsertUserSession(
1259
- { visitorId, teamDid, userDid, appPid, passportId, status },
1260
- { req, node, sourceAppPid }
1261
- ) {
1262
- const lastLoginIp = req.headers['x-real-ip'];
1263
- const ua = req.headers['user-agent'];
1264
-
1265
- const doc = await node.upsertUserSession({
1266
- teamDid,
1267
- visitorId,
1268
- lastLoginIp,
1269
- userDid,
1270
- ua,
1271
- appPid,
1272
- passportId,
1273
- status,
1274
- // 如果是来自统一登录流程,则需要向 master 再发起一次记录的请求
1275
- sourceAppPid,
1276
- });
1277
-
1278
- return doc;
1279
- }
1280
-
1281
1252
  module.exports = {
1282
1253
  getUser,
1283
1254
  getApplicationInfo,
@@ -1301,5 +1272,4 @@ module.exports = {
1301
1272
  setUserInfoHeaders,
1302
1273
  createBlockletControllerAuthToken,
1303
1274
  TEAM_TYPE,
1304
- upsertUserSession,
1305
1275
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.18-beta-7aa6be5a",
6
+ "version": "1.16.18-beta-bb4ebacc",
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.18-beta-7aa6be5a",
24
- "@abtnode/logger": "1.16.18-beta-7aa6be5a",
25
- "@abtnode/util": "1.16.18-beta-7aa6be5a",
26
- "@arcblock/did": "1.18.93",
27
- "@arcblock/nft-display": "2.8.5",
28
- "@arcblock/vc": "1.18.93",
29
- "@blocklet/constant": "1.16.18-beta-7aa6be5a",
30
- "@blocklet/meta": "1.16.18-beta-7aa6be5a",
31
- "@ocap/mcrypto": "1.18.93",
32
- "@ocap/util": "1.18.93",
33
- "@ocap/wallet": "1.18.93",
23
+ "@abtnode/constant": "1.16.18-beta-bb4ebacc",
24
+ "@abtnode/logger": "1.16.18-beta-bb4ebacc",
25
+ "@abtnode/util": "1.16.18-beta-bb4ebacc",
26
+ "@arcblock/did": "1.18.95",
27
+ "@arcblock/nft-display": "2.8.11",
28
+ "@arcblock/vc": "1.18.95",
29
+ "@blocklet/constant": "1.16.18-beta-bb4ebacc",
30
+ "@blocklet/meta": "1.16.18-beta-bb4ebacc",
31
+ "@ocap/mcrypto": "1.18.95",
32
+ "@ocap/util": "1.18.95",
33
+ "@ocap/wallet": "1.18.95",
34
34
  "fs-extra": "^10.1.0",
35
- "joi": "17.7.0",
35
+ "joi": "17.11.0",
36
36
  "jsonwebtoken": "^9.0.0",
37
37
  "lodash": "^4.17.21",
38
38
  "p-retry": "4.6.1",
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "jest": "^27.5.1"
45
45
  },
46
- "gitHead": "b2da6c7e30adf84d7eca941ada27427344c49044"
46
+ "gitHead": "aca7ff8eb508ecf586108b99a9e07ceab2a62430"
47
47
  }