@logto/schemas 1.42.0 → 1.44.0
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/alterations/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.ts +33 -0
- package/alterations/1.43.0-1785481546-add-tenant-aware-scope-indexes.ts +33 -0
- package/alterations/1.43.0-1785488115-add-cimd-permission-ceiling-tables.ts +77 -0
- package/alterations/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.ts +27 -0
- package/alterations/1.43.0-1785835991-add-cimd-client-identifier-columns.ts +31 -0
- package/alterations/1.43.0-1786325989-add-cimd-grant-organizations-table.ts +54 -0
- package/alterations/1.43.0-1786333495-add-trusted-devices.ts +57 -0
- package/alterations/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.ts +28 -0
- package/alterations/1.43.0-1786414712-add-service-logs-email-indexes.ts +34 -0
- package/alterations/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.ts +43 -0
- package/alterations/1.44.0-1788946735-add-saml-authn-request-config.ts +18 -0
- package/alterations/1.44.0-1789000000-extend-user-id-length.ts +61 -0
- package/alterations-js/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.js +28 -0
- package/alterations-js/1.43.0-1785481546-add-tenant-aware-scope-indexes.js +28 -0
- package/alterations-js/1.43.0-1785488115-add-cimd-permission-ceiling-tables.js +69 -0
- package/alterations-js/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.js +23 -0
- package/alterations-js/1.43.0-1785835991-add-cimd-client-identifier-columns.js +27 -0
- package/alterations-js/1.43.0-1786325989-add-cimd-grant-organizations-table.js +49 -0
- package/alterations-js/1.43.0-1786333495-add-trusted-devices.js +50 -0
- package/alterations-js/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.js +24 -0
- package/alterations-js/1.43.0-1786414712-add-service-logs-email-indexes.js +30 -0
- package/alterations-js/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.js +38 -0
- package/alterations-js/1.44.0-1788946735-add-saml-authn-request-config.js +14 -0
- package/alterations-js/1.44.0-1789000000-extend-user-id-length.js +47 -0
- package/lib/consts/experience.d.ts +3 -0
- package/lib/consts/experience.js +3 -0
- package/lib/consts/index.d.ts +2 -0
- package/lib/consts/index.js +2 -0
- package/lib/consts/license.d.ts +222 -0
- package/lib/consts/license.js +81 -0
- package/lib/consts/license.test.d.ts +1 -0
- package/lib/consts/license.test.js +96 -0
- package/lib/consts/oidc.d.ts +15 -1
- package/lib/consts/oidc.js +11 -0
- package/lib/consts/oidc.test.d.ts +1 -0
- package/lib/consts/oidc.test.js +15 -0
- package/lib/consts/product-event.d.ts +5 -1
- package/lib/consts/product-event.js +4 -0
- package/lib/consts/social-state.d.ts +12 -0
- package/lib/consts/social-state.js +12 -0
- package/lib/consts/subscriptions.d.ts +13 -1
- package/lib/consts/subscriptions.js +12 -0
- package/lib/db-entries/aggregated-daily-active-user.js +2 -2
- package/lib/db-entries/application-access-control-user-relation.js +2 -2
- package/lib/db-entries/application-user-consent-organization.js +2 -2
- package/lib/db-entries/cimd-grant-client-snapshot.d.ts +32 -0
- package/lib/db-entries/cimd-grant-client-snapshot.js +45 -0
- package/lib/db-entries/cimd-grant-organization.d.ts +30 -0
- package/lib/db-entries/cimd-grant-organization.js +37 -0
- package/lib/db-entries/cimd-organization-resource-scope.d.ts +20 -0
- package/lib/db-entries/cimd-organization-resource-scope.js +25 -0
- package/lib/db-entries/cimd-organization-scope.d.ts +20 -0
- package/lib/db-entries/cimd-organization-scope.js +25 -0
- package/lib/db-entries/cimd-resource-scope.d.ts +20 -0
- package/lib/db-entries/cimd-resource-scope.js +25 -0
- package/lib/db-entries/cimd-user-scope.d.ts +20 -0
- package/lib/db-entries/cimd-user-scope.js +25 -0
- package/lib/db-entries/daily-active-user.js +2 -2
- package/lib/db-entries/index.d.ts +7 -0
- package/lib/db-entries/index.js +7 -0
- package/lib/db-entries/oidc-session-extension.d.ts +3 -1
- package/lib/db-entries/oidc-session-extension.js +6 -2
- package/lib/db-entries/organization-invitation.js +4 -4
- package/lib/db-entries/organization-role-user-relation.js +2 -2
- package/lib/db-entries/organization-user-relation.js +2 -2
- package/lib/db-entries/organization.d.ts +5 -1
- package/lib/db-entries/organization.js +4 -0
- package/lib/db-entries/personal-access-token.js +2 -2
- package/lib/db-entries/saml-application-config.d.ts +4 -2
- package/lib/db-entries/saml-application-config.js +5 -1
- package/lib/db-entries/secret.js +2 -2
- package/lib/db-entries/sign-in-experience.d.ts +4 -2
- package/lib/db-entries/sign-in-experience.js +5 -1
- package/lib/db-entries/subject-token.js +2 -2
- package/lib/db-entries/trusted-device.d.ts +36 -0
- package/lib/db-entries/trusted-device.js +62 -0
- package/lib/db-entries/user-geo-location.js +2 -2
- package/lib/db-entries/user-sign-in-country.js +2 -2
- package/lib/db-entries/user-sso-identity.js +2 -2
- package/lib/db-entries/user.d.ts +3 -1
- package/lib/db-entries/user.js +6 -2
- package/lib/db-entries/users-role.js +2 -2
- package/lib/db-entries/verification-record.js +2 -2
- package/lib/db-entries/verification-status.js +2 -2
- package/lib/foundations/jsonb-types/account-centers.d.ts +3 -0
- package/lib/foundations/jsonb-types/account-centers.js +1 -0
- package/lib/foundations/jsonb-types/account-centers.test.d.ts +1 -0
- package/lib/foundations/jsonb-types/account-centers.test.js +13 -0
- package/lib/foundations/jsonb-types/captcha.d.ts +47 -1
- package/lib/foundations/jsonb-types/captcha.js +20 -0
- package/lib/foundations/jsonb-types/hooks.d.ts +5 -4
- package/lib/foundations/jsonb-types/hooks.js +3 -0
- package/lib/foundations/jsonb-types/logs.d.ts +18 -0
- package/lib/foundations/jsonb-types/logs.js +6 -0
- package/lib/foundations/jsonb-types/saml-application-configs.d.ts +23 -0
- package/lib/foundations/jsonb-types/saml-application-configs.js +16 -0
- package/lib/foundations/jsonb-types/saml-application-configs.test.js +24 -1
- package/lib/foundations/jsonb-types/sign-in-experience.d.ts +23 -3
- package/lib/foundations/jsonb-types/sign-in-experience.js +9 -0
- package/lib/foundations/jsonb-types/sign-in-experience.test.js +17 -1
- package/lib/types/authentication-context.d.ts +224 -0
- package/lib/types/authentication-context.js +238 -0
- package/lib/types/authentication-context.test.d.ts +1 -0
- package/lib/types/authentication-context.test.js +186 -0
- package/lib/types/connector.d.ts +8 -0
- package/lib/types/consent.d.ts +16 -190
- package/lib/types/consent.js +10 -1
- package/lib/types/cookie.d.ts +4 -0
- package/lib/types/cookie.js +6 -1
- package/lib/types/custom-profile-fields.d.ts +1 -0
- package/lib/types/hook.d.ts +31 -6
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +2 -0
- package/lib/types/interactions.d.ts +161 -0
- package/lib/types/interactions.js +23 -0
- package/lib/types/log/index.d.ts +5 -2
- package/lib/types/log/index.js +1 -0
- package/lib/types/log/interaction.d.ts +15 -2
- package/lib/types/log/interaction.js +5 -0
- package/lib/types/log/trusted-device.d.ts +7 -0
- package/lib/types/log/trusted-device.js +6 -0
- package/lib/types/logto-config/action.d.ts +1 -1
- package/lib/types/logto-config/action.js +1 -1
- package/lib/types/logto-config/index.d.ts +83 -7
- package/lib/types/logto-config/index.js +14 -0
- package/lib/types/logto-config/index.test.js +23 -0
- package/lib/types/logto-config/jwt-customizer.d.ts +123 -10
- package/lib/types/logto-config/jwt-customizer.js +1 -1
- package/lib/types/logto-config/oidc-provider.d.ts +2 -2
- package/lib/types/saml-application.d.ts +55 -1
- package/lib/types/saml-application.js +7 -1
- package/lib/types/service-log.d.ts +14 -1
- package/lib/types/service-log.js +13 -0
- package/lib/types/sign-in-experience.d.ts +20 -6
- package/lib/types/sign-in-experience.js +1 -0
- package/lib/types/ssr.d.ts +2 -0
- package/lib/types/system.d.ts +59 -7
- package/lib/types/system.js +36 -0
- package/lib/types/system.test.d.ts +1 -0
- package/lib/types/system.test.js +26 -0
- package/lib/types/trusted-device.d.ts +67 -0
- package/lib/types/trusted-device.js +16 -0
- package/lib/types/user-sessions.d.ts +195 -209
- package/lib/types/user-sessions.js +9 -4
- package/lib/types/user.d.ts +10 -3
- package/lib/types/user.js +1 -0
- package/lib/types/verification-records/code-verification.d.ts +17 -0
- package/lib/types/verification-records/code-verification.js +1 -0
- package/lib/utils/cimd.d.ts +14 -0
- package/lib/utils/cimd.js +14 -0
- package/lib/utils/cimd.test.d.ts +1 -0
- package/lib/utils/cimd.test.js +9 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/oidc-private-key.test.js +44 -0
- package/package.json +9 -9
- package/tables/aggregated_daily_active_users.sql +1 -1
- package/tables/application_access_control_user_relations.sql +1 -1
- package/tables/application_user_consent_organizations.sql +1 -1
- package/tables/cimd_grant_client_snapshots.sql +27 -0
- package/tables/cimd_grant_organizations.sql +38 -0
- package/tables/cimd_organization_resource_scopes.sql +16 -0
- package/tables/cimd_organization_scopes.sql +15 -0
- package/tables/cimd_resource_scopes.sql +15 -0
- package/tables/cimd_user_scopes.sql +13 -0
- package/tables/daily_active_users.sql +1 -1
- package/tables/oidc_model_instances.sql +5 -0
- package/tables/oidc_session_extensions.sql +6 -1
- package/tables/organization_invitations.sql +2 -2
- package/tables/organization_role_user_relations.sql +1 -1
- package/tables/organization_scopes.sql +4 -0
- package/tables/organization_user_relations.sql +1 -1
- package/tables/organizations.sql +2 -0
- package/tables/personal_access_tokens.sql +1 -1
- package/tables/saml_application_configs.sql +1 -0
- package/tables/scopes.sql +4 -0
- package/tables/secrets.sql +1 -1
- package/tables/service_logs.sql +14 -0
- package/tables/sign_in_experiences.sql +1 -0
- package/tables/subject_tokens.sql +1 -1
- package/tables/trusted_devices.sql +25 -0
- package/tables/user_geo_locations.sql +1 -1
- package/tables/user_sign_in_countries.sql +1 -1
- package/tables/user_sso_identities.sql +1 -1
- package/tables/users.sql +2 -1
- package/tables/users_roles.sql +1 -1
- package/tables/verification_records.sql +1 -1
- package/tables/verification_statuses.sql +1 -1
- package/LICENSE +0 -373
|
@@ -127,8 +127,8 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
127
127
|
kind?: "AccessToken" | undefined;
|
|
128
128
|
accountId?: string | undefined;
|
|
129
129
|
scope?: string | undefined;
|
|
130
|
-
sessionUid?: string | undefined;
|
|
131
130
|
clientId?: string | undefined;
|
|
131
|
+
sessionUid?: string | undefined;
|
|
132
132
|
expiresWithSession?: boolean | undefined;
|
|
133
133
|
gty?: string | undefined;
|
|
134
134
|
aud?: string | string[] | undefined;
|
|
@@ -139,8 +139,8 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
139
139
|
kind?: "AccessToken" | undefined;
|
|
140
140
|
accountId?: string | undefined;
|
|
141
141
|
scope?: string | undefined;
|
|
142
|
-
sessionUid?: string | undefined;
|
|
143
142
|
clientId?: string | undefined;
|
|
143
|
+
sessionUid?: string | undefined;
|
|
144
144
|
expiresWithSession?: boolean | undefined;
|
|
145
145
|
gty?: string | undefined;
|
|
146
146
|
aud?: string | string[] | undefined;
|
|
@@ -150,6 +150,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
150
150
|
name: z.ZodOptional<ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
151
151
|
id: z.ZodOptional<ZodType<string, z.ZodTypeDef, string>>;
|
|
152
152
|
applicationId: z.ZodOptional<ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
153
|
+
cimdClientId: z.ZodOptional<ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
153
154
|
username: z.ZodOptional<ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
154
155
|
createdAt: z.ZodOptional<ZodType<number, z.ZodTypeDef, number>>;
|
|
155
156
|
profile: z.ZodOptional<ZodType<Partial<{
|
|
@@ -288,6 +289,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
288
289
|
description: ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
289
290
|
customData: ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
|
|
290
291
|
isMfaRequired: ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
292
|
+
isTrustedDeviceAllowed: ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
291
293
|
color: ZodType<Partial<{
|
|
292
294
|
primaryColor: string;
|
|
293
295
|
isDarkModeEnabled: boolean;
|
|
@@ -336,6 +338,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
336
338
|
name?: string | null | undefined;
|
|
337
339
|
id?: string | undefined;
|
|
338
340
|
applicationId?: string | null | undefined;
|
|
341
|
+
cimdClientId?: string | null | undefined;
|
|
339
342
|
username?: string | null | undefined;
|
|
340
343
|
createdAt?: number | undefined;
|
|
341
344
|
profile?: Partial<{
|
|
@@ -403,6 +406,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
403
406
|
name?: string | null | undefined;
|
|
404
407
|
id?: string | undefined;
|
|
405
408
|
applicationId?: string | null | undefined;
|
|
409
|
+
cimdClientId?: string | null | undefined;
|
|
406
410
|
username?: string | null | undefined;
|
|
407
411
|
createdAt?: number | undefined;
|
|
408
412
|
profile?: Partial<{
|
|
@@ -514,6 +518,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
514
518
|
id: z.ZodString;
|
|
515
519
|
templateType: z.ZodNativeEnum<typeof import("@logto/connector-kit").TemplateType>;
|
|
516
520
|
verified: z.ZodBoolean;
|
|
521
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
517
522
|
} & {
|
|
518
523
|
type: z.ZodLiteral<import("../index.js").VerificationType.EmailVerificationCode>;
|
|
519
524
|
identifier: z.ZodObject<{
|
|
@@ -535,6 +540,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
535
540
|
};
|
|
536
541
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
537
542
|
verified: boolean;
|
|
543
|
+
userId?: string | undefined;
|
|
538
544
|
}, {
|
|
539
545
|
type: import("../index.js").VerificationType.EmailVerificationCode;
|
|
540
546
|
id: string;
|
|
@@ -544,10 +550,12 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
544
550
|
};
|
|
545
551
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
546
552
|
verified: boolean;
|
|
553
|
+
userId?: string | undefined;
|
|
547
554
|
}>, z.ZodObject<{
|
|
548
555
|
id: z.ZodString;
|
|
549
556
|
templateType: z.ZodNativeEnum<typeof import("@logto/connector-kit").TemplateType>;
|
|
550
557
|
verified: z.ZodBoolean;
|
|
558
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
551
559
|
} & {
|
|
552
560
|
type: z.ZodLiteral<import("../index.js").VerificationType.PhoneVerificationCode>;
|
|
553
561
|
identifier: z.ZodObject<{
|
|
@@ -569,6 +577,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
569
577
|
};
|
|
570
578
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
571
579
|
verified: boolean;
|
|
580
|
+
userId?: string | undefined;
|
|
572
581
|
}, {
|
|
573
582
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
574
583
|
id: string;
|
|
@@ -578,10 +587,12 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
578
587
|
};
|
|
579
588
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
580
589
|
verified: boolean;
|
|
590
|
+
userId?: string | undefined;
|
|
581
591
|
}>, z.ZodObject<{
|
|
582
592
|
id: z.ZodString;
|
|
583
593
|
templateType: z.ZodNativeEnum<typeof import("@logto/connector-kit").TemplateType>;
|
|
584
594
|
verified: z.ZodBoolean;
|
|
595
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
585
596
|
} & {
|
|
586
597
|
type: z.ZodLiteral<import("../index.js").VerificationType.MfaEmailVerificationCode>;
|
|
587
598
|
identifier: z.ZodObject<{
|
|
@@ -603,6 +614,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
603
614
|
};
|
|
604
615
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
605
616
|
verified: boolean;
|
|
617
|
+
userId?: string | undefined;
|
|
606
618
|
}, {
|
|
607
619
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
608
620
|
id: string;
|
|
@@ -612,10 +624,12 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
612
624
|
};
|
|
613
625
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
614
626
|
verified: boolean;
|
|
627
|
+
userId?: string | undefined;
|
|
615
628
|
}>, z.ZodObject<{
|
|
616
629
|
id: z.ZodString;
|
|
617
630
|
templateType: z.ZodNativeEnum<typeof import("@logto/connector-kit").TemplateType>;
|
|
618
631
|
verified: z.ZodBoolean;
|
|
632
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
619
633
|
} & {
|
|
620
634
|
type: z.ZodLiteral<import("../index.js").VerificationType.MfaPhoneVerificationCode>;
|
|
621
635
|
identifier: z.ZodObject<{
|
|
@@ -637,6 +651,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
637
651
|
};
|
|
638
652
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
639
653
|
verified: boolean;
|
|
654
|
+
userId?: string | undefined;
|
|
640
655
|
}, {
|
|
641
656
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
642
657
|
id: string;
|
|
@@ -646,6 +661,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
646
661
|
};
|
|
647
662
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
648
663
|
verified: boolean;
|
|
664
|
+
userId?: string | undefined;
|
|
649
665
|
}>, z.ZodObject<Omit<{
|
|
650
666
|
id: z.ZodString;
|
|
651
667
|
connectorId: z.ZodString;
|
|
@@ -1034,6 +1050,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1034
1050
|
};
|
|
1035
1051
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1036
1052
|
verified: boolean;
|
|
1053
|
+
userId?: string | undefined;
|
|
1037
1054
|
} | {
|
|
1038
1055
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
1039
1056
|
id: string;
|
|
@@ -1043,6 +1060,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1043
1060
|
};
|
|
1044
1061
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1045
1062
|
verified: boolean;
|
|
1063
|
+
userId?: string | undefined;
|
|
1046
1064
|
} | {
|
|
1047
1065
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
1048
1066
|
id: string;
|
|
@@ -1052,6 +1070,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1052
1070
|
};
|
|
1053
1071
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1054
1072
|
verified: boolean;
|
|
1073
|
+
userId?: string | undefined;
|
|
1055
1074
|
} | {
|
|
1056
1075
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
1057
1076
|
id: string;
|
|
@@ -1061,6 +1080,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1061
1080
|
};
|
|
1062
1081
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1063
1082
|
verified: boolean;
|
|
1083
|
+
userId?: string | undefined;
|
|
1064
1084
|
} | {
|
|
1065
1085
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
1066
1086
|
id: string;
|
|
@@ -1149,6 +1169,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1149
1169
|
};
|
|
1150
1170
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1151
1171
|
verified: boolean;
|
|
1172
|
+
userId?: string | undefined;
|
|
1152
1173
|
} | {
|
|
1153
1174
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
1154
1175
|
id: string;
|
|
@@ -1158,6 +1179,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1158
1179
|
};
|
|
1159
1180
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1160
1181
|
verified: boolean;
|
|
1182
|
+
userId?: string | undefined;
|
|
1161
1183
|
} | {
|
|
1162
1184
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
1163
1185
|
id: string;
|
|
@@ -1167,6 +1189,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1167
1189
|
};
|
|
1168
1190
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1169
1191
|
verified: boolean;
|
|
1192
|
+
userId?: string | undefined;
|
|
1170
1193
|
} | {
|
|
1171
1194
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
1172
1195
|
id: string;
|
|
@@ -1176,6 +1199,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1176
1199
|
};
|
|
1177
1200
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1178
1201
|
verified: boolean;
|
|
1202
|
+
userId?: string | undefined;
|
|
1179
1203
|
} | {
|
|
1180
1204
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
1181
1205
|
id: string;
|
|
@@ -1469,6 +1493,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1469
1493
|
name?: string | null | undefined;
|
|
1470
1494
|
id?: string | undefined;
|
|
1471
1495
|
applicationId?: string | null | undefined;
|
|
1496
|
+
cimdClientId?: string | null | undefined;
|
|
1472
1497
|
username?: string | null | undefined;
|
|
1473
1498
|
createdAt?: number | undefined;
|
|
1474
1499
|
profile?: Partial<{
|
|
@@ -1614,6 +1639,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1614
1639
|
};
|
|
1615
1640
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1616
1641
|
verified: boolean;
|
|
1642
|
+
userId?: string | undefined;
|
|
1617
1643
|
} | {
|
|
1618
1644
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
1619
1645
|
id: string;
|
|
@@ -1623,6 +1649,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1623
1649
|
};
|
|
1624
1650
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1625
1651
|
verified: boolean;
|
|
1652
|
+
userId?: string | undefined;
|
|
1626
1653
|
} | {
|
|
1627
1654
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
1628
1655
|
id: string;
|
|
@@ -1632,6 +1659,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1632
1659
|
};
|
|
1633
1660
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1634
1661
|
verified: boolean;
|
|
1662
|
+
userId?: string | undefined;
|
|
1635
1663
|
} | {
|
|
1636
1664
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
1637
1665
|
id: string;
|
|
@@ -1641,6 +1669,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1641
1669
|
};
|
|
1642
1670
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1643
1671
|
verified: boolean;
|
|
1672
|
+
userId?: string | undefined;
|
|
1644
1673
|
} | {
|
|
1645
1674
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
1646
1675
|
id: string;
|
|
@@ -1718,6 +1747,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1718
1747
|
name?: string | null | undefined;
|
|
1719
1748
|
id?: string | undefined;
|
|
1720
1749
|
applicationId?: string | null | undefined;
|
|
1750
|
+
cimdClientId?: string | null | undefined;
|
|
1721
1751
|
username?: string | null | undefined;
|
|
1722
1752
|
createdAt?: number | undefined;
|
|
1723
1753
|
profile?: Partial<{
|
|
@@ -1863,6 +1893,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1863
1893
|
};
|
|
1864
1894
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1865
1895
|
verified: boolean;
|
|
1896
|
+
userId?: string | undefined;
|
|
1866
1897
|
} | {
|
|
1867
1898
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
1868
1899
|
id: string;
|
|
@@ -1872,6 +1903,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1872
1903
|
};
|
|
1873
1904
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1874
1905
|
verified: boolean;
|
|
1906
|
+
userId?: string | undefined;
|
|
1875
1907
|
} | {
|
|
1876
1908
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
1877
1909
|
id: string;
|
|
@@ -1881,6 +1913,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1881
1913
|
};
|
|
1882
1914
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1883
1915
|
verified: boolean;
|
|
1916
|
+
userId?: string | undefined;
|
|
1884
1917
|
} | {
|
|
1885
1918
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
1886
1919
|
id: string;
|
|
@@ -1890,6 +1923,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1890
1923
|
};
|
|
1891
1924
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
1892
1925
|
verified: boolean;
|
|
1926
|
+
userId?: string | undefined;
|
|
1893
1927
|
} | {
|
|
1894
1928
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
1895
1929
|
id: string;
|
|
@@ -1971,6 +2005,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
1971
2005
|
name?: string | null | undefined;
|
|
1972
2006
|
id?: string | undefined;
|
|
1973
2007
|
applicationId?: string | null | undefined;
|
|
2008
|
+
cimdClientId?: string | null | undefined;
|
|
1974
2009
|
username?: string | null | undefined;
|
|
1975
2010
|
createdAt?: number | undefined;
|
|
1976
2011
|
profile?: Partial<{
|
|
@@ -2116,6 +2151,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2116
2151
|
};
|
|
2117
2152
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2118
2153
|
verified: boolean;
|
|
2154
|
+
userId?: string | undefined;
|
|
2119
2155
|
} | {
|
|
2120
2156
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
2121
2157
|
id: string;
|
|
@@ -2125,6 +2161,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2125
2161
|
};
|
|
2126
2162
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2127
2163
|
verified: boolean;
|
|
2164
|
+
userId?: string | undefined;
|
|
2128
2165
|
} | {
|
|
2129
2166
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
2130
2167
|
id: string;
|
|
@@ -2134,6 +2171,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2134
2171
|
};
|
|
2135
2172
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2136
2173
|
verified: boolean;
|
|
2174
|
+
userId?: string | undefined;
|
|
2137
2175
|
} | {
|
|
2138
2176
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
2139
2177
|
id: string;
|
|
@@ -2143,6 +2181,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2143
2181
|
};
|
|
2144
2182
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2145
2183
|
verified: boolean;
|
|
2184
|
+
userId?: string | undefined;
|
|
2146
2185
|
} | {
|
|
2147
2186
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
2148
2187
|
id: string;
|
|
@@ -2224,8 +2263,8 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2224
2263
|
kind?: "AccessToken" | undefined;
|
|
2225
2264
|
accountId?: string | undefined;
|
|
2226
2265
|
scope?: string | undefined;
|
|
2227
|
-
sessionUid?: string | undefined;
|
|
2228
2266
|
clientId?: string | undefined;
|
|
2267
|
+
sessionUid?: string | undefined;
|
|
2229
2268
|
expiresWithSession?: boolean | undefined;
|
|
2230
2269
|
gty?: string | undefined;
|
|
2231
2270
|
aud?: string | string[] | undefined;
|
|
@@ -2238,6 +2277,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2238
2277
|
name?: string | null | undefined;
|
|
2239
2278
|
id?: string | undefined;
|
|
2240
2279
|
applicationId?: string | null | undefined;
|
|
2280
|
+
cimdClientId?: string | null | undefined;
|
|
2241
2281
|
username?: string | null | undefined;
|
|
2242
2282
|
createdAt?: number | undefined;
|
|
2243
2283
|
profile?: Partial<{
|
|
@@ -2383,6 +2423,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2383
2423
|
};
|
|
2384
2424
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2385
2425
|
verified: boolean;
|
|
2426
|
+
userId?: string | undefined;
|
|
2386
2427
|
} | {
|
|
2387
2428
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
2388
2429
|
id: string;
|
|
@@ -2392,6 +2433,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2392
2433
|
};
|
|
2393
2434
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2394
2435
|
verified: boolean;
|
|
2436
|
+
userId?: string | undefined;
|
|
2395
2437
|
} | {
|
|
2396
2438
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
2397
2439
|
id: string;
|
|
@@ -2401,6 +2443,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2401
2443
|
};
|
|
2402
2444
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2403
2445
|
verified: boolean;
|
|
2446
|
+
userId?: string | undefined;
|
|
2404
2447
|
} | {
|
|
2405
2448
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
2406
2449
|
id: string;
|
|
@@ -2410,6 +2453,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2410
2453
|
};
|
|
2411
2454
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2412
2455
|
verified: boolean;
|
|
2456
|
+
userId?: string | undefined;
|
|
2413
2457
|
} | {
|
|
2414
2458
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
2415
2459
|
id: string;
|
|
@@ -2491,8 +2535,8 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2491
2535
|
kind?: "AccessToken" | undefined;
|
|
2492
2536
|
accountId?: string | undefined;
|
|
2493
2537
|
scope?: string | undefined;
|
|
2494
|
-
sessionUid?: string | undefined;
|
|
2495
2538
|
clientId?: string | undefined;
|
|
2539
|
+
sessionUid?: string | undefined;
|
|
2496
2540
|
expiresWithSession?: boolean | undefined;
|
|
2497
2541
|
gty?: string | undefined;
|
|
2498
2542
|
aud?: string | string[] | undefined;
|
|
@@ -2507,6 +2551,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2507
2551
|
name?: string | null | undefined;
|
|
2508
2552
|
id?: string | undefined;
|
|
2509
2553
|
applicationId?: string | null | undefined;
|
|
2554
|
+
cimdClientId?: string | null | undefined;
|
|
2510
2555
|
username?: string | null | undefined;
|
|
2511
2556
|
createdAt?: number | undefined;
|
|
2512
2557
|
profile?: Partial<{
|
|
@@ -2652,6 +2697,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2652
2697
|
};
|
|
2653
2698
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2654
2699
|
verified: boolean;
|
|
2700
|
+
userId?: string | undefined;
|
|
2655
2701
|
} | {
|
|
2656
2702
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
2657
2703
|
id: string;
|
|
@@ -2661,6 +2707,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2661
2707
|
};
|
|
2662
2708
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2663
2709
|
verified: boolean;
|
|
2710
|
+
userId?: string | undefined;
|
|
2664
2711
|
} | {
|
|
2665
2712
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
2666
2713
|
id: string;
|
|
@@ -2670,6 +2717,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2670
2717
|
};
|
|
2671
2718
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2672
2719
|
verified: boolean;
|
|
2720
|
+
userId?: string | undefined;
|
|
2673
2721
|
} | {
|
|
2674
2722
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
2675
2723
|
id: string;
|
|
@@ -2679,6 +2727,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2679
2727
|
};
|
|
2680
2728
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2681
2729
|
verified: boolean;
|
|
2730
|
+
userId?: string | undefined;
|
|
2682
2731
|
} | {
|
|
2683
2732
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
2684
2733
|
id: string;
|
|
@@ -2760,8 +2809,8 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2760
2809
|
kind?: "AccessToken" | undefined;
|
|
2761
2810
|
accountId?: string | undefined;
|
|
2762
2811
|
scope?: string | undefined;
|
|
2763
|
-
sessionUid?: string | undefined;
|
|
2764
2812
|
clientId?: string | undefined;
|
|
2813
|
+
sessionUid?: string | undefined;
|
|
2765
2814
|
expiresWithSession?: boolean | undefined;
|
|
2766
2815
|
gty?: string | undefined;
|
|
2767
2816
|
aud?: string | string[] | undefined;
|
|
@@ -2777,6 +2826,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2777
2826
|
name?: string | null | undefined;
|
|
2778
2827
|
id?: string | undefined;
|
|
2779
2828
|
applicationId?: string | null | undefined;
|
|
2829
|
+
cimdClientId?: string | null | undefined;
|
|
2780
2830
|
username?: string | null | undefined;
|
|
2781
2831
|
createdAt?: number | undefined;
|
|
2782
2832
|
profile?: Partial<{
|
|
@@ -2922,6 +2972,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2922
2972
|
};
|
|
2923
2973
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2924
2974
|
verified: boolean;
|
|
2975
|
+
userId?: string | undefined;
|
|
2925
2976
|
} | {
|
|
2926
2977
|
type: import("../index.js").VerificationType.PhoneVerificationCode;
|
|
2927
2978
|
id: string;
|
|
@@ -2931,6 +2982,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2931
2982
|
};
|
|
2932
2983
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2933
2984
|
verified: boolean;
|
|
2985
|
+
userId?: string | undefined;
|
|
2934
2986
|
} | {
|
|
2935
2987
|
type: import("../index.js").VerificationType.MfaEmailVerificationCode;
|
|
2936
2988
|
id: string;
|
|
@@ -2940,6 +2992,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2940
2992
|
};
|
|
2941
2993
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2942
2994
|
verified: boolean;
|
|
2995
|
+
userId?: string | undefined;
|
|
2943
2996
|
} | {
|
|
2944
2997
|
type: import("../index.js").VerificationType.MfaPhoneVerificationCode;
|
|
2945
2998
|
id: string;
|
|
@@ -2949,6 +3002,7 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
2949
3002
|
};
|
|
2950
3003
|
templateType: import("@logto/connector-kit").TemplateType;
|
|
2951
3004
|
verified: boolean;
|
|
3005
|
+
userId?: string | undefined;
|
|
2952
3006
|
} | {
|
|
2953
3007
|
type: import("../index.js").VerificationType.NewPasswordIdentity;
|
|
2954
3008
|
id: string;
|
|
@@ -3030,8 +3084,8 @@ export declare const jwtCustomizerConfigsGuard: z.ZodDiscriminatedUnion<"key", [
|
|
|
3030
3084
|
kind?: "AccessToken" | undefined;
|
|
3031
3085
|
accountId?: string | undefined;
|
|
3032
3086
|
scope?: string | undefined;
|
|
3033
|
-
sessionUid?: string | undefined;
|
|
3034
3087
|
clientId?: string | undefined;
|
|
3088
|
+
sessionUid?: string | undefined;
|
|
3035
3089
|
expiresWithSession?: boolean | undefined;
|
|
3036
3090
|
gty?: string | undefined;
|
|
3037
3091
|
aud?: string | string[] | undefined;
|
|
@@ -3754,6 +3808,25 @@ export declare const signingKeyRotationStateGuard: z.ZodObject<{
|
|
|
3754
3808
|
signingKeyRotationAt?: number | undefined;
|
|
3755
3809
|
}>;
|
|
3756
3810
|
export type SigningKeyRotationState = z.infer<typeof signingKeyRotationStateGuard>;
|
|
3811
|
+
/**
|
|
3812
|
+
* Config for the OAuth Client ID Metadata Document (CIMD) feature. The row is only written once
|
|
3813
|
+
* the feature is toggled, so readers must fall back to {@link defaultCimdConfig}.
|
|
3814
|
+
*/
|
|
3815
|
+
export declare const cimdConfigGuard: z.ZodObject<{
|
|
3816
|
+
enabled: z.ZodBoolean;
|
|
3817
|
+
addConsentPromptForOfflineAccess: z.ZodOptional<z.ZodBoolean>;
|
|
3818
|
+
}, "strip", z.ZodTypeAny, {
|
|
3819
|
+
enabled: boolean;
|
|
3820
|
+
addConsentPromptForOfflineAccess?: boolean | undefined;
|
|
3821
|
+
}, {
|
|
3822
|
+
enabled: boolean;
|
|
3823
|
+
addConsentPromptForOfflineAccess?: boolean | undefined;
|
|
3824
|
+
}>;
|
|
3825
|
+
export type CimdConfig = z.infer<typeof cimdConfigGuard>;
|
|
3826
|
+
/** Applied when the `cimd` row is absent: the feature is opt-in per tenant. */
|
|
3827
|
+
export declare const defaultCimdConfig: Readonly<{
|
|
3828
|
+
enabled: false;
|
|
3829
|
+
}>;
|
|
3757
3830
|
export declare enum LogtoTenantConfigKey {
|
|
3758
3831
|
AdminConsole = "adminConsole",
|
|
3759
3832
|
CloudConnection = "cloudConnection",
|
|
@@ -3764,7 +3837,9 @@ export declare enum LogtoTenantConfigKey {
|
|
|
3764
3837
|
/** Tenant-scoped rotation state for staged private signing key activation. */
|
|
3765
3838
|
SigningKeyRotationState = "signingKeyRotationState",
|
|
3766
3839
|
/** Internal, ops-only override of the system message send-rate-limit policy. Not exposed by any API. */
|
|
3767
|
-
MessageRateLimitOverride = "messageRateLimitOverride"
|
|
3840
|
+
MessageRateLimitOverride = "messageRateLimitOverride",
|
|
3841
|
+
/** Tenant-level switch for the OAuth Client ID Metadata Document feature. */
|
|
3842
|
+
Cimd = "cimd"
|
|
3768
3843
|
}
|
|
3769
3844
|
export type LogtoTenantConfigType = {
|
|
3770
3845
|
[LogtoTenantConfigKey.AdminConsole]: AdminConsoleData;
|
|
@@ -3775,6 +3850,7 @@ export type LogtoTenantConfigType = {
|
|
|
3775
3850
|
[LogtoTenantConfigKey.IdToken]: IdTokenConfig;
|
|
3776
3851
|
[LogtoTenantConfigKey.SigningKeyRotationState]: SigningKeyRotationState;
|
|
3777
3852
|
[LogtoTenantConfigKey.MessageRateLimitOverride]: MessageRateLimitOverride;
|
|
3853
|
+
[LogtoTenantConfigKey.Cimd]: CimdConfig;
|
|
3778
3854
|
};
|
|
3779
3855
|
export declare const logtoTenantConfigGuard: Readonly<{
|
|
3780
3856
|
[key in LogtoTenantConfigKey]: ZodType<LogtoTenantConfigType[key]>;
|
|
@@ -116,6 +116,17 @@ export const signingKeyRotationStateGuard = z.object({
|
|
|
116
116
|
tenantCacheExpiresAt: z.number().optional(),
|
|
117
117
|
signingKeyRotationAt: z.number().optional(),
|
|
118
118
|
});
|
|
119
|
+
/* --- CIMD Config --- */
|
|
120
|
+
/**
|
|
121
|
+
* Config for the OAuth Client ID Metadata Document (CIMD) feature. The row is only written once
|
|
122
|
+
* the feature is toggled, so readers must fall back to {@link defaultCimdConfig}.
|
|
123
|
+
*/
|
|
124
|
+
export const cimdConfigGuard = z.object({
|
|
125
|
+
enabled: z.boolean(),
|
|
126
|
+
addConsentPromptForOfflineAccess: z.boolean().optional(),
|
|
127
|
+
});
|
|
128
|
+
/** Applied when the `cimd` row is absent: the feature is opt-in per tenant. */
|
|
129
|
+
export const defaultCimdConfig = Object.freeze({ enabled: false });
|
|
119
130
|
export var LogtoTenantConfigKey;
|
|
120
131
|
(function (LogtoTenantConfigKey) {
|
|
121
132
|
LogtoTenantConfigKey["AdminConsole"] = "adminConsole";
|
|
@@ -128,6 +139,8 @@ export var LogtoTenantConfigKey;
|
|
|
128
139
|
LogtoTenantConfigKey["SigningKeyRotationState"] = "signingKeyRotationState";
|
|
129
140
|
/** Internal, ops-only override of the system message send-rate-limit policy. Not exposed by any API. */
|
|
130
141
|
LogtoTenantConfigKey["MessageRateLimitOverride"] = "messageRateLimitOverride";
|
|
142
|
+
/** Tenant-level switch for the OAuth Client ID Metadata Document feature. */
|
|
143
|
+
LogtoTenantConfigKey["Cimd"] = "cimd";
|
|
131
144
|
})(LogtoTenantConfigKey || (LogtoTenantConfigKey = {}));
|
|
132
145
|
export const logtoTenantConfigGuard = Object.freeze({
|
|
133
146
|
[LogtoTenantConfigKey.AdminConsole]: adminConsoleDataGuard,
|
|
@@ -136,6 +149,7 @@ export const logtoTenantConfigGuard = Object.freeze({
|
|
|
136
149
|
[LogtoTenantConfigKey.IdToken]: idTokenConfigGuard,
|
|
137
150
|
[LogtoTenantConfigKey.SigningKeyRotationState]: signingKeyRotationStateGuard,
|
|
138
151
|
[LogtoTenantConfigKey.MessageRateLimitOverride]: messageRateLimitOverrideGuard,
|
|
152
|
+
[LogtoTenantConfigKey.Cimd]: cimdConfigGuard,
|
|
139
153
|
});
|
|
140
154
|
export const logtoConfigKeys = Object.freeze([
|
|
141
155
|
...Object.values(LogtoOidcConfigKey),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { z } from 'zod';
|
|
2
3
|
import { LogtoActionKey, LogtoOidcConfigKey, LogtoTenantConfigKey, OidcSigningKeyStatus, actionConfigGuard, logtoOidcConfigGuard, logtoConfigGuards, logtoConfigKeys, logtoTenantConfigGuard, oidcConfigKeysResponseGuard, } from './index.js';
|
|
3
4
|
describe('logto config guards', () => {
|
|
4
5
|
it('accepts legacy private keys without status', () => {
|
|
@@ -50,4 +51,26 @@ describe('logto config guards', () => {
|
|
|
50
51
|
expect(logtoConfigKeys).toContain(LogtoActionKey.PostSignIn);
|
|
51
52
|
expect(logtoConfigGuards[LogtoActionKey.PostSignIn]).toBe(actionConfigGuard[LogtoActionKey.PostSignIn]);
|
|
52
53
|
});
|
|
54
|
+
it('includes the CIMD key in the logto config summary guards', () => {
|
|
55
|
+
expect(logtoConfigKeys).toContain(LogtoTenantConfigKey.Cimd);
|
|
56
|
+
expect(logtoConfigGuards[LogtoTenantConfigKey.Cimd]).toBe(logtoTenantConfigGuard[LogtoTenantConfigKey.Cimd]);
|
|
57
|
+
});
|
|
58
|
+
it('keeps a stored CIMD config value', () => {
|
|
59
|
+
expect(logtoTenantConfigGuard[LogtoTenantConfigKey.Cimd].parse({ enabled: true })).toEqual({
|
|
60
|
+
enabled: true,
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
it('rejects invalid CIMD config values', () => {
|
|
64
|
+
const result = logtoTenantConfigGuard[LogtoTenantConfigKey.Cimd].safeParse({ enabled: 'yes' });
|
|
65
|
+
expect(result.success).toBe(false);
|
|
66
|
+
});
|
|
67
|
+
it('parses OIDC configs without the optional session row', () => {
|
|
68
|
+
const result = z.object(logtoOidcConfigGuard).parse({
|
|
69
|
+
[LogtoOidcConfigKey.PrivateKeys]: [
|
|
70
|
+
{ id: 'key_1', value: 'private-key-1', createdAt: 1_710_000_000_000 },
|
|
71
|
+
],
|
|
72
|
+
[LogtoOidcConfigKey.CookieKeys]: [],
|
|
73
|
+
});
|
|
74
|
+
expect(result[LogtoOidcConfigKey.Session]).toEqual({});
|
|
75
|
+
});
|
|
53
76
|
});
|