@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 +19 -19
- package/src/server/common/formatters/accountSecurityStatusFormatter.js +3 -3
- package/src/server/usersBootstrapContributor.js +1 -1
- package/src/shared/resources/accountSettingsSchemas.js +1 -1
- package/templates/packages/users/package.json +7 -7
- package/templates/packages/users-workspace/package.json +8 -8
- package/test/usersBootstrapContributor.test.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/users-core",
|
|
3
|
-
"version": "0.1.
|
|
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.
|
|
15
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
16
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
17
|
-
"@jskit-ai/json-rest-api-core": "0.1.
|
|
18
|
-
"@jskit-ai/kernel": "0.1.
|
|
19
|
-
"@jskit-ai/resource-core": "0.1.
|
|
20
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
21
|
-
"@jskit-ai/storage-runtime": "0.1.
|
|
22
|
-
"@jskit-ai/uploads-runtime": "0.1.
|
|
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.
|
|
160
|
-
"@jskit-ai/crud-core": "0.1.
|
|
161
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
162
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
163
|
-
"@jskit-ai/json-rest-api-core": "0.1.
|
|
164
|
-
"@jskit-ai/kernel": "0.1.
|
|
165
|
-
"@jskit-ai/resource-core": "0.1.
|
|
166
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
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.
|
|
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
|
|
54
|
+
const policy = isRecord(source.policy) ? source.policy : {};
|
|
55
55
|
const { methods: authMethods, enabledMethodsCount } = normalizeAuthMethods(source.authMethods);
|
|
56
|
-
const minimumEnabledMethods = Number(
|
|
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
|
-
|
|
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?.
|
|
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,
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@jskit-ai/auth-core": "0.1.
|
|
75
|
-
"@jskit-ai/crud-core": "0.1.
|
|
76
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
77
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
78
|
-
"@jskit-ai/json-rest-api-core": "0.1.
|
|
79
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
80
|
-
"@jskit-ai/users-core": "0.1.
|
|
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.
|
|
75
|
-
"@jskit-ai/crud-core": "0.1.
|
|
76
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
77
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
78
|
-
"@jskit-ai/json-rest-api-core": "0.1.
|
|
79
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
80
|
-
"@jskit-ai/users-core": "0.1.
|
|
81
|
-
"@jskit-ai/workspaces-core": "0.1.
|
|
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
|
-
|
|
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
|
}
|