@jskit-ai/users-core 0.1.163 → 0.1.166

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/users-core",
3
- "version": "0.1.163",
3
+ "version": "0.1.166",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -11,15 +11,15 @@
11
11
  "./shared/resources/userSettingsResource": "./src/shared/resources/userSettingsResource.js"
12
12
  },
13
13
  "dependencies": {
14
- "@jskit-ai/auth-core": "0.1.148",
15
- "@jskit-ai/database-runtime": "0.1.150",
16
- "@jskit-ai/http-runtime": "0.1.148",
17
- "@jskit-ai/json-rest-api-core": "0.1.94",
18
- "@jskit-ai/kernel": "0.1.150",
19
- "@jskit-ai/resource-core": "0.1.92",
20
- "@jskit-ai/resource-crud-core": "0.1.92",
21
- "@jskit-ai/storage-runtime": "0.1.147",
22
- "@jskit-ai/uploads-runtime": "0.1.125",
14
+ "@jskit-ai/auth-core": "0.1.151",
15
+ "@jskit-ai/database-runtime": "0.1.153",
16
+ "@jskit-ai/http-runtime": "0.1.151",
17
+ "@jskit-ai/json-rest-api-core": "0.1.97",
18
+ "@jskit-ai/kernel": "0.1.153",
19
+ "@jskit-ai/resource-core": "0.1.95",
20
+ "@jskit-ai/resource-crud-core": "0.1.95",
21
+ "@jskit-ai/storage-runtime": "0.1.150",
22
+ "@jskit-ai/uploads-runtime": "0.1.128",
23
23
  "json-rest-schema": "^1.0.17"
24
24
  },
25
25
  "description": "Users/account runtime plus HTTP routes for account features.",
