@zlooks.cn/password-auth-server 1.0.9 → 1.1.1
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/.hile-rsc/{build-mu2ebvjj-b7c71e74/client-browser/chunks/chunk-ZV6MPT36.js → build-mu5lzym8-deb6707f/client-browser/chunks/chunk-5J2CX2FD.js} +3 -1
- package/.hile-rsc/{build-mu2ebvjj-b7c71e74/client-browser/src-plugin-page-frame-07c4de56a6-24L24OGL.js → build-mu5lzym8-deb6707f/client-browser/src-plugin-page-frame-07c4de56a6-BTXX7FS6.js} +1 -1
- package/.hile-rsc/{build-mu2ebvjj-b7c71e74/client-browser/src-plugin-password-form-3bd63d69e5-4TOGMUOJ.js → build-mu5lzym8-deb6707f/client-browser/src-plugin-password-form-3bd63d69e5-RMKPWVFS.js} +93 -87
- package/.hile-rsc/{build-mu2ebvjj-b7c71e74/client-ssr/chunks/chunk-EWBYMJX4.js → build-mu5lzym8-deb6707f/client-ssr/chunks/chunk-VB2NFMGO.js} +3 -1
- package/.hile-rsc/{build-mu2ebvjj-b7c71e74/client-ssr/src-plugin-page-frame-07c4de56a6-LN2W67ZP.js → build-mu5lzym8-deb6707f/client-ssr/src-plugin-page-frame-07c4de56a6-G6MR223B.js} +1 -1
- package/.hile-rsc/{build-mu2ebvjj-b7c71e74/client-ssr/src-plugin-password-form-3bd63d69e5-S65T2FFP.js → build-mu5lzym8-deb6707f/client-ssr/src-plugin-password-form-3bd63d69e5-PDKAVKBR.js} +93 -87
- package/.hile-rsc/{build-mu2ebvjj-b7c71e74 → build-mu5lzym8-deb6707f}/plugin.json +25 -25
- package/.hile-rsc/{build-mu2ebvjj-b7c71e74 → build-mu5lzym8-deb6707f}/server-rsc/index.js +97 -89
- package/dist/password/password-authenticator.d.ts +4 -1
- package/dist/password/password-authenticator.d.ts.map +1 -1
- package/dist/password/password-authenticator.js +62 -9
- package/dist/password/password-authenticator.js.map +1 -1
- package/dist/password/typeorm-credential-repository.d.ts.map +1 -1
- package/dist/password/typeorm-credential-repository.js +11 -46
- package/dist/password/typeorm-credential-repository.js.map +1 -1
- package/dist/persistence/entities.d.ts +1 -12
- package/dist/persistence/entities.d.ts.map +1 -1
- package/dist/persistence/entities.js +0 -16
- package/dist/persistence/entities.js.map +1 -1
- package/dist/services/application.service.d.ts.map +1 -1
- package/dist/services/application.service.js +2 -1
- package/dist/services/application.service.js.map +1 -1
- package/dist/services/password-runtime.service.d.ts.map +1 -1
- package/dist/services/password-runtime.service.js +7 -17
- package/dist/services/password-runtime.service.js.map +1 -1
- package/package.json +8 -6
- package/dist/password/credential-lifecycle-outbox.d.ts +0 -42
- package/dist/password/credential-lifecycle-outbox.d.ts.map +0 -1
- package/dist/password/credential-lifecycle-outbox.js +0 -120
- package/dist/password/credential-lifecycle-outbox.js.map +0 -1
- /package/.hile-rsc/{build-mu2ebvjj-b7c71e74 → build-mu5lzym8-deb6707f}/client-browser/src-plugin-page-frame-07c4de56a6-3F24AYCH.css +0 -0
- /package/.hile-rsc/{build-mu2ebvjj-b7c71e74 → build-mu5lzym8-deb6707f}/client-browser/src-plugin-password-form-3bd63d69e5-TRYMJX4F.css +0 -0
- /package/.hile-rsc/{build-mu2ebvjj-b7c71e74 → build-mu5lzym8-deb6707f}/styles/4b3193c4f2b317ffed425ccf401342a4bdd6ccfd5f9c42def3315e776f166975.css +0 -0
|
@@ -15009,10 +15009,12 @@ config(en_default());
|
|
|
15009
15009
|
|
|
15010
15010
|
// ../browser-api/dist/index.js
|
|
15011
15011
|
var BROWSER_API_CONTROLLER_PREFIX = "/-";
|
|
15012
|
+
var BROWSER_API_REQUEST_STREAM_LIMIT_MIN_BYTES = 64 * 1024;
|
|
15012
15013
|
var namespace = external_exports.string().regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9]*)+$/);
|
|
15014
|
+
var pluginId = external_exports.string().min(1).max(64).regex(/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/);
|
|
15013
15015
|
var absolutePath = external_exports.string().min(1).max(2048).regex(/^\/(?!\/)[^?#\s]*$/);
|
|
15014
15016
|
var instant = external_exports.iso.datetime({ offset: true });
|
|
15015
|
-
var cookieName = external_exports.string().regex(/^[A-Za-z][A-Za-z0-9_
|
|
15017
|
+
var cookieName = external_exports.string().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,127}$/);
|
|
15016
15018
|
var httpMethod = external_exports.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
15017
15019
|
var httpHeaderValue = external_exports.string().max(8192);
|
|
15018
15020
|
var successSchema = external_exports.strictObject({
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
useSyncExternalStore,
|
|
74
74
|
useZlooksApp,
|
|
75
75
|
warning_default
|
|
76
|
-
} from "./chunks/chunk-
|
|
76
|
+
} from "./chunks/chunk-5J2CX2FD.js";
|
|
77
77
|
|
|
78
78
|
// ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EditOutlined.js
|
|
79
79
|
var require_EditOutlined = __commonJS({
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
version,
|
|
121
121
|
warning_default,
|
|
122
122
|
zoomIn
|
|
123
|
-
} from "./chunks/chunk-
|
|
123
|
+
} from "./chunks/chunk-5J2CX2FD.js";
|
|
124
124
|
|
|
125
125
|
// ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/SearchOutlined.js
|
|
126
126
|
var require_SearchOutlined = __commonJS({
|
|
@@ -162,92 +162,6 @@ var require_EyeOutlined = __commonJS({
|
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
-
// ../user-shared/dist/identity.js
|
|
166
|
-
var USER_SERVICE_NAMESPACE = "cn.zlooks.user.server";
|
|
167
|
-
|
|
168
|
-
// ../user-shared/dist/events/snapshots.js
|
|
169
|
-
var userSessionRevocationReasonSchema = external_exports.enum([
|
|
170
|
-
"logout",
|
|
171
|
-
"user-request",
|
|
172
|
-
"family-limit",
|
|
173
|
-
"credential-recovery"
|
|
174
|
-
]);
|
|
175
|
-
var displayNameSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Display name must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 160, "Display name must contain 1 to 160 Unicode code points");
|
|
176
|
-
var bioSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Bio must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 500, "Bio must contain 1 to 500 Unicode code points");
|
|
177
|
-
var httpUrlSchema = external_exports.url().max(2048).refine((value) => {
|
|
178
|
-
const protocol = new URL(value).protocol;
|
|
179
|
-
return protocol === "http:" || protocol === "https:";
|
|
180
|
-
}, "URL must use HTTP or HTTPS").refine((value) => value === new URL(value).toString(), "URL must be canonical");
|
|
181
|
-
var emailSchema = external_exports.email().max(320).refine((value) => value === value.toLocaleLowerCase("en-US"), "Email must be lowercase");
|
|
182
|
-
var userEventSnapshotSchema = external_exports.strictObject({
|
|
183
|
-
id: external_exports.uuid(),
|
|
184
|
-
displayName: displayNameSchema.nullable(),
|
|
185
|
-
avatar: httpUrlSchema.nullable(),
|
|
186
|
-
homepage: httpUrlSchema.nullable(),
|
|
187
|
-
bio: bioSchema.nullable(),
|
|
188
|
-
email: emailSchema.nullable(),
|
|
189
|
-
emailVerified: external_exports.boolean(),
|
|
190
|
-
status: external_exports.enum(["active", "disabled", "deleted"]),
|
|
191
|
-
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
192
|
-
updatedAt: external_exports.iso.datetime({ offset: true }),
|
|
193
|
-
version: external_exports.number().int().positive()
|
|
194
|
-
}).superRefine((user, context) => {
|
|
195
|
-
if (user.emailVerified && user.email === null) {
|
|
196
|
-
context.addIssue({
|
|
197
|
-
code: "custom",
|
|
198
|
-
message: "A verified user snapshot must include its email",
|
|
199
|
-
path: ["email"]
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
if (Date.parse(user.updatedAt) < Date.parse(user.createdAt)) {
|
|
203
|
-
context.addIssue({
|
|
204
|
-
code: "custom",
|
|
205
|
-
message: "User updated time must not precede creation time",
|
|
206
|
-
path: ["updatedAt"]
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}).readonly();
|
|
210
|
-
var userSessionFamilyEventSnapshotSchema = external_exports.strictObject({
|
|
211
|
-
id: external_exports.uuid(),
|
|
212
|
-
userId: external_exports.uuid(),
|
|
213
|
-
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
214
|
-
expiresAt: external_exports.iso.datetime({ offset: true }),
|
|
215
|
-
lastSeenAt: external_exports.iso.datetime({ offset: true }),
|
|
216
|
-
revokedAt: external_exports.iso.datetime({ offset: true }).nullable(),
|
|
217
|
-
revokeReason: userSessionRevocationReasonSchema.nullable()
|
|
218
|
-
}).superRefine((session, context) => {
|
|
219
|
-
const createdAt = Date.parse(session.createdAt);
|
|
220
|
-
if (session.revokedAt === null !== (session.revokeReason === null)) {
|
|
221
|
-
context.addIssue({
|
|
222
|
-
code: "custom",
|
|
223
|
-
message: "Session revocation time and reason must be present together",
|
|
224
|
-
path: ["revokedAt"]
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
if (Date.parse(session.expiresAt) <= createdAt) {
|
|
228
|
-
context.addIssue({
|
|
229
|
-
code: "custom",
|
|
230
|
-
message: "Session expiry must follow creation time",
|
|
231
|
-
path: ["expiresAt"]
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
const lastSeenAt = Date.parse(session.lastSeenAt);
|
|
235
|
-
if (lastSeenAt < createdAt || lastSeenAt > Date.parse(session.expiresAt)) {
|
|
236
|
-
context.addIssue({
|
|
237
|
-
code: "custom",
|
|
238
|
-
message: "Session last-seen time must fall within its lifetime",
|
|
239
|
-
path: ["lastSeenAt"]
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
if (session.revokedAt !== null && Date.parse(session.revokedAt) < createdAt) {
|
|
243
|
-
context.addIssue({
|
|
244
|
-
code: "custom",
|
|
245
|
-
message: "Session revoked time must not precede creation time",
|
|
246
|
-
path: ["revokedAt"]
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}).readonly();
|
|
250
|
-
|
|
251
165
|
// ../event-bus/dist/index.js
|
|
252
166
|
var EVENT_PROTOCOL = "zlooks.event";
|
|
253
167
|
var EVENT_PROTOCOL_VERSION = 1;
|
|
@@ -390,6 +304,92 @@ function isRecord(value) {
|
|
|
390
304
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
391
305
|
}
|
|
392
306
|
|
|
307
|
+
// ../user-shared/dist/identity.js
|
|
308
|
+
var USER_SERVICE_NAMESPACE = "cn.zlooks.user.server";
|
|
309
|
+
|
|
310
|
+
// ../user-shared/dist/events/snapshots.js
|
|
311
|
+
var userSessionRevocationReasonSchema = external_exports.enum([
|
|
312
|
+
"logout",
|
|
313
|
+
"user-request",
|
|
314
|
+
"family-limit",
|
|
315
|
+
"credential-recovery"
|
|
316
|
+
]);
|
|
317
|
+
var displayNameSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Display name must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 160, "Display name must contain 1 to 160 Unicode code points");
|
|
318
|
+
var bioSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Bio must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 500, "Bio must contain 1 to 500 Unicode code points");
|
|
319
|
+
var httpUrlSchema = external_exports.url().max(2048).refine((value) => {
|
|
320
|
+
const protocol = new URL(value).protocol;
|
|
321
|
+
return protocol === "http:" || protocol === "https:";
|
|
322
|
+
}, "URL must use HTTP or HTTPS").refine((value) => value === new URL(value).toString(), "URL must be canonical");
|
|
323
|
+
var emailSchema = external_exports.email().max(320).refine((value) => value === value.toLocaleLowerCase("en-US"), "Email must be lowercase");
|
|
324
|
+
var userEventSnapshotSchema = external_exports.strictObject({
|
|
325
|
+
id: external_exports.uuid(),
|
|
326
|
+
displayName: displayNameSchema.nullable(),
|
|
327
|
+
avatar: httpUrlSchema.nullable(),
|
|
328
|
+
homepage: httpUrlSchema.nullable(),
|
|
329
|
+
bio: bioSchema.nullable(),
|
|
330
|
+
email: emailSchema.nullable(),
|
|
331
|
+
emailVerified: external_exports.boolean(),
|
|
332
|
+
status: external_exports.enum(["active", "disabled", "deleted"]),
|
|
333
|
+
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
334
|
+
updatedAt: external_exports.iso.datetime({ offset: true }),
|
|
335
|
+
version: external_exports.number().int().positive()
|
|
336
|
+
}).superRefine((user, context) => {
|
|
337
|
+
if (user.emailVerified && user.email === null) {
|
|
338
|
+
context.addIssue({
|
|
339
|
+
code: "custom",
|
|
340
|
+
message: "A verified user snapshot must include its email",
|
|
341
|
+
path: ["email"]
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
if (Date.parse(user.updatedAt) < Date.parse(user.createdAt)) {
|
|
345
|
+
context.addIssue({
|
|
346
|
+
code: "custom",
|
|
347
|
+
message: "User updated time must not precede creation time",
|
|
348
|
+
path: ["updatedAt"]
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
}).readonly();
|
|
352
|
+
var userSessionFamilyEventSnapshotSchema = external_exports.strictObject({
|
|
353
|
+
id: external_exports.uuid(),
|
|
354
|
+
userId: external_exports.uuid(),
|
|
355
|
+
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
356
|
+
expiresAt: external_exports.iso.datetime({ offset: true }),
|
|
357
|
+
lastSeenAt: external_exports.iso.datetime({ offset: true }),
|
|
358
|
+
revokedAt: external_exports.iso.datetime({ offset: true }).nullable(),
|
|
359
|
+
revokeReason: userSessionRevocationReasonSchema.nullable()
|
|
360
|
+
}).superRefine((session, context) => {
|
|
361
|
+
const createdAt = Date.parse(session.createdAt);
|
|
362
|
+
if (session.revokedAt === null !== (session.revokeReason === null)) {
|
|
363
|
+
context.addIssue({
|
|
364
|
+
code: "custom",
|
|
365
|
+
message: "Session revocation time and reason must be present together",
|
|
366
|
+
path: ["revokedAt"]
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
if (Date.parse(session.expiresAt) <= createdAt) {
|
|
370
|
+
context.addIssue({
|
|
371
|
+
code: "custom",
|
|
372
|
+
message: "Session expiry must follow creation time",
|
|
373
|
+
path: ["expiresAt"]
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
const lastSeenAt = Date.parse(session.lastSeenAt);
|
|
377
|
+
if (lastSeenAt < createdAt || lastSeenAt > Date.parse(session.expiresAt)) {
|
|
378
|
+
context.addIssue({
|
|
379
|
+
code: "custom",
|
|
380
|
+
message: "Session last-seen time must fall within its lifetime",
|
|
381
|
+
path: ["lastSeenAt"]
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
if (session.revokedAt !== null && Date.parse(session.revokedAt) < createdAt) {
|
|
385
|
+
context.addIssue({
|
|
386
|
+
code: "custom",
|
|
387
|
+
message: "Session revoked time must not precede creation time",
|
|
388
|
+
path: ["revokedAt"]
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
}).readonly();
|
|
392
|
+
|
|
393
393
|
// ../user-shared/dist/events/definition.js
|
|
394
394
|
function defineUserEvent(type, aggregateType2, dataSchema5, aggregateId2) {
|
|
395
395
|
return defineEvent(type, dataSchema5, {
|
|
@@ -521,6 +521,7 @@ var USER_EVENT_CATALOG = defineEventCatalog({
|
|
|
521
521
|
|
|
522
522
|
// ../user-shared/dist/index.js
|
|
523
523
|
var USER_CREDENTIAL_LIFECYCLE_PROTOCOL = "zlooks.user.credential-lifecycle";
|
|
524
|
+
var USER_CREDENTIAL_LIFECYCLE_EVENT_TYPE = "cn.zlooks.password.credential-lifecycle.v1";
|
|
524
525
|
var USER_ACCOUNT_HREF = "/user.account/account";
|
|
525
526
|
var USER_BROWSER_AUTH_METHODS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/methods");
|
|
526
527
|
var USER_BROWSER_AUTH_TRANSACTIONS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/transactions");
|
|
@@ -744,6 +745,11 @@ var userCredentialLifecycleEventSchema = external_exports.strictObject({
|
|
|
744
745
|
email: external_exports.email().max(320),
|
|
745
746
|
occurredAt: external_exports.iso.datetime({ offset: true })
|
|
746
747
|
}).readonly();
|
|
748
|
+
var userCredentialLifecycleDomainEvent = defineEvent(USER_CREDENTIAL_LIFECYCLE_EVENT_TYPE, userCredentialLifecycleEventSchema, {
|
|
749
|
+
producer: "cn.zlooks.password.auth.server",
|
|
750
|
+
aggregateType: "credential",
|
|
751
|
+
aggregateId: ({ subject }) => subject
|
|
752
|
+
});
|
|
747
753
|
var userCredentialLifecycleResponseSchema = external_exports.strictObject({
|
|
748
754
|
acknowledged: external_exports.literal(true)
|
|
749
755
|
}).readonly();
|
|
@@ -35984,10 +35984,12 @@ config(en_default());
|
|
|
35984
35984
|
|
|
35985
35985
|
// ../browser-api/dist/index.js
|
|
35986
35986
|
var BROWSER_API_CONTROLLER_PREFIX = "/-";
|
|
35987
|
+
var BROWSER_API_REQUEST_STREAM_LIMIT_MIN_BYTES = 64 * 1024;
|
|
35987
35988
|
var namespace = external_exports.string().regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9]*)+$/);
|
|
35989
|
+
var pluginId = external_exports.string().min(1).max(64).regex(/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/);
|
|
35988
35990
|
var absolutePath = external_exports.string().min(1).max(2048).regex(/^\/(?!\/)[^?#\s]*$/);
|
|
35989
35991
|
var instant = external_exports.iso.datetime({ offset: true });
|
|
35990
|
-
var cookieName = external_exports.string().regex(/^[A-Za-z][A-Za-z0-9_
|
|
35992
|
+
var cookieName = external_exports.string().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,127}$/);
|
|
35991
35993
|
var httpMethod = external_exports.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
35992
35994
|
var httpHeaderValue = external_exports.string().max(8192);
|
|
35993
35995
|
var successSchema = external_exports.strictObject({
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
useState,
|
|
55
55
|
useSyncExternalStore,
|
|
56
56
|
useZlooksApp
|
|
57
|
-
} from "./chunks/chunk-
|
|
57
|
+
} from "./chunks/chunk-VB2NFMGO.js";
|
|
58
58
|
|
|
59
59
|
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/app/App.js
|
|
60
60
|
init_react();
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
useRequest,
|
|
75
75
|
useRscNavigation,
|
|
76
76
|
useState
|
|
77
|
-
} from "./chunks/chunk-
|
|
77
|
+
} from "./chunks/chunk-VB2NFMGO.js";
|
|
78
78
|
|
|
79
79
|
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/lib/_util/getReactMajorVersionCanDelMe.js
|
|
80
80
|
var require_getReactMajorVersionCanDelMe = __commonJS({
|
|
@@ -119703,92 +119703,6 @@ var require_lib48 = __commonJS({
|
|
|
119703
119703
|
}
|
|
119704
119704
|
});
|
|
119705
119705
|
|
|
119706
|
-
// ../user-shared/dist/identity.js
|
|
119707
|
-
var USER_SERVICE_NAMESPACE = "cn.zlooks.user.server";
|
|
119708
|
-
|
|
119709
|
-
// ../user-shared/dist/events/snapshots.js
|
|
119710
|
-
var userSessionRevocationReasonSchema = external_exports.enum([
|
|
119711
|
-
"logout",
|
|
119712
|
-
"user-request",
|
|
119713
|
-
"family-limit",
|
|
119714
|
-
"credential-recovery"
|
|
119715
|
-
]);
|
|
119716
|
-
var displayNameSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Display name must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 160, "Display name must contain 1 to 160 Unicode code points");
|
|
119717
|
-
var bioSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Bio must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 500, "Bio must contain 1 to 500 Unicode code points");
|
|
119718
|
-
var httpUrlSchema = external_exports.url().max(2048).refine((value) => {
|
|
119719
|
-
const protocol = new URL(value).protocol;
|
|
119720
|
-
return protocol === "http:" || protocol === "https:";
|
|
119721
|
-
}, "URL must use HTTP or HTTPS").refine((value) => value === new URL(value).toString(), "URL must be canonical");
|
|
119722
|
-
var emailSchema = external_exports.email().max(320).refine((value) => value === value.toLocaleLowerCase("en-US"), "Email must be lowercase");
|
|
119723
|
-
var userEventSnapshotSchema = external_exports.strictObject({
|
|
119724
|
-
id: external_exports.uuid(),
|
|
119725
|
-
displayName: displayNameSchema.nullable(),
|
|
119726
|
-
avatar: httpUrlSchema.nullable(),
|
|
119727
|
-
homepage: httpUrlSchema.nullable(),
|
|
119728
|
-
bio: bioSchema.nullable(),
|
|
119729
|
-
email: emailSchema.nullable(),
|
|
119730
|
-
emailVerified: external_exports.boolean(),
|
|
119731
|
-
status: external_exports.enum(["active", "disabled", "deleted"]),
|
|
119732
|
-
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
119733
|
-
updatedAt: external_exports.iso.datetime({ offset: true }),
|
|
119734
|
-
version: external_exports.number().int().positive()
|
|
119735
|
-
}).superRefine((user, context) => {
|
|
119736
|
-
if (user.emailVerified && user.email === null) {
|
|
119737
|
-
context.addIssue({
|
|
119738
|
-
code: "custom",
|
|
119739
|
-
message: "A verified user snapshot must include its email",
|
|
119740
|
-
path: ["email"]
|
|
119741
|
-
});
|
|
119742
|
-
}
|
|
119743
|
-
if (Date.parse(user.updatedAt) < Date.parse(user.createdAt)) {
|
|
119744
|
-
context.addIssue({
|
|
119745
|
-
code: "custom",
|
|
119746
|
-
message: "User updated time must not precede creation time",
|
|
119747
|
-
path: ["updatedAt"]
|
|
119748
|
-
});
|
|
119749
|
-
}
|
|
119750
|
-
}).readonly();
|
|
119751
|
-
var userSessionFamilyEventSnapshotSchema = external_exports.strictObject({
|
|
119752
|
-
id: external_exports.uuid(),
|
|
119753
|
-
userId: external_exports.uuid(),
|
|
119754
|
-
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
119755
|
-
expiresAt: external_exports.iso.datetime({ offset: true }),
|
|
119756
|
-
lastSeenAt: external_exports.iso.datetime({ offset: true }),
|
|
119757
|
-
revokedAt: external_exports.iso.datetime({ offset: true }).nullable(),
|
|
119758
|
-
revokeReason: userSessionRevocationReasonSchema.nullable()
|
|
119759
|
-
}).superRefine((session, context) => {
|
|
119760
|
-
const createdAt = Date.parse(session.createdAt);
|
|
119761
|
-
if (session.revokedAt === null !== (session.revokeReason === null)) {
|
|
119762
|
-
context.addIssue({
|
|
119763
|
-
code: "custom",
|
|
119764
|
-
message: "Session revocation time and reason must be present together",
|
|
119765
|
-
path: ["revokedAt"]
|
|
119766
|
-
});
|
|
119767
|
-
}
|
|
119768
|
-
if (Date.parse(session.expiresAt) <= createdAt) {
|
|
119769
|
-
context.addIssue({
|
|
119770
|
-
code: "custom",
|
|
119771
|
-
message: "Session expiry must follow creation time",
|
|
119772
|
-
path: ["expiresAt"]
|
|
119773
|
-
});
|
|
119774
|
-
}
|
|
119775
|
-
const lastSeenAt = Date.parse(session.lastSeenAt);
|
|
119776
|
-
if (lastSeenAt < createdAt || lastSeenAt > Date.parse(session.expiresAt)) {
|
|
119777
|
-
context.addIssue({
|
|
119778
|
-
code: "custom",
|
|
119779
|
-
message: "Session last-seen time must fall within its lifetime",
|
|
119780
|
-
path: ["lastSeenAt"]
|
|
119781
|
-
});
|
|
119782
|
-
}
|
|
119783
|
-
if (session.revokedAt !== null && Date.parse(session.revokedAt) < createdAt) {
|
|
119784
|
-
context.addIssue({
|
|
119785
|
-
code: "custom",
|
|
119786
|
-
message: "Session revoked time must not precede creation time",
|
|
119787
|
-
path: ["revokedAt"]
|
|
119788
|
-
});
|
|
119789
|
-
}
|
|
119790
|
-
}).readonly();
|
|
119791
|
-
|
|
119792
119706
|
// ../event-bus/dist/index.js
|
|
119793
119707
|
var EVENT_PROTOCOL = "zlooks.event";
|
|
119794
119708
|
var EVENT_PROTOCOL_VERSION = 1;
|
|
@@ -119931,6 +119845,92 @@ function isRecord(value) {
|
|
|
119931
119845
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
119932
119846
|
}
|
|
119933
119847
|
|
|
119848
|
+
// ../user-shared/dist/identity.js
|
|
119849
|
+
var USER_SERVICE_NAMESPACE = "cn.zlooks.user.server";
|
|
119850
|
+
|
|
119851
|
+
// ../user-shared/dist/events/snapshots.js
|
|
119852
|
+
var userSessionRevocationReasonSchema = external_exports.enum([
|
|
119853
|
+
"logout",
|
|
119854
|
+
"user-request",
|
|
119855
|
+
"family-limit",
|
|
119856
|
+
"credential-recovery"
|
|
119857
|
+
]);
|
|
119858
|
+
var displayNameSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Display name must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 160, "Display name must contain 1 to 160 Unicode code points");
|
|
119859
|
+
var bioSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Bio must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 500, "Bio must contain 1 to 500 Unicode code points");
|
|
119860
|
+
var httpUrlSchema = external_exports.url().max(2048).refine((value) => {
|
|
119861
|
+
const protocol = new URL(value).protocol;
|
|
119862
|
+
return protocol === "http:" || protocol === "https:";
|
|
119863
|
+
}, "URL must use HTTP or HTTPS").refine((value) => value === new URL(value).toString(), "URL must be canonical");
|
|
119864
|
+
var emailSchema = external_exports.email().max(320).refine((value) => value === value.toLocaleLowerCase("en-US"), "Email must be lowercase");
|
|
119865
|
+
var userEventSnapshotSchema = external_exports.strictObject({
|
|
119866
|
+
id: external_exports.uuid(),
|
|
119867
|
+
displayName: displayNameSchema.nullable(),
|
|
119868
|
+
avatar: httpUrlSchema.nullable(),
|
|
119869
|
+
homepage: httpUrlSchema.nullable(),
|
|
119870
|
+
bio: bioSchema.nullable(),
|
|
119871
|
+
email: emailSchema.nullable(),
|
|
119872
|
+
emailVerified: external_exports.boolean(),
|
|
119873
|
+
status: external_exports.enum(["active", "disabled", "deleted"]),
|
|
119874
|
+
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
119875
|
+
updatedAt: external_exports.iso.datetime({ offset: true }),
|
|
119876
|
+
version: external_exports.number().int().positive()
|
|
119877
|
+
}).superRefine((user, context) => {
|
|
119878
|
+
if (user.emailVerified && user.email === null) {
|
|
119879
|
+
context.addIssue({
|
|
119880
|
+
code: "custom",
|
|
119881
|
+
message: "A verified user snapshot must include its email",
|
|
119882
|
+
path: ["email"]
|
|
119883
|
+
});
|
|
119884
|
+
}
|
|
119885
|
+
if (Date.parse(user.updatedAt) < Date.parse(user.createdAt)) {
|
|
119886
|
+
context.addIssue({
|
|
119887
|
+
code: "custom",
|
|
119888
|
+
message: "User updated time must not precede creation time",
|
|
119889
|
+
path: ["updatedAt"]
|
|
119890
|
+
});
|
|
119891
|
+
}
|
|
119892
|
+
}).readonly();
|
|
119893
|
+
var userSessionFamilyEventSnapshotSchema = external_exports.strictObject({
|
|
119894
|
+
id: external_exports.uuid(),
|
|
119895
|
+
userId: external_exports.uuid(),
|
|
119896
|
+
createdAt: external_exports.iso.datetime({ offset: true }),
|
|
119897
|
+
expiresAt: external_exports.iso.datetime({ offset: true }),
|
|
119898
|
+
lastSeenAt: external_exports.iso.datetime({ offset: true }),
|
|
119899
|
+
revokedAt: external_exports.iso.datetime({ offset: true }).nullable(),
|
|
119900
|
+
revokeReason: userSessionRevocationReasonSchema.nullable()
|
|
119901
|
+
}).superRefine((session, context) => {
|
|
119902
|
+
const createdAt = Date.parse(session.createdAt);
|
|
119903
|
+
if (session.revokedAt === null !== (session.revokeReason === null)) {
|
|
119904
|
+
context.addIssue({
|
|
119905
|
+
code: "custom",
|
|
119906
|
+
message: "Session revocation time and reason must be present together",
|
|
119907
|
+
path: ["revokedAt"]
|
|
119908
|
+
});
|
|
119909
|
+
}
|
|
119910
|
+
if (Date.parse(session.expiresAt) <= createdAt) {
|
|
119911
|
+
context.addIssue({
|
|
119912
|
+
code: "custom",
|
|
119913
|
+
message: "Session expiry must follow creation time",
|
|
119914
|
+
path: ["expiresAt"]
|
|
119915
|
+
});
|
|
119916
|
+
}
|
|
119917
|
+
const lastSeenAt = Date.parse(session.lastSeenAt);
|
|
119918
|
+
if (lastSeenAt < createdAt || lastSeenAt > Date.parse(session.expiresAt)) {
|
|
119919
|
+
context.addIssue({
|
|
119920
|
+
code: "custom",
|
|
119921
|
+
message: "Session last-seen time must fall within its lifetime",
|
|
119922
|
+
path: ["lastSeenAt"]
|
|
119923
|
+
});
|
|
119924
|
+
}
|
|
119925
|
+
if (session.revokedAt !== null && Date.parse(session.revokedAt) < createdAt) {
|
|
119926
|
+
context.addIssue({
|
|
119927
|
+
code: "custom",
|
|
119928
|
+
message: "Session revoked time must not precede creation time",
|
|
119929
|
+
path: ["revokedAt"]
|
|
119930
|
+
});
|
|
119931
|
+
}
|
|
119932
|
+
}).readonly();
|
|
119933
|
+
|
|
119934
119934
|
// ../user-shared/dist/events/definition.js
|
|
119935
119935
|
function defineUserEvent(type, aggregateType2, dataSchema5, aggregateId2) {
|
|
119936
119936
|
return defineEvent(type, dataSchema5, {
|
|
@@ -120062,6 +120062,7 @@ var USER_EVENT_CATALOG = defineEventCatalog({
|
|
|
120062
120062
|
|
|
120063
120063
|
// ../user-shared/dist/index.js
|
|
120064
120064
|
var USER_CREDENTIAL_LIFECYCLE_PROTOCOL = "zlooks.user.credential-lifecycle";
|
|
120065
|
+
var USER_CREDENTIAL_LIFECYCLE_EVENT_TYPE = "cn.zlooks.password.credential-lifecycle.v1";
|
|
120065
120066
|
var USER_ACCOUNT_HREF = "/user.account/account";
|
|
120066
120067
|
var USER_BROWSER_AUTH_METHODS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/methods");
|
|
120067
120068
|
var USER_BROWSER_AUTH_TRANSACTIONS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/transactions");
|
|
@@ -120285,6 +120286,11 @@ var userCredentialLifecycleEventSchema = external_exports.strictObject({
|
|
|
120285
120286
|
email: external_exports.email().max(320),
|
|
120286
120287
|
occurredAt: external_exports.iso.datetime({ offset: true })
|
|
120287
120288
|
}).readonly();
|
|
120289
|
+
var userCredentialLifecycleDomainEvent = defineEvent(USER_CREDENTIAL_LIFECYCLE_EVENT_TYPE, userCredentialLifecycleEventSchema, {
|
|
120290
|
+
producer: "cn.zlooks.password.auth.server",
|
|
120291
|
+
aggregateType: "credential",
|
|
120292
|
+
aggregateId: ({ subject }) => subject
|
|
120293
|
+
});
|
|
120288
120294
|
var userCredentialLifecycleResponseSchema = external_exports.strictObject({
|
|
120289
120295
|
acknowledged: external_exports.literal(true)
|
|
120290
120296
|
}).readonly();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocolVersion": 1,
|
|
3
3
|
"pluginId": "auth.password",
|
|
4
|
-
"buildId": "build-
|
|
4
|
+
"buildId": "build-mu5lzym8-deb6707f",
|
|
5
5
|
"runtime": {
|
|
6
6
|
"react": "19.2.8",
|
|
7
7
|
"reactDom": "19.2.8",
|
|
@@ -9,32 +9,32 @@
|
|
|
9
9
|
},
|
|
10
10
|
"server": {
|
|
11
11
|
"entry": "server-rsc/index.js",
|
|
12
|
-
"integrity": "sha256-
|
|
13
|
-
"size":
|
|
12
|
+
"integrity": "sha256-EY7kvxOF2EUeSa/i6vN2Dd3JWxJWR3emCfKMbigbbwU=",
|
|
13
|
+
"size": 595410
|
|
14
14
|
},
|
|
15
15
|
"serverFunctions": [],
|
|
16
16
|
"clients": [
|
|
17
17
|
{
|
|
18
18
|
"id": "auth.password/src/plugin/page-frame#default",
|
|
19
|
-
"module": "client-browser/src-plugin-page-frame-07c4de56a6-
|
|
20
|
-
"ssrModule": "client-ssr/src-plugin-page-frame-07c4de56a6-
|
|
19
|
+
"module": "client-browser/src-plugin-page-frame-07c4de56a6-BTXX7FS6.js",
|
|
20
|
+
"ssrModule": "client-ssr/src-plugin-page-frame-07c4de56a6-G6MR223B.js",
|
|
21
21
|
"exportName": "default",
|
|
22
22
|
"chunks": [
|
|
23
23
|
{
|
|
24
|
-
"path": "client-browser/chunks/chunk-
|
|
25
|
-
"integrity": "sha256-
|
|
26
|
-
"size":
|
|
24
|
+
"path": "client-browser/chunks/chunk-5J2CX2FD.js",
|
|
25
|
+
"integrity": "sha256-tlfr00/QCIgZXO90u9hl4BmnSRClkr1O0S8hXbc4gtg=",
|
|
26
|
+
"size": 1454698
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"ssrChunks": [
|
|
30
30
|
{
|
|
31
|
-
"path": "client-ssr/chunks/chunk-
|
|
32
|
-
"integrity": "sha256-
|
|
33
|
-
"size":
|
|
31
|
+
"path": "client-ssr/chunks/chunk-VB2NFMGO.js",
|
|
32
|
+
"integrity": "sha256-YzW4YLXT3X/XO9n6W/57bSbUNeXH114FO0nkwf1Ryvc=",
|
|
33
|
+
"size": 1382540
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
"integrity": "sha256-
|
|
37
|
-
"ssrIntegrity": "sha256-
|
|
36
|
+
"integrity": "sha256-jSw6CJTnOOIADmC9iHwQ+r0NzP4Xb2KtIyNwbjZCmEw=",
|
|
37
|
+
"ssrIntegrity": "sha256-Ynj2G8zJEolrrnOTAeR3kWJZTDdfKn4CiWZSj4RPK9w=",
|
|
38
38
|
"size": 81661,
|
|
39
39
|
"ssrSize": 525253,
|
|
40
40
|
"styles": [
|
|
@@ -43,27 +43,27 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"id": "auth.password/src/plugin/password-form#default",
|
|
46
|
-
"module": "client-browser/src-plugin-password-form-3bd63d69e5-
|
|
47
|
-
"ssrModule": "client-ssr/src-plugin-password-form-3bd63d69e5-
|
|
46
|
+
"module": "client-browser/src-plugin-password-form-3bd63d69e5-RMKPWVFS.js",
|
|
47
|
+
"ssrModule": "client-ssr/src-plugin-password-form-3bd63d69e5-PDKAVKBR.js",
|
|
48
48
|
"exportName": "default",
|
|
49
49
|
"chunks": [
|
|
50
50
|
{
|
|
51
|
-
"path": "client-browser/chunks/chunk-
|
|
52
|
-
"integrity": "sha256-
|
|
53
|
-
"size":
|
|
51
|
+
"path": "client-browser/chunks/chunk-5J2CX2FD.js",
|
|
52
|
+
"integrity": "sha256-tlfr00/QCIgZXO90u9hl4BmnSRClkr1O0S8hXbc4gtg=",
|
|
53
|
+
"size": 1454698
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
"ssrChunks": [
|
|
57
57
|
{
|
|
58
|
-
"path": "client-ssr/chunks/chunk-
|
|
59
|
-
"integrity": "sha256-
|
|
60
|
-
"size":
|
|
58
|
+
"path": "client-ssr/chunks/chunk-VB2NFMGO.js",
|
|
59
|
+
"integrity": "sha256-YzW4YLXT3X/XO9n6W/57bSbUNeXH114FO0nkwf1Ryvc=",
|
|
60
|
+
"size": 1382540
|
|
61
61
|
}
|
|
62
62
|
],
|
|
63
|
-
"integrity": "sha256-
|
|
64
|
-
"ssrIntegrity": "sha256-
|
|
65
|
-
"size":
|
|
66
|
-
"ssrSize":
|
|
63
|
+
"integrity": "sha256-QRXECG5iFUWRUUpi0/lILIyGDWDfNiW7Y8X9QTTlUNk=",
|
|
64
|
+
"ssrIntegrity": "sha256-RX8I93F+Gn02PmEvfAIBaxHs3/xqRsKmjlBtX2Ta4sE=",
|
|
65
|
+
"size": 173584,
|
|
66
|
+
"ssrSize": 4801433,
|
|
67
67
|
"styles": [
|
|
68
68
|
"client-browser/src-plugin-password-form-3bd63d69e5-TRYMJX4F.css"
|
|
69
69
|
]
|