@@ -156,16 +156,16 @@
156
156
  "mutations": {
157
157
  "dependencies": {
158
158
  "runtime": {
159
- "@jskit-ai/auth-core": "0.1.148",
160
- "@jskit-ai/crud-core": "0.1.161",
161
- "@jskit-ai/database-runtime": "0.1.150",
162
- "@jskit-ai/http-runtime": "0.1.148",
163
- "@jskit-ai/json-rest-api-core": "0.1.94",
164
- "@jskit-ai/kernel": "0.1.150",
165
- "@jskit-ai/resource-core": "0.1.92",
166
- "@jskit-ai/resource-crud-core": "0.1.92",
159
+ "@jskit-ai/auth-core": "0.1.151",
160
+ "@jskit-ai/crud-core": "0.1.164",
161
+ "@jskit-ai/database-runtime": "0.1.153",
162
+ "@jskit-ai/http-runtime": "0.1.151",
163
+ "@jskit-ai/json-rest-api-core": "0.1.97",
164
+ "@jskit-ai/kernel": "0.1.153",
165
+ "@jskit-ai/resource-core": "0.1.95",
166
+ "@jskit-ai/resource-crud-core": "0.1.95",
167
167
  "@local/users": "file:packages/users",
168
- "@jskit-ai/uploads-runtime": "0.1.125"
168
+ "@jskit-ai/uploads-runtime": "0.1.128"
169
169
  },
170
170
  "dev": {}
171
171
  },
@@ -51,16 +51,16 @@ function normalizeAuthMethods(sourceMethods) {
51
51
 
52
52
  function accountSecurityStatusFormatter(securityStatus = {}) {
53
53
  const source = isRecord(securityStatus) ? securityStatus : {};
54
- const authPolicy = isRecord(source.authPolicy) ? source.authPolicy : {};
54
+ const policy = isRecord(source.policy) ? source.policy : {};
55
55
  const { methods: authMethods, enabledMethodsCount } = normalizeAuthMethods(source.authMethods);
56
- const minimumEnabledMethods = Number(authPolicy.minimumEnabledMethods);
56
+ const minimumEnabledMethods = Number(policy.minimumEnabledMethods);
57
57
 
58
58
  return {
59
59
  mfa: normalizeMfa(source),
60
60
  sessions: {
61
61
  canSignOutOtherDevices: true
62
62
  },
63
- authPolicy: {
63
+ policy: {
64
64
  minimumEnabledMethods: minimumEnabledMethods > 0 ? minimumEnabledMethods : 1,
65
65
  enabledMethodsCount
66
66
  },
@@ -111,7 +111,7 @@ function createUsersBootstrapContributor({
111
111
  throw new AppError(503, "Authentication service temporarily unavailable. Please retry.");
112
112
  }
113
113
 
114
- const normalizedUser = authResult?.authenticated === true ? authResult?.profile || null : null;
114
+ const normalizedUser = authResult?.authenticated === true ? authResult?.actor || null : null;
115
115
  const inheritedSurfaceAccess = normalizeObject(existingPayload?.surfaceAccess);
116
116
  let payload = createAnonymousBootstrapPayload({
117
117
  appState,
@@ -64,7 +64,7 @@ const accountSecurityStatusSchema = createSchema({
64
64
  required: true,
65
65
  schema: accountSecuritySessionsSchema
66
66
  },
67
- authPolicy: {
67
+ policy: {
68
68
  type: "object",
69
69
  required: true,
70
70
  schema: accountSecurityAuthPolicySchema
@@ -71,12 +71,12 @@
71
71
  }
72
72
  },
73
73
  "dependencies": {
74
- "@jskit-ai/auth-core": "0.1.146",
75
- "@jskit-ai/crud-core": "0.1.159",
76
- "@jskit-ai/database-runtime": "0.1.148",
77
- "@jskit-ai/http-runtime": "0.1.146",
78
- "@jskit-ai/json-rest-api-core": "0.1.92",
79
- "@jskit-ai/resource-crud-core": "0.1.90",
80
- "@jskit-ai/users-core": "0.1.161"
74
+ "@jskit-ai/auth-core": "0.1.151",
75
+ "@jskit-ai/crud-core": "0.1.164",
76
+ "@jskit-ai/database-runtime": "0.1.153",
77
+ "@jskit-ai/http-runtime": "0.1.151",
78
+ "@jskit-ai/json-rest-api-core": "0.1.97",
79
+ "@jskit-ai/resource-crud-core": "0.1.95",
80
+ "@jskit-ai/users-core": "0.1.166"
81
81
  }
82
82
  }
@@ -71,13 +71,13 @@
71
71
  }
72
72
  },
73
73
  "dependencies": {
74
- "@jskit-ai/auth-core": "0.1.146",
75
- "@jskit-ai/crud-core": "0.1.159",
76
- "@jskit-ai/database-runtime": "0.1.148",
77
- "@jskit-ai/http-runtime": "0.1.146",
78
- "@jskit-ai/json-rest-api-core": "0.1.92",
79
- "@jskit-ai/resource-crud-core": "0.1.90",
80
- "@jskit-ai/users-core": "0.1.161",
81
- "@jskit-ai/workspaces-core": "0.1.126"
74
+ "@jskit-ai/auth-core": "0.1.151",
75
+ "@jskit-ai/crud-core": "0.1.164",
76
+ "@jskit-ai/database-runtime": "0.1.153",
77
+ "@jskit-ai/http-runtime": "0.1.151",
78
+ "@jskit-ai/json-rest-api-core": "0.1.97",
79
+ "@jskit-ai/resource-crud-core": "0.1.95",
80
+ "@jskit-ai/users-core": "0.1.166",
81
+ "@jskit-ai/workspaces-core": "0.1.131"
82
82
  }
83
83
  }
@@ -64,7 +64,11 @@ test("users bootstrap contributor exposes the generic authenticated bootstrap pa
64
64
  async executeAction() {
65
65
  return {
66
66
  authenticated: true,
67
- profile,
67
+ actor: {
68
+ id: profile.id,
69
+ displayName: profile.displayName,
70
+ email: profile.email
71
+ },
68
72
  session: {
69
73
  csrfToken: "csrf-1"
70
74
  }