diff --git a/docs/docs/apis/proto/admin.md b/docs/docs/apis/proto/admin.md index 08bbca9007..b604eeed57 100644 --- a/docs/docs/apis/proto/admin.md +++ b/docs/docs/apis/proto/admin.md @@ -2437,6 +2437,7 @@ This is an empty request | passwordless_prompt_text | zitadel.text.v1.PasswordlessPromptScreenText | - | | | passwordless_registration_text | zitadel.text.v1.PasswordlessRegistrationScreenText | - | | | passwordless_registration_done_text | zitadel.text.v1.PasswordlessRegistrationDoneScreenText | - | | +| external_registration_user_overview_text | zitadel.text.v1.ExternalRegistrationUserOverviewScreenText | - | | diff --git a/docs/docs/apis/proto/management.md b/docs/docs/apis/proto/management.md index 2a19c0d68f..ae1260fa8c 100644 --- a/docs/docs/apis/proto/management.md +++ b/docs/docs/apis/proto/management.md @@ -6756,6 +6756,7 @@ This is an empty request | passwordless_prompt_text | zitadel.text.v1.PasswordlessPromptScreenText | - | | | passwordless_registration_text | zitadel.text.v1.PasswordlessRegistrationScreenText | - | | | passwordless_registration_done_text | zitadel.text.v1.PasswordlessRegistrationDoneScreenText | - | | +| external_registration_user_overview_text | zitadel.text.v1.ExternalRegistrationUserOverviewScreenText | - | | diff --git a/internal/api/grpc/admin/custom_text_converter.go b/internal/api/grpc/admin/custom_text_converter.go index b8870183a8..5ada84d67b 100644 --- a/internal/api/grpc/admin/custom_text_converter.go +++ b/internal/api/grpc/admin/custom_text_converter.go @@ -131,6 +131,7 @@ func SetLoginTextToDomain(req *admin_pb.SetCustomLoginTextsRequest) *domain.Cust result.PasswordResetDone = text.PasswordResetDoneScreenTextPbToDomain(req.PasswordResetDoneText) result.RegisterOption = text.RegistrationOptionScreenTextPbToDomain(req.RegistrationOptionText) result.RegistrationUser = text.RegistrationUserScreenTextPbToDomain(req.RegistrationUserText) + result.ExternalRegistrationUserOverview = text.ExternalRegistrationUserOverviewScreenTextPbToDomain(req.ExternalRegistrationUserOverviewText) result.RegistrationOrg = text.RegistrationOrgScreenTextPbToDomain(req.RegistrationOrgText) result.LinkingUsersDone = text.LinkingUserDoneScreenTextPbToDomain(req.LinkingUserDoneText) result.ExternalNotFoundOption = text.ExternalUserNotFoundScreenTextPbToDomain(req.ExternalUserNotFoundText) diff --git a/internal/api/grpc/management/custom_text_converter.go b/internal/api/grpc/management/custom_text_converter.go index 91bf484f63..db0e821fd2 100644 --- a/internal/api/grpc/management/custom_text_converter.go +++ b/internal/api/grpc/management/custom_text_converter.go @@ -129,6 +129,7 @@ func SetLoginCustomTextToDomain(req *mgmt_pb.SetCustomLoginTextsRequest) *domain result.PasswordResetDone = text.PasswordResetDoneScreenTextPbToDomain(req.PasswordResetDoneText) result.RegisterOption = text.RegistrationOptionScreenTextPbToDomain(req.RegistrationOptionText) result.RegistrationUser = text.RegistrationUserScreenTextPbToDomain(req.RegistrationUserText) + result.ExternalRegistrationUserOverview = text.ExternalRegistrationUserOverviewScreenTextPbToDomain(req.ExternalRegistrationUserOverviewText) result.RegistrationOrg = text.RegistrationOrgScreenTextPbToDomain(req.RegistrationOrgText) result.LinkingUsersDone = text.LinkingUserDoneScreenTextPbToDomain(req.LinkingUserDoneText) result.ExternalNotFoundOption = text.ExternalUserNotFoundScreenTextPbToDomain(req.ExternalUserNotFoundText) diff --git a/internal/api/grpc/text/custom_text.go b/internal/api/grpc/text/custom_text.go index 43ab517699..0adfdf0e18 100644 --- a/internal/api/grpc/text/custom_text.go +++ b/internal/api/grpc/text/custom_text.go @@ -32,39 +32,40 @@ func CustomLoginTextToPb(text *domain.CustomLoginText) *text_pb.LoginCustomText text.ChangeDate, text.AggregateID, ), - SelectAccountText: SelectAccountScreenToPb(text.SelectAccount), - LoginText: LoginScreenTextToPb(text.Login), - PasswordText: PasswordScreenTextToPb(text.Password), - UsernameChangeText: UsernameChangeScreenTextToPb(text.UsernameChange), - UsernameChangeDoneText: UsernameChangeDoneScreenTextToPb(text.UsernameChangeDone), - InitPasswordText: InitPasswordScreenTextToPb(text.InitPassword), - InitPasswordDoneText: InitPasswordDoneScreenTextToPb(text.InitPasswordDone), - EmailVerificationText: EmailVerificationScreenTextToPb(text.EmailVerification), - EmailVerificationDoneText: EmailVerificationDoneScreenTextToPb(text.EmailVerificationDone), - InitializeUserText: InitializeUserScreenTextToPb(text.InitUser), - InitializeDoneText: InitializeUserDoneScreenTextToPb(text.InitUserDone), - InitMfaPromptText: InitMFAPromptScreenTextToPb(text.InitMFAPrompt), - InitMfaOtpText: InitMFAOTPScreenTextToPb(text.InitMFAOTP), - InitMfaU2FText: InitMFAU2FScreenTextToPb(text.InitMFAU2F), - InitMfaDoneText: InitMFADoneScreenTextToPb(text.InitMFADone), - MfaProvidersText: MFAProvidersTextToPb(text.MFAProvider), - VerifyMfaOtpText: VerifyMFAOTPScreenTextToPb(text.VerifyMFAOTP), - VerifyMfaU2FText: VerifyMFAU2FScreenTextToPb(text.VerifyMFAU2F), - PasswordlessText: PasswordlessScreenTextToPb(text.Passwordless), - PasswordlessPromptText: PasswordlessPromptScreenTextToPb(text.PasswordlessPrompt), - PasswordlessRegistrationText: PasswordlessRegistrationScreenTextToPb(text.PasswordlessRegistration), - PasswordlessRegistrationDoneText: PasswordlessRegistrationDoneScreenTextToPb(text.PasswordlessRegistrationDone), - PasswordChangeText: PasswordChangeScreenTextToPb(text.PasswordChange), - PasswordChangeDoneText: PasswordChangeDoneScreenTextToPb(text.PasswordChangeDone), - PasswordResetDoneText: PasswordResetDoneScreenTextToPb(text.PasswordResetDone), - RegistrationOptionText: RegistrationOptionScreenTextToPb(text.RegisterOption), - RegistrationUserText: RegistrationUserScreenTextToPb(text.RegistrationUser), - RegistrationOrgText: RegistrationOrgScreenTextToPb(text.RegistrationOrg), - LinkingUserDoneText: LinkingUserDoneScreenTextToPb(text.LinkingUsersDone), - ExternalUserNotFoundText: ExternalUserNotFoundScreenTextToPb(text.ExternalNotFoundOption), - SuccessLoginText: SuccessLoginScreenTextToPb(text.LoginSuccess), - LogoutText: LogoutDoneScreenTextToPb(text.LogoutDone), - FooterText: FooterTextToPb(text.Footer), + SelectAccountText: SelectAccountScreenToPb(text.SelectAccount), + LoginText: LoginScreenTextToPb(text.Login), + PasswordText: PasswordScreenTextToPb(text.Password), + UsernameChangeText: UsernameChangeScreenTextToPb(text.UsernameChange), + UsernameChangeDoneText: UsernameChangeDoneScreenTextToPb(text.UsernameChangeDone), + InitPasswordText: InitPasswordScreenTextToPb(text.InitPassword), + InitPasswordDoneText: InitPasswordDoneScreenTextToPb(text.InitPasswordDone), + EmailVerificationText: EmailVerificationScreenTextToPb(text.EmailVerification), + EmailVerificationDoneText: EmailVerificationDoneScreenTextToPb(text.EmailVerificationDone), + InitializeUserText: InitializeUserScreenTextToPb(text.InitUser), + InitializeDoneText: InitializeUserDoneScreenTextToPb(text.InitUserDone), + InitMfaPromptText: InitMFAPromptScreenTextToPb(text.InitMFAPrompt), + InitMfaOtpText: InitMFAOTPScreenTextToPb(text.InitMFAOTP), + InitMfaU2FText: InitMFAU2FScreenTextToPb(text.InitMFAU2F), + InitMfaDoneText: InitMFADoneScreenTextToPb(text.InitMFADone), + MfaProvidersText: MFAProvidersTextToPb(text.MFAProvider), + VerifyMfaOtpText: VerifyMFAOTPScreenTextToPb(text.VerifyMFAOTP), + VerifyMfaU2FText: VerifyMFAU2FScreenTextToPb(text.VerifyMFAU2F), + PasswordlessText: PasswordlessScreenTextToPb(text.Passwordless), + PasswordlessPromptText: PasswordlessPromptScreenTextToPb(text.PasswordlessPrompt), + PasswordlessRegistrationText: PasswordlessRegistrationScreenTextToPb(text.PasswordlessRegistration), + PasswordlessRegistrationDoneText: PasswordlessRegistrationDoneScreenTextToPb(text.PasswordlessRegistrationDone), + PasswordChangeText: PasswordChangeScreenTextToPb(text.PasswordChange), + PasswordChangeDoneText: PasswordChangeDoneScreenTextToPb(text.PasswordChangeDone), + PasswordResetDoneText: PasswordResetDoneScreenTextToPb(text.PasswordResetDone), + RegistrationOptionText: RegistrationOptionScreenTextToPb(text.RegisterOption), + RegistrationUserText: RegistrationUserScreenTextToPb(text.RegistrationUser), + ExternalRegistrationUserOverviewText: ExternalRegistrationUserOverviewScreenTextToPb(text.ExternalRegistrationUserOverview), + RegistrationOrgText: RegistrationOrgScreenTextToPb(text.RegistrationOrg), + LinkingUserDoneText: LinkingUserDoneScreenTextToPb(text.LinkingUsersDone), + ExternalUserNotFoundText: ExternalUserNotFoundScreenTextToPb(text.ExternalNotFoundOption), + SuccessLoginText: SuccessLoginScreenTextToPb(text.LoginSuccess), + LogoutText: LogoutDoneScreenTextToPb(text.LogoutDone), + FooterText: FooterTextToPb(text.Footer), } } @@ -299,9 +300,10 @@ func PasswordlessRegistrationScreenTextToPb(text domain.PasswordlessRegistration func PasswordlessRegistrationDoneScreenTextToPb(text domain.PasswordlessRegistrationDoneScreenText) *text_pb.PasswordlessRegistrationDoneScreenText { return &text_pb.PasswordlessRegistrationDoneScreenText{ - Title: text.Title, - Description: text.Description, - NextButtonText: text.NextButtonText, + Title: text.Title, + Description: text.Description, + NextButtonText: text.NextButtonText, + CancelButtonText: text.CancelButtonText, } } @@ -365,6 +367,27 @@ func RegistrationUserScreenTextToPb(text domain.RegistrationUserScreenText) *tex } } +func ExternalRegistrationUserOverviewScreenTextToPb(text domain.ExternalRegistrationUserOverviewScreenText) *text_pb.ExternalRegistrationUserOverviewScreenText { + return &text_pb.ExternalRegistrationUserOverviewScreenText{ + Title: text.Title, + Description: text.Description, + EmailLabel: text.EmailLabel, + UsernameLabel: text.UsernameLabel, + FirstnameLabel: text.FirstnameLabel, + LastnameLabel: text.LastnameLabel, + NicknameLabel: text.NicknameLabel, + LanguageLabel: text.LanguageLabel, + PhoneLabel: text.PhoneLabel, + TosAndPrivacyLabel: text.TOSAndPrivacyLabel, + TosConfirm: text.TOSConfirm, + TosLinkText: text.TOSLinkText, + TosConfirmAnd: text.TOSConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, + NextButtonText: text.NextButtonText, + BackButtonText: text.BackButtonText, + } +} + func RegistrationOrgScreenTextToPb(text domain.RegistrationOrgScreenText) *text_pb.RegistrationOrgScreenText { return &text_pb.RegistrationOrgScreenText{ Title: text.Title, @@ -400,6 +423,11 @@ func ExternalUserNotFoundScreenTextToPb(text domain.ExternalUserNotFoundScreenTe Description: text.Description, LinkButtonText: text.LinkButtonText, AutoRegisterButtonText: text.AutoRegisterButtonText, + TosAndPrivacyLabel: text.TOSAndPrivacyLabel, + TosConfirm: text.TOSConfirm, + TosLinkText: text.PrivacyLinkText, + TosConfirmAnd: text.TOSConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, } } @@ -807,6 +835,30 @@ func RegistrationUserScreenTextPbToDomain(text *text_pb.RegistrationUserScreenTe } } +func ExternalRegistrationUserOverviewScreenTextPbToDomain(text *text_pb.ExternalRegistrationUserOverviewScreenText) domain.ExternalRegistrationUserOverviewScreenText { + if text == nil { + return domain.ExternalRegistrationUserOverviewScreenText{} + } + return domain.ExternalRegistrationUserOverviewScreenText{ + Title: text.Title, + Description: text.Description, + EmailLabel: text.EmailLabel, + UsernameLabel: text.UsernameLabel, + FirstnameLabel: text.FirstnameLabel, + LastnameLabel: text.LastnameLabel, + NicknameLabel: text.NicknameLabel, + LanguageLabel: text.LanguageLabel, + PhoneLabel: text.PhoneLabel, + TOSAndPrivacyLabel: text.TosAndPrivacyLabel, + TOSConfirm: text.TosConfirm, + TOSLinkText: text.TosLinkText, + TOSConfirmAnd: text.TosConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, + NextButtonText: text.NextButtonText, + BackButtonText: text.BackButtonText, + } +} + func RegistrationOrgScreenTextPbToDomain(text *text_pb.RegistrationOrgScreenText) domain.RegistrationOrgScreenText { if text == nil { return domain.RegistrationOrgScreenText{} @@ -851,6 +903,11 @@ func ExternalUserNotFoundScreenTextPbToDomain(text *text_pb.ExternalUserNotFound Description: text.Description, LinkButtonText: text.LinkButtonText, AutoRegisterButtonText: text.AutoRegisterButtonText, + TOSAndPrivacyLabel: text.TosAndPrivacyLabel, + TOSConfirm: text.TosConfirm, + TOSLinkText: text.PrivacyLinkText, + TOSConfirmAnd: text.TosConfirmAnd, + PrivacyLinkText: text.PrivacyLinkText, } } diff --git a/internal/auth/repository/auth_request.go b/internal/auth/repository/auth_request.go index fe6b09ed9c..6c0f28350c 100644 --- a/internal/auth/repository/auth_request.go +++ b/internal/auth/repository/auth_request.go @@ -15,6 +15,7 @@ type AuthRequestRepository interface { CheckLoginName(ctx context.Context, id, loginName, userAgentID string) error CheckExternalUserLogin(ctx context.Context, authReqID, userAgentID string, user *domain.ExternalUser, info *domain.BrowserInfo) error + SetExternalUserLogin(ctx context.Context, authReqID, userAgentID string, user *domain.ExternalUser) error SelectUser(ctx context.Context, id, userID, userAgentID string) error SelectExternalIDP(ctx context.Context, authReqID, idpConfigID, userAgentID string) error VerifyPassword(ctx context.Context, id, userID, resourceOwner, password, userAgentID string, info *domain.BrowserInfo) error diff --git a/internal/auth/repository/eventsourcing/eventstore/auth_request.go b/internal/auth/repository/eventsourcing/eventstore/auth_request.go index b8e6ae5ace..e5c6d1bfdf 100644 --- a/internal/auth/repository/eventsourcing/eventstore/auth_request.go +++ b/internal/auth/repository/eventsourcing/eventstore/auth_request.go @@ -233,6 +233,21 @@ func (repo *AuthRequestRepo) CheckExternalUserLogin(ctx context.Context, authReq return repo.AuthRequests.UpdateAuthRequest(ctx, request) } +func (repo *AuthRequestRepo) SetExternalUserLogin(ctx context.Context, authReqID, userAgentID string, externalUser *domain.ExternalUser) (err error) { + ctx, span := tracing.NewSpan(ctx) + defer func() { span.EndWithError(err) }() + request, err := repo.getAuthRequest(ctx, authReqID, userAgentID) + if err != nil { + return err + } + + err = repo.setLinkingUser(ctx, request, externalUser) + if err != nil { + return err + } + return repo.AuthRequests.UpdateAuthRequest(ctx, request) +} + func (repo *AuthRequestRepo) setLinkingUser(ctx context.Context, request *domain.AuthRequest, externalUser *domain.ExternalUser) error { request.LinkingUsers = append(request.LinkingUsers, externalUser) return repo.AuthRequests.UpdateAuthRequest(ctx, request) diff --git a/internal/command/custom_login_text.go b/internal/command/custom_login_text.go index fc4821f2d2..720ecfbe63 100644 --- a/internal/command/custom_login_text.go +++ b/internal/command/custom_login_text.go @@ -40,6 +40,7 @@ func (c *Commands) createAllLoginTextEvents(ctx context.Context, agg *eventstore events = append(events, c.createPasswordResetDoneEvents(ctx, agg, existingText, text, defaultText)...) events = append(events, c.createRegistrationOptionEvents(ctx, agg, existingText, text, defaultText)...) events = append(events, c.createRegistrationUserEvents(ctx, agg, existingText, text, defaultText)...) + events = append(events, c.createExternalRegistrationUserOverviewEvents(ctx, agg, existingText, text, defaultText)...) events = append(events, c.createRegistrationOrgEvents(ctx, agg, existingText, text, defaultText)...) events = append(events, c.createLinkingUserEvents(ctx, agg, existingText, text, defaultText)...) events = append(events, c.createExternalUserNotFoundEvents(ctx, agg, existingText, text, defaultText)...) @@ -664,6 +665,10 @@ func (c *Commands) createPasswordlessRegistrationDoneEvents(ctx context.Context, if event != nil { events = append(events, event) } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, existingText.PasswordlessRegistrationDoneCancelButtonText, text.PasswordlessRegistrationDone.CancelButtonText, text.Language, defaultText) + if event != nil { + events = append(events, event) + } return events } @@ -832,6 +837,75 @@ func (c *Commands) createRegistrationUserEvents(ctx context.Context, agg *events return events } +func (c *Commands) createExternalRegistrationUserOverviewEvents(ctx context.Context, agg *eventstore.Aggregate, existingText *CustomLoginTextReadModel, text *domain.CustomLoginText, defaultText bool) []eventstore.EventPusher { + events := make([]eventstore.EventPusher, 0) + event := c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewTitle, existingText.ExternalRegistrationUserOverviewTitle, text.ExternalRegistrationUserOverview.Title, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewDescription, existingText.ExternalRegistrationUserOverviewDescription, text.ExternalRegistrationUserOverview.Description, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, existingText.ExternalRegistrationUserOverviewEmailLabel, text.ExternalRegistrationUserOverview.EmailLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, existingText.ExternalRegistrationUserOverviewUsernameLabel, text.ExternalRegistrationUserOverview.UsernameLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, existingText.ExternalRegistrationUserOverviewFirstnameLabel, text.ExternalRegistrationUserOverview.FirstnameLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, existingText.ExternalRegistrationUserOverviewLastnameLabel, text.ExternalRegistrationUserOverview.LastnameLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, existingText.ExternalRegistrationUserOverviewNicknameLabel, text.ExternalRegistrationUserOverview.NicknameLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, existingText.ExternalRegistrationUserOverviewLanguageLabel, text.ExternalRegistrationUserOverview.LanguageLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, existingText.ExternalRegistrationUserOverviewPhoneLabel, text.ExternalRegistrationUserOverview.PhoneLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, existingText.ExternalRegistrationUserOverviewTOSAndPrivacyLabel, text.ExternalRegistrationUserOverview.TOSAndPrivacyLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, existingText.ExternalRegistrationUserOverviewTOSConfirm, text.ExternalRegistrationUserOverview.TOSConfirm, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, existingText.ExternalRegistrationUserOverviewTOSLinkText, text.ExternalRegistrationUserOverview.TOSLinkText, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, existingText.ExternalRegistrationUserOverviewTOSConfirmAnd, text.ExternalRegistrationUserOverview.TOSConfirmAnd, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, existingText.ExternalRegistrationUserOverviewPrivacyLinkText, text.ExternalRegistrationUserOverview.PrivacyLinkText, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, existingText.ExternalRegistrationUserOverviewBackButtonText, text.ExternalRegistrationUserOverview.BackButtonText, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, existingText.ExternalRegistrationUserOverviewNextButtonText, text.ExternalRegistrationUserOverview.NextButtonText, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + return events +} + func (c *Commands) createRegistrationOrgEvents(ctx context.Context, agg *eventstore.Aggregate, existingText *CustomLoginTextReadModel, text *domain.CustomLoginText, defaultText bool) []eventstore.EventPusher { events := make([]eventstore.EventPusher, 0) event := c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyRegisterOrgTitle, existingText.RegisterOrgTitle, text.RegistrationOrg.Title, text.Language, defaultText) @@ -936,6 +1010,26 @@ func (c *Commands) createExternalUserNotFoundEvents(ctx context.Context, agg *ev if event != nil { events = append(events, event) } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, existingText.ExternalUserNotFoundTOSAndPrivacyLabel, text.ExternalNotFoundOption.TOSAndPrivacyLabel, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalNotFoundTOSConfirm, existingText.ExternalUserNotFoundTOSConfirm, text.ExternalNotFoundOption.TOSConfirm, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalNotFoundTOSLinkText, existingText.ExternalUserNotFoundTOSLinkText, text.ExternalNotFoundOption.TOSLinkText, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalNotFoundTOSConfirmAnd, existingText.ExternalUserNotFoundTOSConfirmAnd, text.ExternalNotFoundOption.TOSConfirmAnd, text.Language, defaultText) + if event != nil { + events = append(events, event) + } + event = c.createCustomLoginTextEvent(ctx, agg, domain.LoginKeyExternalNotFoundPrivacyLinkText, existingText.ExternalUserNotFoundPrivacyLinkText, text.ExternalNotFoundOption.PrivacyLinkText, text.Language, defaultText) + if event != nil { + events = append(events, event) + } return events } diff --git a/internal/command/custom_login_text_model.go b/internal/command/custom_login_text_model.go index 69b6db2cec..2a53814021 100644 --- a/internal/command/custom_login_text_model.go +++ b/internal/command/custom_login_text_model.go @@ -161,9 +161,10 @@ type CustomLoginTextReadModel struct { PasswordlessRegistrationNotSupported string PasswordlessRegistrationErrorRetry string - PasswordlessRegistrationDoneTitle string - PasswordlessRegistrationDoneDescription string - PasswordlessRegistrationDoneNextButtonText string + PasswordlessRegistrationDoneTitle string + PasswordlessRegistrationDoneDescription string + PasswordlessRegistrationDoneNextButtonText string + PasswordlessRegistrationDoneCancelButtonText string PasswordChangeTitle string PasswordChangeDescription string @@ -207,6 +208,25 @@ type CustomLoginTextReadModel struct { RegistrationUserNextButtonText string RegistrationUserBackButtonText string + ExternalRegistrationUserOverviewTitle string + ExternalRegistrationUserOverviewDescription string + ExternalRegistrationUserOverviewEmailLabel string + ExternalRegistrationUserOverviewUsernameLabel string + ExternalRegistrationUserOverviewFirstnameLabel string + ExternalRegistrationUserOverviewLastnameLabel string + ExternalRegistrationUserOverviewNicknameLabel string + ExternalRegistrationUserOverviewLanguageLabel string + ExternalRegistrationUserOverviewPhoneLabel string + ExternalRegistrationUserOverviewTOSAndPrivacyLabel string + ExternalRegistrationUserOverviewTOSConfirm string + ExternalRegistrationUserOverviewTOSLink string + ExternalRegistrationUserOverviewTOSLinkText string + ExternalRegistrationUserOverviewTOSConfirmAnd string + ExternalRegistrationUserOverviewPrivacyLink string + ExternalRegistrationUserOverviewPrivacyLinkText string + ExternalRegistrationUserOverviewBackButtonText string + ExternalRegistrationUserOverviewNextButtonText string + RegisterOrgTitle string RegisterOrgDescription string RegisterOrgOrgNameLabel string @@ -232,6 +252,11 @@ type CustomLoginTextReadModel struct { ExternalUserNotFoundDescription string ExternalUserNotFoundLinkButtonText string ExternalUserNotFoundAutoRegisterButtonText string + ExternalUserNotFoundTOSAndPrivacyLabel string + ExternalUserNotFoundTOSConfirm string + ExternalUserNotFoundTOSLinkText string + ExternalUserNotFoundTOSConfirmAnd string + ExternalUserNotFoundPrivacyLinkText string SuccessLoginTitle string SuccessLoginAutoRedirectDescription string @@ -364,6 +389,10 @@ func (wm *CustomLoginTextReadModel) Reduce() error { wm.handleRegistrationUserScreenSetEvent(e) continue } + if strings.HasPrefix(e.Key, domain.LoginKeyExternalRegistrationUserOverview) { + wm.handleExternalRegistrationUserOverviewScreenSetEvent(e) + continue + } if strings.HasPrefix(e.Key, domain.LoginKeyRegistrationOrg) { wm.handleRegistrationOrgScreenSetEvent(e) continue @@ -500,6 +529,10 @@ func (wm *CustomLoginTextReadModel) Reduce() error { wm.handleRegistrationUserScreenRemoveEvent(e) continue } + if strings.HasPrefix(e.Key, domain.LoginKeyExternalRegistrationUserOverview) { + wm.handleExternalRegistrationUserOverviewScreenRemoveEvent(e) + continue + } if strings.HasPrefix(e.Key, domain.LoginKeyRegistrationOrg) { wm.handleRegistrationOrgScreenRemoveEvent(e) continue @@ -1652,6 +1685,10 @@ func (wm *CustomLoginTextReadModel) handlePasswordlessRegistrationDoneScreenSetE wm.PasswordlessRegistrationDoneNextButtonText = e.Text return } + if e.Key == domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText { + wm.PasswordlessRegistrationDoneCancelButtonText = e.Text + return + } } func (wm *CustomLoginTextReadModel) handlePasswordlessRegistrationDoneScreenRemoveEvent(e *policy.CustomTextRemovedEvent) { @@ -1667,6 +1704,10 @@ func (wm *CustomLoginTextReadModel) handlePasswordlessRegistrationDoneScreenRemo wm.PasswordlessRegistrationDoneNextButtonText = "" return } + if e.Key == domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText { + wm.PasswordlessRegistrationDoneCancelButtonText = "" + return + } } func (wm *CustomLoginTextReadModel) handlePasswordChangeScreenSetEvent(e *policy.CustomTextSetEvent) { @@ -1904,6 +1945,73 @@ func (wm *CustomLoginTextReadModel) handleRegistrationUserScreenSetEvent(e *poli } } +func (wm *CustomLoginTextReadModel) handleExternalRegistrationUserOverviewScreenSetEvent(e *policy.CustomTextSetEvent) { + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTitle { + wm.ExternalRegistrationUserOverviewTitle = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewDescription { + wm.ExternalRegistrationUserOverviewDescription = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewEmailLabel { + wm.ExternalRegistrationUserOverviewEmailLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel { + wm.ExternalRegistrationUserOverviewUsernameLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel { + wm.ExternalRegistrationUserOverviewFirstnameLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel { + wm.ExternalRegistrationUserOverviewLastnameLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel { + wm.ExternalRegistrationUserOverviewNicknameLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel { + wm.ExternalRegistrationUserOverviewLanguageLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel { + wm.ExternalRegistrationUserOverviewPhoneLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel { + wm.ExternalRegistrationUserOverviewTOSAndPrivacyLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm { + wm.ExternalRegistrationUserOverviewTOSConfirm = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText { + wm.ExternalRegistrationUserOverviewTOSLinkText = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd { + wm.ExternalRegistrationUserOverviewTOSConfirmAnd = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText { + wm.ExternalRegistrationUserOverviewPrivacyLinkText = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewBackButtonText { + wm.ExternalRegistrationUserOverviewBackButtonText = e.Text + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewNextButtonText { + wm.ExternalRegistrationUserOverviewNextButtonText = e.Text + return + } +} + func (wm *CustomLoginTextReadModel) handleRegistrationUserScreenRemoveEvent(e *policy.CustomTextRemovedEvent) { if e.Key == domain.LoginKeyRegistrationUserTitle { wm.RegistrationUserTitle = "" @@ -1979,6 +2087,73 @@ func (wm *CustomLoginTextReadModel) handleRegistrationUserScreenRemoveEvent(e *p } } +func (wm *CustomLoginTextReadModel) handleExternalRegistrationUserOverviewScreenRemoveEvent(e *policy.CustomTextRemovedEvent) { + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTitle { + wm.ExternalRegistrationUserOverviewTitle = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewDescription { + wm.ExternalRegistrationUserOverviewDescription = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewEmailLabel { + wm.ExternalRegistrationUserOverviewEmailLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel { + wm.ExternalRegistrationUserOverviewUsernameLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel { + wm.ExternalRegistrationUserOverviewFirstnameLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel { + wm.ExternalRegistrationUserOverviewLastnameLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel { + wm.ExternalRegistrationUserOverviewNicknameLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel { + wm.ExternalRegistrationUserOverviewLanguageLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel { + wm.ExternalRegistrationUserOverviewPhoneLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel { + wm.ExternalRegistrationUserOverviewTOSAndPrivacyLabel = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm { + wm.ExternalRegistrationUserOverviewTOSConfirm = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText { + wm.ExternalRegistrationUserOverviewTOSLinkText = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd { + wm.ExternalRegistrationUserOverviewTOSConfirmAnd = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText { + wm.ExternalRegistrationUserOverviewPrivacyLinkText = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewBackButtonText { + wm.ExternalRegistrationUserOverviewBackButtonText = "" + return + } + if e.Key == domain.LoginKeyExternalRegistrationUserOverviewNextButtonText { + wm.ExternalRegistrationUserOverviewNextButtonText = "" + return + } +} + func (wm *CustomLoginTextReadModel) handleRegistrationOrgScreenSetEvent(e *policy.CustomTextSetEvent) { if e.Key == domain.LoginKeyRegisterOrgTitle { wm.RegisterOrgTitle = e.Text @@ -2160,6 +2335,26 @@ func (wm *CustomLoginTextReadModel) handleExternalUserNotFoundScreenSetEvent(e * wm.ExternalUserNotFoundAutoRegisterButtonText = e.Text return } + if e.Key == domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel { + wm.ExternalUserNotFoundTOSAndPrivacyLabel = e.Text + return + } + if e.Key == domain.LoginKeyExternalNotFoundTOSConfirm { + wm.ExternalUserNotFoundTOSConfirm = e.Text + return + } + if e.Key == domain.LoginKeyExternalNotFoundTOSLinkText { + wm.ExternalUserNotFoundTOSLinkText = e.Text + return + } + if e.Key == domain.LoginKeyExternalNotFoundTOSConfirmAnd { + wm.ExternalUserNotFoundTOSConfirmAnd = e.Text + return + } + if e.Key == domain.LoginKeyExternalNotFoundPrivacyLinkText { + wm.ExternalUserNotFoundPrivacyLinkText = e.Text + return + } } func (wm *CustomLoginTextReadModel) handleExternalUserNotFoundScreenRemoveEvent(e *policy.CustomTextRemovedEvent) { @@ -2179,6 +2374,26 @@ func (wm *CustomLoginTextReadModel) handleExternalUserNotFoundScreenRemoveEvent( wm.ExternalUserNotFoundAutoRegisterButtonText = "" return } + if e.Key == domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel { + wm.ExternalUserNotFoundTOSAndPrivacyLabel = "" + return + } + if e.Key == domain.LoginKeyExternalNotFoundTOSLinkText { + wm.ExternalUserNotFoundTOSLinkText = "" + return + } + if e.Key == domain.LoginKeyExternalNotFoundTOSConfirm { + wm.ExternalUserNotFoundTOSConfirm = "" + return + } + if e.Key == domain.LoginKeyExternalNotFoundTOSConfirmAnd { + wm.ExternalUserNotFoundTOSConfirmAnd = "" + return + } + if e.Key == domain.LoginKeyExternalNotFoundPrivacyLinkText { + wm.ExternalUserNotFoundPrivacyLinkText = "" + return + } } func (wm *CustomLoginTextReadModel) handleSuccessLoginScreenSetEvent(e *policy.CustomTextSetEvent) { diff --git a/internal/command/iam_custom_login_text_test.go b/internal/command/iam_custom_login_text_test.go index 7db23e71cf..27e81f1b51 100644 --- a/internal/command/iam_custom_login_text_test.go +++ b/internal/command/iam_custom_login_text_test.go @@ -614,6 +614,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -788,6 +868,85 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), + ), eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), @@ -904,6 +1063,31 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -1117,6 +1301,28 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { NotSupported: "NotSupported", ErrorRetry: "ErrorRetry", }, + PasswordlessPrompt: domain.PasswordlessPromptScreenText{ + Title: "Title", + Description: "Description", + DescriptionInit: "DescriptionInit", + PasswordlessButtonText: "PasswordlessButtonText", + NextButtonText: "NextButtonText", + SkipButtonText: "SkipButtonText", + }, + PasswordlessRegistration: domain.PasswordlessRegistrationScreenText{ + Title: "Title", + Description: "Description", + RegisterTokenButtonText: "RegisterTokenButtonText", + TokenNameLabel: "TokenNameLabel", + NotSupported: "NotSupported", + ErrorRetry: "ErrorRetry", + }, + PasswordlessRegistrationDone: domain.PasswordlessRegistrationDoneScreenText{ + Title: "Title", + Description: "Description", + NextButtonText: "NextButtonText", + CancelButtonText: "CancelButtonText", + }, PasswordChange: domain.PasswordChangeScreenText{ Title: "Title", Description: "Description", @@ -1162,6 +1368,24 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { NextButtonText: "NextButtonText", BackButtonText: "BackButtonText", }, + ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{ + Title: "Title", + Description: "Description", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + NicknameLabel: "NicknameLabel", + LanguageLabel: "LanguageLabel", + PhoneLabel: "PhoneLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + BackButtonText: "BackButtonText", + NextButtonText: "NextButtonText", + }, RegistrationOrg: domain.RegistrationOrgScreenText{ Title: "Title", Description: "Description", @@ -1190,6 +1414,11 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { Description: "Description", LinkButtonText: "LinkButtonText", AutoRegisterButtonText: "AutoRegisterButtonText", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", }, LoginSuccess: domain.SuccessLoginScreenText{ Title: "Title", @@ -1782,6 +2011,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -1957,6 +2266,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, "Title", language.English, @@ -2072,6 +2461,31 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -2690,6 +3104,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, language.English, @@ -2865,6 +3359,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, language.English, @@ -2980,6 +3554,31 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, language.English, @@ -3042,37 +3641,41 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { args: args{ ctx: context.Background(), config: &domain.CustomLoginText{ - Language: language.English, - SelectAccount: domain.SelectAccountScreenText{}, - Login: domain.LoginScreenText{}, - Password: domain.PasswordScreenText{}, - UsernameChange: domain.UsernameChangeScreenText{}, - UsernameChangeDone: domain.UsernameChangeDoneScreenText{}, - InitPassword: domain.InitPasswordScreenText{}, - InitPasswordDone: domain.InitPasswordDoneScreenText{}, - EmailVerification: domain.EmailVerificationScreenText{}, - EmailVerificationDone: domain.EmailVerificationDoneScreenText{}, - InitUser: domain.InitializeUserScreenText{}, - InitUserDone: domain.InitializeUserDoneScreenText{}, - InitMFAPrompt: domain.InitMFAPromptScreenText{}, - InitMFAOTP: domain.InitMFAOTPScreenText{}, - InitMFAU2F: domain.InitMFAU2FScreenText{}, - InitMFADone: domain.InitMFADoneScreenText{}, - MFAProvider: domain.MFAProvidersText{}, - VerifyMFAOTP: domain.VerifyMFAOTPScreenText{}, - VerifyMFAU2F: domain.VerifyMFAU2FScreenText{}, - Passwordless: domain.PasswordlessScreenText{}, - PasswordChange: domain.PasswordChangeScreenText{}, - PasswordChangeDone: domain.PasswordChangeDoneScreenText{}, - PasswordResetDone: domain.PasswordResetDoneScreenText{}, - RegisterOption: domain.RegistrationOptionScreenText{}, - RegistrationUser: domain.RegistrationUserScreenText{}, - RegistrationOrg: domain.RegistrationOrgScreenText{}, - LinkingUsersDone: domain.LinkingUserDoneScreenText{}, - ExternalNotFoundOption: domain.ExternalUserNotFoundScreenText{}, - LoginSuccess: domain.SuccessLoginScreenText{}, - LogoutDone: domain.LogoutDoneScreenText{}, - Footer: domain.FooterText{}, + Language: language.English, + SelectAccount: domain.SelectAccountScreenText{}, + Login: domain.LoginScreenText{}, + Password: domain.PasswordScreenText{}, + UsernameChange: domain.UsernameChangeScreenText{}, + UsernameChangeDone: domain.UsernameChangeDoneScreenText{}, + InitPassword: domain.InitPasswordScreenText{}, + InitPasswordDone: domain.InitPasswordDoneScreenText{}, + EmailVerification: domain.EmailVerificationScreenText{}, + EmailVerificationDone: domain.EmailVerificationDoneScreenText{}, + InitUser: domain.InitializeUserScreenText{}, + InitUserDone: domain.InitializeUserDoneScreenText{}, + InitMFAPrompt: domain.InitMFAPromptScreenText{}, + InitMFAOTP: domain.InitMFAOTPScreenText{}, + InitMFAU2F: domain.InitMFAU2FScreenText{}, + InitMFADone: domain.InitMFADoneScreenText{}, + MFAProvider: domain.MFAProvidersText{}, + VerifyMFAOTP: domain.VerifyMFAOTPScreenText{}, + VerifyMFAU2F: domain.VerifyMFAU2FScreenText{}, + Passwordless: domain.PasswordlessScreenText{}, + PasswordlessPrompt: domain.PasswordlessPromptScreenText{}, + PasswordlessRegistration: domain.PasswordlessRegistrationScreenText{}, + PasswordlessRegistrationDone: domain.PasswordlessRegistrationDoneScreenText{}, + PasswordChange: domain.PasswordChangeScreenText{}, + PasswordChangeDone: domain.PasswordChangeDoneScreenText{}, + PasswordResetDone: domain.PasswordResetDoneScreenText{}, + RegisterOption: domain.RegistrationOptionScreenText{}, + RegistrationUser: domain.RegistrationUserScreenText{}, + ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{}, + RegistrationOrg: domain.RegistrationOrgScreenText{}, + LinkingUsersDone: domain.LinkingUserDoneScreenText{}, + ExternalNotFoundOption: domain.ExternalUserNotFoundScreenText{}, + LoginSuccess: domain.SuccessLoginScreenText{}, + LogoutDone: domain.LogoutDoneScreenText{}, + Footer: domain.FooterText{}, }, }, res: res{ @@ -3647,6 +4250,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -3822,6 +4505,87 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), ), + + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, "Title", language.English, @@ -3937,6 +4701,31 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -4552,6 +5341,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, language.English, @@ -4727,6 +5596,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, language.English, @@ -4842,6 +5791,31 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextRemovedEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextRemovedEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, language.English, @@ -5460,6 +6434,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -5635,6 +6689,86 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, "Title", language.English, @@ -5750,6 +6884,31 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + iam.NewCustomTextSetEvent(context.Background(), + &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( iam.NewCustomTextSetEvent(context.Background(), &iam.NewAggregate().Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -5963,6 +7122,28 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { NotSupported: "NotSupported", ErrorRetry: "ErrorRetry", }, + PasswordlessPrompt: domain.PasswordlessPromptScreenText{ + Title: "Title", + Description: "Description", + DescriptionInit: "DescriptionInit", + PasswordlessButtonText: "PasswordlessButtonText", + NextButtonText: "NextButtonText", + SkipButtonText: "SkipButtonText", + }, + PasswordlessRegistration: domain.PasswordlessRegistrationScreenText{ + Title: "Title", + Description: "Description", + RegisterTokenButtonText: "RegisterTokenButtonText", + TokenNameLabel: "TokenNameLabel", + NotSupported: "NotSupported", + ErrorRetry: "ErrorRetry", + }, + PasswordlessRegistrationDone: domain.PasswordlessRegistrationDoneScreenText{ + Title: "Title", + Description: "Description", + NextButtonText: "NextButtonText", + CancelButtonText: "CancelButtonText", + }, PasswordChange: domain.PasswordChangeScreenText{ Title: "Title", Description: "Description", @@ -6008,6 +7189,24 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { NextButtonText: "NextButtonText", BackButtonText: "BackButtonText", }, + ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{ + Title: "Title", + Description: "Description", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + LanguageLabel: "LanguageLabel", + NicknameLabel: "NicknameLabel", + PhoneLabel: "PhoneLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + BackButtonText: "BackButtonText", + NextButtonText: "NextButtonText", + }, RegistrationOrg: domain.RegistrationOrgScreenText{ Title: "Title", Description: "Description", @@ -6036,6 +7235,11 @@ func TestCommandSide_SetCustomIAMLoginText(t *testing.T) { Description: "Description", LinkButtonText: "LinkButtonText", AutoRegisterButtonText: "AutoRegisterButtonText", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", }, LoginSuccess: domain.SuccessLoginScreenText{ Title: "Title", diff --git a/internal/command/org_custom_login_text_test.go b/internal/command/org_custom_login_text_test.go index b9f8d8688a..34a930cc63 100644 --- a/internal/command/org_custom_login_text_test.go +++ b/internal/command/org_custom_login_text_test.go @@ -631,6 +631,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -806,6 +886,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, "Title", language.English, @@ -921,6 +1081,31 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -1135,6 +1320,28 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { NotSupported: "NotSupported", ErrorRetry: "ErrorRetry", }, + PasswordlessPrompt: domain.PasswordlessPromptScreenText{ + Title: "Title", + Description: "Description", + DescriptionInit: "DescriptionInit", + PasswordlessButtonText: "PasswordlessButtonText", + NextButtonText: "NextButtonText", + SkipButtonText: "SkipButtonText", + }, + PasswordlessRegistration: domain.PasswordlessRegistrationScreenText{ + Title: "Title", + Description: "Description", + RegisterTokenButtonText: "RegisterTokenButtonText", + TokenNameLabel: "TokenNameLabel", + NotSupported: "NotSupported", + ErrorRetry: "ErrorRetry", + }, + PasswordlessRegistrationDone: domain.PasswordlessRegistrationDoneScreenText{ + Title: "Title", + Description: "Description", + NextButtonText: "NextButtonText", + CancelButtonText: "CancelButtonText", + }, PasswordChange: domain.PasswordChangeScreenText{ Title: "Title", Description: "Description", @@ -1180,6 +1387,24 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { NextButtonText: "NextButtonText", BackButtonText: "BackButtonText", }, + ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{ + Title: "Title", + Description: "Description", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + NicknameLabel: "NicknameLabel", + LanguageLabel: "LanguageLabel", + PhoneLabel: "PhoneLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + BackButtonText: "BackButtonText", + NextButtonText: "NextButtonText", + }, RegistrationOrg: domain.RegistrationOrgScreenText{ Title: "Title", Description: "Description", @@ -1208,6 +1433,11 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { Description: "Description", LinkButtonText: "LinkButtonText", AutoRegisterButtonText: "AutoRegisterButtonText", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", }, LoginSuccess: domain.SuccessLoginScreenText{ Title: "Title", @@ -1800,6 +2030,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -1975,6 +2285,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, "Title", language.English, @@ -2090,6 +2480,31 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -2708,6 +3123,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, language.English, ), ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, language.English, + ), + ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, language.English, @@ -2883,6 +3378,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, language.English, ), ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, language.English, + ), + ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, language.English, @@ -2998,6 +3573,31 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, language.English, ), ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, language.English, + ), + ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, language.English, @@ -3061,37 +3661,41 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { ctx: context.Background(), resourceOwner: "org1", config: &domain.CustomLoginText{ - Language: language.English, - SelectAccount: domain.SelectAccountScreenText{}, - Login: domain.LoginScreenText{}, - Password: domain.PasswordScreenText{}, - UsernameChange: domain.UsernameChangeScreenText{}, - UsernameChangeDone: domain.UsernameChangeDoneScreenText{}, - InitPassword: domain.InitPasswordScreenText{}, - InitPasswordDone: domain.InitPasswordDoneScreenText{}, - EmailVerification: domain.EmailVerificationScreenText{}, - EmailVerificationDone: domain.EmailVerificationDoneScreenText{}, - InitUser: domain.InitializeUserScreenText{}, - InitUserDone: domain.InitializeUserDoneScreenText{}, - InitMFAPrompt: domain.InitMFAPromptScreenText{}, - InitMFAOTP: domain.InitMFAOTPScreenText{}, - InitMFAU2F: domain.InitMFAU2FScreenText{}, - InitMFADone: domain.InitMFADoneScreenText{}, - MFAProvider: domain.MFAProvidersText{}, - VerifyMFAOTP: domain.VerifyMFAOTPScreenText{}, - VerifyMFAU2F: domain.VerifyMFAU2FScreenText{}, - Passwordless: domain.PasswordlessScreenText{}, - PasswordChange: domain.PasswordChangeScreenText{}, - PasswordChangeDone: domain.PasswordChangeDoneScreenText{}, - PasswordResetDone: domain.PasswordResetDoneScreenText{}, - RegisterOption: domain.RegistrationOptionScreenText{}, - RegistrationUser: domain.RegistrationUserScreenText{}, - RegistrationOrg: domain.RegistrationOrgScreenText{}, - LinkingUsersDone: domain.LinkingUserDoneScreenText{}, - ExternalNotFoundOption: domain.ExternalUserNotFoundScreenText{}, - LoginSuccess: domain.SuccessLoginScreenText{}, - LogoutDone: domain.LogoutDoneScreenText{}, - Footer: domain.FooterText{}, + Language: language.English, + SelectAccount: domain.SelectAccountScreenText{}, + Login: domain.LoginScreenText{}, + Password: domain.PasswordScreenText{}, + UsernameChange: domain.UsernameChangeScreenText{}, + UsernameChangeDone: domain.UsernameChangeDoneScreenText{}, + InitPassword: domain.InitPasswordScreenText{}, + InitPasswordDone: domain.InitPasswordDoneScreenText{}, + EmailVerification: domain.EmailVerificationScreenText{}, + EmailVerificationDone: domain.EmailVerificationDoneScreenText{}, + InitUser: domain.InitializeUserScreenText{}, + InitUserDone: domain.InitializeUserDoneScreenText{}, + InitMFAPrompt: domain.InitMFAPromptScreenText{}, + InitMFAOTP: domain.InitMFAOTPScreenText{}, + InitMFAU2F: domain.InitMFAU2FScreenText{}, + InitMFADone: domain.InitMFADoneScreenText{}, + MFAProvider: domain.MFAProvidersText{}, + VerifyMFAOTP: domain.VerifyMFAOTPScreenText{}, + VerifyMFAU2F: domain.VerifyMFAU2FScreenText{}, + Passwordless: domain.PasswordlessScreenText{}, + PasswordlessPrompt: domain.PasswordlessPromptScreenText{}, + PasswordlessRegistration: domain.PasswordlessRegistrationScreenText{}, + PasswordlessRegistrationDone: domain.PasswordlessRegistrationDoneScreenText{}, + PasswordChange: domain.PasswordChangeScreenText{}, + PasswordChangeDone: domain.PasswordChangeDoneScreenText{}, + PasswordResetDone: domain.PasswordResetDoneScreenText{}, + RegisterOption: domain.RegistrationOptionScreenText{}, + ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{}, + RegistrationUser: domain.RegistrationUserScreenText{}, + RegistrationOrg: domain.RegistrationOrgScreenText{}, + LinkingUsersDone: domain.LinkingUserDoneScreenText{}, + ExternalNotFoundOption: domain.ExternalUserNotFoundScreenText{}, + LoginSuccess: domain.SuccessLoginScreenText{}, + LogoutDone: domain.LogoutDoneScreenText{}, + Footer: domain.FooterText{}, }, }, res: res{ @@ -3666,6 +4270,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -3841,6 +4525,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, "Title", language.English, @@ -3956,6 +4720,31 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -4571,6 +5360,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, language.English, ), ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, language.English, + ), + ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, language.English, @@ -4746,6 +5615,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, language.English, ), ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, language.English, + ), + ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, language.English, @@ -4861,6 +5810,31 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, language.English, ), ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextRemovedEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, language.English, + ), + ), eventFromEventPusher( org.NewCustomTextRemovedEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, language.English, @@ -5479,6 +6453,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessErrorRetry, "ErrorRetry", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptDescriptionInit, "DescriptionInit", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptPasswordlessButtonText, "PasswordlessButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessPromptSkipButtonText, "SkipButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationRegisterTokenButtonText, "RegisterTokenButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationTokenNameLabel, "TokenNameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationNotSupported, "NotSupported", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationErrorRetry, "ErrorRetry", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneNextButtonText, "NextButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText, "CancelButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyPasswordChangeTitle, "Title", language.English, @@ -5654,6 +6708,86 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegistrationUserBackButtonText, "BackButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTitle, "Title", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewDescription, "Description", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewEmailLabel, "EmailLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewUsernameLabel, "UsernameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewFirstnameLabel, "FirstnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLastnameLabel, "LastnameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNicknameLabel, "NicknameLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewLanguageLabel, "LanguageLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPhoneLabel, "PhoneLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewBackButtonText, "BackButtonText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalRegistrationUserOverviewNextButtonText, "NextButtonText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyRegisterOrgTitle, "Title", language.English, @@ -5769,6 +6903,31 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundAutoRegisterButtonText, "AutoRegisterButtonText", language.English, ), ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel, "TOSAndPrivacyLabel", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirm, "TOSConfirm", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSLinkText, "TOSLinkText", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundTOSConfirmAnd, "TOSConfirmAnd", language.English, + ), + ), + eventFromEventPusher( + org.NewCustomTextSetEvent(context.Background(), + &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeyExternalNotFoundPrivacyLinkText, "PrivacyLinkText", language.English, + ), + ), eventFromEventPusher( org.NewCustomTextSetEvent(context.Background(), &org.NewAggregate("org1", "org1").Aggregate, domain.LoginCustomText, domain.LoginKeySuccessLoginTitle, "Title", language.English, @@ -5983,6 +7142,28 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { NotSupported: "NotSupported", ErrorRetry: "ErrorRetry", }, + PasswordlessPrompt: domain.PasswordlessPromptScreenText{ + Title: "Title", + Description: "Description", + DescriptionInit: "DescriptionInit", + PasswordlessButtonText: "PasswordlessButtonText", + NextButtonText: "NextButtonText", + SkipButtonText: "SkipButtonText", + }, + PasswordlessRegistration: domain.PasswordlessRegistrationScreenText{ + Title: "Title", + Description: "Description", + RegisterTokenButtonText: "RegisterTokenButtonText", + TokenNameLabel: "TokenNameLabel", + NotSupported: "NotSupported", + ErrorRetry: "ErrorRetry", + }, + PasswordlessRegistrationDone: domain.PasswordlessRegistrationDoneScreenText{ + Title: "Title", + Description: "Description", + NextButtonText: "NextButtonText", + CancelButtonText: "CancelButtonText", + }, PasswordChange: domain.PasswordChangeScreenText{ Title: "Title", Description: "Description", @@ -6028,6 +7209,24 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { NextButtonText: "NextButtonText", BackButtonText: "BackButtonText", }, + ExternalRegistrationUserOverview: domain.ExternalRegistrationUserOverviewScreenText{ + Title: "Title", + Description: "Description", + EmailLabel: "EmailLabel", + UsernameLabel: "UsernameLabel", + FirstnameLabel: "FirstnameLabel", + LastnameLabel: "LastnameLabel", + NicknameLabel: "NicknameLabel", + LanguageLabel: "LanguageLabel", + PhoneLabel: "PhoneLabel", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", + NextButtonText: "NextButtonText", + BackButtonText: "BackButtonText", + }, RegistrationOrg: domain.RegistrationOrgScreenText{ Title: "Title", Description: "Description", @@ -6056,6 +7255,11 @@ func TestCommandSide_SetCustomOrgLoginText(t *testing.T) { Description: "Description", LinkButtonText: "LinkButtonText", AutoRegisterButtonText: "AutoRegisterButtonText", + TOSAndPrivacyLabel: "TOSAndPrivacyLabel", + TOSConfirm: "TOSConfirm", + TOSLinkText: "TOSLinkText", + TOSConfirmAnd: "TOSConfirmAnd", + PrivacyLinkText: "PrivacyLinkText", }, LoginSuccess: domain.SuccessLoginScreenText{ Title: "Title", diff --git a/internal/command/user_human.go b/internal/command/user_human.go index b33150aa7f..9b9be94424 100644 --- a/internal/command/user_human.go +++ b/internal/command/user_human.go @@ -206,7 +206,7 @@ func (c *Commands) createHuman(ctx context.Context, orgID string, human *domain. events = append(events, event) } - if human.IsInitialState(passwordless) { + if human.IsInitialState(passwordless, externalIDP != nil) { initCode, err := domain.NewInitUserCode(c.initializeUserCode) if err != nil { return nil, nil, err diff --git a/internal/domain/custom_login_text.go b/internal/domain/custom_login_text.go index a39c1b425e..56c01ff428 100644 --- a/internal/domain/custom_login_text.go +++ b/internal/domain/custom_login_text.go @@ -175,10 +175,11 @@ const ( LoginKeyPasswordlessRegistrationNotSupported = LoginKeyPasswordlessRegistration + "NotSupported" LoginKeyPasswordlessRegistrationErrorRetry = LoginKeyPasswordlessRegistration + "ErrorRetry" - LoginKeyPasswordlessRegistrationDone = "PasswordlessRegistrationDone." - LoginKeyPasswordlessRegistrationDoneTitle = LoginKeyPasswordlessRegistrationDone + "Title" - LoginKeyPasswordlessRegistrationDoneDescription = LoginKeyPasswordlessRegistrationDone + "Description" - LoginKeyPasswordlessRegistrationDoneNextButtonText = LoginKeyPasswordlessRegistrationDone + "NextButtonText" + LoginKeyPasswordlessRegistrationDone = "PasswordlessRegistrationDone." + LoginKeyPasswordlessRegistrationDoneTitle = LoginKeyPasswordlessRegistrationDone + "Title" + LoginKeyPasswordlessRegistrationDoneDescription = LoginKeyPasswordlessRegistrationDone + "Description" + LoginKeyPasswordlessRegistrationDoneNextButtonText = LoginKeyPasswordlessRegistrationDone + "NextButtonText" + LoginKeyPasswordlessRegistrationDoneCancelButtonText = LoginKeyPasswordlessRegistrationDone + "CancelButtonText" LoginKeyPasswordChange = "PasswordChange." LoginKeyPasswordChangeTitle = LoginKeyPasswordChange + "Title" @@ -225,6 +226,24 @@ const ( LoginKeyRegistrationUserNextButtonText = LoginKeyRegistrationUser + "NextButtonText" LoginKeyRegistrationUserBackButtonText = LoginKeyRegistrationUser + "BackButtonText" + LoginKeyExternalRegistrationUserOverview = "ExternalRegistrationUserOverview." + LoginKeyExternalRegistrationUserOverviewTitle = LoginKeyExternalRegistrationUserOverview + "Title" + LoginKeyExternalRegistrationUserOverviewDescription = LoginKeyExternalRegistrationUserOverview + "Description" + LoginKeyExternalRegistrationUserOverviewEmailLabel = LoginKeyExternalRegistrationUserOverview + "EmailLabel" + LoginKeyExternalRegistrationUserOverviewUsernameLabel = LoginKeyExternalRegistrationUserOverview + "UsernameLabel" + LoginKeyExternalRegistrationUserOverviewFirstnameLabel = LoginKeyExternalRegistrationUserOverview + "FirstnameLabel" + LoginKeyExternalRegistrationUserOverviewLastnameLabel = LoginKeyExternalRegistrationUserOverview + "LastnameLabel" + LoginKeyExternalRegistrationUserOverviewNicknameLabel = LoginKeyExternalRegistrationUserOverview + "NicknameLabel" + LoginKeyExternalRegistrationUserOverviewPhoneLabel = LoginKeyExternalRegistrationUserOverview + "PhoneLabel" + LoginKeyExternalRegistrationUserOverviewLanguageLabel = LoginKeyExternalRegistrationUserOverview + "LanguageLabel" + LoginKeyExternalRegistrationUserOverviewTOSAndPrivacyLabel = LoginKeyExternalRegistrationUserOverview + "TosAndPrivacyLabel" + LoginKeyExternalRegistrationUserOverviewTOSConfirm = LoginKeyExternalRegistrationUserOverview + "TosConfirm" + LoginKeyExternalRegistrationUserOverviewTOSLinkText = LoginKeyExternalRegistrationUserOverview + "TosLinkText" + LoginKeyExternalRegistrationUserOverviewTOSConfirmAnd = LoginKeyExternalRegistrationUserOverview + "TosConfirmAnd" + LoginKeyExternalRegistrationUserOverviewPrivacyLinkText = LoginKeyExternalRegistrationUserOverview + "PrivacyLinkText" + LoginKeyExternalRegistrationUserOverviewBackButtonText = LoginKeyExternalRegistrationUserOverview + "BackButtonText" + LoginKeyExternalRegistrationUserOverviewNextButtonText = LoginKeyExternalRegistrationUserOverview + "NextButtonText" + LoginKeyRegistrationOrg = "RegistrationOrg." LoginKeyRegisterOrgTitle = LoginKeyRegistrationOrg + "Title" LoginKeyRegisterOrgDescription = LoginKeyRegistrationOrg + "Description" @@ -253,6 +272,11 @@ const ( LoginKeyExternalNotFoundDescription = LoginKeyExternalNotFound + "Description" LoginKeyExternalNotFoundLinkButtonText = LoginKeyExternalNotFound + "LinkButtonText" LoginKeyExternalNotFoundAutoRegisterButtonText = LoginKeyExternalNotFound + "AutoRegisterButtonText" + LoginKeyExternalNotFoundTOSAndPrivacyLabel = LoginKeyExternalNotFound + "TosAndPrivacyLabel" + LoginKeyExternalNotFoundTOSConfirm = LoginKeyExternalNotFound + "TosConfirm" + LoginKeyExternalNotFoundTOSLinkText = LoginKeyExternalNotFound + "TosLinkText" + LoginKeyExternalNotFoundTOSConfirmAnd = LoginKeyExternalNotFound + "TosConfirmAnd" + LoginKeyExternalNotFoundPrivacyLinkText = LoginKeyExternalNotFound + "PrivacyLinkText" LoginKeySuccessLogin = "LoginSuccess." LoginKeySuccessLoginTitle = LoginKeySuccessLogin + "Title" @@ -279,39 +303,40 @@ type CustomLoginText struct { Default bool Language language.Tag - SelectAccount SelectAccountScreenText - Login LoginScreenText - Password PasswordScreenText - UsernameChange UsernameChangeScreenText - UsernameChangeDone UsernameChangeDoneScreenText - InitPassword InitPasswordScreenText - InitPasswordDone InitPasswordDoneScreenText - EmailVerification EmailVerificationScreenText - EmailVerificationDone EmailVerificationDoneScreenText - InitUser InitializeUserScreenText - InitUserDone InitializeUserDoneScreenText - InitMFAPrompt InitMFAPromptScreenText - InitMFAOTP InitMFAOTPScreenText - InitMFAU2F InitMFAU2FScreenText - InitMFADone InitMFADoneScreenText - MFAProvider MFAProvidersText - VerifyMFAOTP VerifyMFAOTPScreenText - VerifyMFAU2F VerifyMFAU2FScreenText - Passwordless PasswordlessScreenText - PasswordlessPrompt PasswordlessPromptScreenText - PasswordlessRegistration PasswordlessRegistrationScreenText - PasswordlessRegistrationDone PasswordlessRegistrationDoneScreenText - PasswordChange PasswordChangeScreenText - PasswordChangeDone PasswordChangeDoneScreenText - PasswordResetDone PasswordResetDoneScreenText - RegisterOption RegistrationOptionScreenText - RegistrationUser RegistrationUserScreenText - RegistrationOrg RegistrationOrgScreenText - LinkingUsersDone LinkingUserDoneScreenText - ExternalNotFoundOption ExternalUserNotFoundScreenText - LoginSuccess SuccessLoginScreenText - LogoutDone LogoutDoneScreenText - Footer FooterText + SelectAccount SelectAccountScreenText + Login LoginScreenText + Password PasswordScreenText + UsernameChange UsernameChangeScreenText + UsernameChangeDone UsernameChangeDoneScreenText + InitPassword InitPasswordScreenText + InitPasswordDone InitPasswordDoneScreenText + EmailVerification EmailVerificationScreenText + EmailVerificationDone EmailVerificationDoneScreenText + InitUser InitializeUserScreenText + InitUserDone InitializeUserDoneScreenText + InitMFAPrompt InitMFAPromptScreenText + InitMFAOTP InitMFAOTPScreenText + InitMFAU2F InitMFAU2FScreenText + InitMFADone InitMFADoneScreenText + MFAProvider MFAProvidersText + VerifyMFAOTP VerifyMFAOTPScreenText + VerifyMFAU2F VerifyMFAU2FScreenText + Passwordless PasswordlessScreenText + PasswordlessPrompt PasswordlessPromptScreenText + PasswordlessRegistration PasswordlessRegistrationScreenText + PasswordlessRegistrationDone PasswordlessRegistrationDoneScreenText + PasswordChange PasswordChangeScreenText + PasswordChangeDone PasswordChangeDoneScreenText + PasswordResetDone PasswordResetDoneScreenText + RegisterOption RegistrationOptionScreenText + RegistrationUser RegistrationUserScreenText + ExternalRegistrationUserOverview ExternalRegistrationUserOverviewScreenText + RegistrationOrg RegistrationOrgScreenText + LinkingUsersDone LinkingUserDoneScreenText + ExternalNotFoundOption ExternalUserNotFoundScreenText + LoginSuccess SuccessLoginScreenText + LogoutDone LogoutDoneScreenText + Footer FooterText } func (m *CustomLoginText) IsValid() bool { @@ -537,6 +562,25 @@ type RegistrationUserScreenText struct { BackButtonText string } +type ExternalRegistrationUserOverviewScreenText struct { + Title string + Description string + EmailLabel string + UsernameLabel string + FirstnameLabel string + LastnameLabel string + NicknameLabel string + LanguageLabel string + PhoneLabel string + TOSAndPrivacyLabel string + TOSConfirm string + TOSLinkText string + TOSConfirmAnd string + PrivacyLinkText string + BackButtonText string + NextButtonText string +} + type RegistrationOrgScreenText struct { Title string Description string @@ -567,6 +611,11 @@ type ExternalUserNotFoundScreenText struct { Description string LinkButtonText string AutoRegisterButtonText string + TOSAndPrivacyLabel string + TOSConfirm string + TOSLinkText string + TOSConfirmAnd string + PrivacyLinkText string } type SuccessLoginScreenText struct { @@ -608,7 +657,8 @@ type PasswordlessRegistrationScreenText struct { } type PasswordlessRegistrationDoneScreenText struct { - Title string - Description string - NextButtonText string + Title string + Description string + NextButtonText string + CancelButtonText string } diff --git a/internal/domain/human.go b/internal/domain/human.go index bf109fe3df..429ffeea47 100644 --- a/internal/domain/human.go +++ b/internal/domain/human.go @@ -18,7 +18,6 @@ type Human struct { *Email *Phone *Address - ExternalIDPs []*ExternalIDP } func (h Human) GetUsername() string { @@ -79,8 +78,8 @@ func (u *Human) HashPasswordIfExisting(policy *PasswordComplexityPolicy, passwor return nil } -func (u *Human) IsInitialState(passwordless bool) bool { - return u.Email == nil || !u.IsEmailVerified || (u.ExternalIDPs == nil || len(u.ExternalIDPs) == 0) && !passwordless && (u.Password == nil || u.SecretString == "") +func (u *Human) IsInitialState(passwordless, externalIDPs bool) bool { + return u.Email == nil || !u.IsEmailVerified || !externalIDPs && !passwordless && (u.Password == nil || u.SecretString == "") } func NewInitUserCode(generator crypto.Generator) (*InitUserCode, error) { diff --git a/internal/iam/repository/view/model/custom_text.go b/internal/iam/repository/view/model/custom_text.go index d6665d25ce..193c109ab8 100644 --- a/internal/iam/repository/view/model/custom_text.go +++ b/internal/iam/repository/view/model/custom_text.go @@ -700,6 +700,9 @@ func passwordlessRegistrationDoneKeyToDomain(text *CustomTextView, result *domai if text.Key == domain.LoginKeyPasswordlessRegistrationDoneNextButtonText { result.PasswordlessRegistrationDone.NextButtonText = text.Text } + if text.Key == domain.LoginKeyPasswordlessRegistrationDoneCancelButtonText { + result.PasswordlessRegistrationDone.CancelButtonText = text.Text + } } func passwordChangeKeyToDomain(text *CustomTextView, result *domain.CustomLoginText) { @@ -898,6 +901,21 @@ func externalUserNotFoundKeyToDomain(text *CustomTextView, result *domain.Custom if text.Key == domain.LoginKeyExternalNotFoundAutoRegisterButtonText { result.ExternalNotFoundOption.AutoRegisterButtonText = text.Text } + if text.Key == domain.LoginKeyExternalNotFoundTOSAndPrivacyLabel { + result.ExternalNotFoundOption.TOSAndPrivacyLabel = text.Text + } + if text.Key == domain.LoginKeyExternalNotFoundTOSConfirm { + result.ExternalNotFoundOption.TOSConfirm = text.Text + } + if text.Key == domain.LoginKeyExternalNotFoundTOSLinkText { + result.ExternalNotFoundOption.TOSLinkText = text.Text + } + if text.Key == domain.LoginKeyExternalNotFoundTOSConfirmAnd { + result.ExternalNotFoundOption.TOSConfirmAnd = text.Text + } + if text.Key == domain.LoginKeyExternalNotFoundPrivacyLinkText { + result.ExternalNotFoundOption.PrivacyLinkText = text.Text + } } func successLoginKeyToDomain(text *CustomTextView, result *domain.CustomLoginText) { diff --git a/internal/ui/login/handler/external_login_handler.go b/internal/ui/login/handler/external_login_handler.go index 55642053bd..0fbf71f470 100644 --- a/internal/ui/login/handler/external_login_handler.go +++ b/internal/ui/login/handler/external_login_handler.go @@ -1,6 +1,10 @@ package handler import ( + "net/http" + "strings" + "time" + "github.com/caos/oidc/pkg/client/rp" "github.com/caos/oidc/pkg/oidc" "golang.org/x/oauth2" @@ -11,9 +15,6 @@ import ( "github.com/caos/zitadel/internal/errors" caos_errors "github.com/caos/zitadel/internal/errors" iam_model "github.com/caos/zitadel/internal/iam/model" - "net/http" - "strings" - "time" ) const ( @@ -34,6 +35,7 @@ type externalNotFoundOptionFormData struct { Link bool `schema:"link"` AutoRegister bool `schema:"autoregister"` ResetLinking bool `schema:"resetlinking"` + TermsConfirm bool `schema:"terms-confirm"` } type externalNotFoundOptionData struct { diff --git a/internal/ui/login/handler/external_register_handler.go b/internal/ui/login/handler/external_register_handler.go index ab805f573d..6ff1c02113 100644 --- a/internal/ui/login/handler/external_register_handler.go +++ b/internal/ui/login/handler/external_register_handler.go @@ -6,6 +6,7 @@ import ( "github.com/caos/oidc/pkg/client/rp" "github.com/caos/oidc/pkg/oidc" + "golang.org/x/text/language" http_mw "github.com/caos/zitadel/internal/api/http/middleware" "github.com/caos/zitadel/internal/domain" @@ -13,6 +14,42 @@ import ( iam_model "github.com/caos/zitadel/internal/iam/model" ) +const ( + tmplExternalRegisterOverview = "externalregisteroverview" +) + +type externalRegisterFormData struct { + ExternalIDPConfigID string `schema:"external-idp-config-id"` + ExternalIDPExtUserID string `schema:"external-idp-ext-user-id"` + ExternalIDPDisplayName string `schema:"external-idp-display-name"` + ExternalEmail string `schema:"external-email"` + ExternalEmailVerified bool `schema:"external-email-verified"` + Email string `schema:"email"` + Username string `schema:"username"` + Firstname string `schema:"firstname"` + Lastname string `schema:"lastname"` + Nickname string `schema:"nickname"` + ExternalPhone string `schema:"external-phone"` + ExternalPhoneVerified bool `schema:"external-phone-verified"` + Phone string `schema:"phone"` + Language string `schema:"language"` + TermsConfirm bool `schema:"terms-confirm"` +} + +type externalRegisterData struct { + baseData + externalRegisterFormData + ExternalIDPID string + ExternalIDPUserID string + ExternalIDPUserDisplayName string + ShowUsername bool + OrgRegister bool + ExternalEmail string + ExternalEmailVerified bool + ExternalPhone string + ExternalPhoneVerified bool +} + func (l *Login) handleExternalRegister(w http.ResponseWriter, r *http.Request) { data := new(externalIDPData) authReq, err := l.getAuthRequestAndParseData(r, data) @@ -76,18 +113,77 @@ func (l *Login) handleExternalUserRegister(w http.ResponseWriter, r *http.Reques return } resourceOwner := iam.GlobalOrgID - memberRoles := []string{domain.RoleOrgProjectCreator} - - if authReq.RequestedOrgID != "" && authReq.RequestedOrgID != iam.GlobalOrgID { - memberRoles = nil - resourceOwner = authReq.RequestedOrgID - } orgIamPolicy, err := l.getOrgIamPolicy(r, resourceOwner) if err != nil { l.renderRegisterOption(w, r, authReq, err) return } user, externalIDP := l.mapTokenToLoginHumanAndExternalIDP(orgIamPolicy, tokens, idpConfig) + l.renderExternalRegisterOverview(w, r, authReq, orgIamPolicy, user, externalIDP, nil) +} + +func (l *Login) renderExternalRegisterOverview(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, orgIAMPolicy *iam_model.OrgIAMPolicyView, human *domain.Human, idp *domain.ExternalIDP, err error) { + var errID, errMessage string + if err != nil { + errID, errMessage = l.getErrorMessage(r, err) + } + data := externalRegisterData{ + baseData: l.getBaseData(r, authReq, "ExternalRegisterOverview", errID, errMessage), + externalRegisterFormData: externalRegisterFormData{ + Email: human.EmailAddress, + Username: human.PreferredLoginName, + Firstname: human.FirstName, + Lastname: human.LastName, + Nickname: human.NickName, + Language: human.PreferredLanguage.String(), + }, + ExternalIDPID: idp.IDPConfigID, + ExternalIDPUserID: idp.ExternalUserID, + ExternalIDPUserDisplayName: idp.DisplayName, + ExternalEmail: human.EmailAddress, + ExternalEmailVerified: human.IsEmailVerified, + ShowUsername: orgIAMPolicy.UserLoginMustBeDomain, + OrgRegister: orgIAMPolicy.UserLoginMustBeDomain, + } + if human.Phone != nil { + data.Phone = human.PhoneNumber + data.ExternalPhone = human.PhoneNumber + data.ExternalPhoneVerified = human.IsPhoneVerified + } + translator := l.getTranslator(authReq) + l.renderer.RenderTemplate(w, r, translator, l.renderer.Templates[tmplExternalRegisterOverview], data, nil) +} + +func (l *Login) handleExternalRegisterCheck(w http.ResponseWriter, r *http.Request) { + data := new(externalRegisterFormData) + authReq, err := l.getAuthRequestAndParseData(r, data) + if err != nil { + l.renderError(w, r, authReq, err) + return + } + + iam, err := l.authRepo.GetIAM(r.Context()) + if err != nil { + l.renderRegisterOption(w, r, authReq, err) + return + } + resourceOwner := iam.GlobalOrgID + memberRoles := []string{domain.RoleOrgProjectCreator} + + if authReq.RequestedOrgID != "" && authReq.RequestedOrgID != iam.GlobalOrgID { + memberRoles = nil + resourceOwner = authReq.RequestedOrgID + } + externalIDP, err := l.getExternalIDP(data) + if externalIDP == nil { + l.renderRegisterOption(w, r, authReq, err) + return + } + user, err := l.mapExternalRegisterDataToUser(r, data) + if err != nil { + l.renderRegisterOption(w, r, authReq, err) + return + } _, err = l.command.RegisterHuman(setContext(r.Context(), resourceOwner), resourceOwner, user, externalIDP, memberRoles) if err != nil { l.renderRegisterOption(w, r, authReq, err) @@ -140,6 +236,9 @@ func (l *Login) mapTokenToLoginHumanAndExternalIDP(orgIamPolicy *iam_model.OrgIA displayName = tokens.IDTokenClaims.GetEmail() } } + if displayName == "" { + displayName = tokens.IDTokenClaims.GetEmail() + } externalIDP := &domain.ExternalIDP{ IDPConfigID: idpConfig.IDPConfigID, @@ -148,3 +247,43 @@ func (l *Login) mapTokenToLoginHumanAndExternalIDP(orgIamPolicy *iam_model.OrgIA } return human, externalIDP } + +func (l *Login) mapExternalRegisterDataToUser(r *http.Request, data *externalRegisterFormData) (*domain.Human, error) { + human := &domain.Human{ + Username: data.Username, + Profile: &domain.Profile{ + FirstName: data.Firstname, + LastName: data.Lastname, + PreferredLanguage: language.Make(data.Language), + NickName: data.Nickname, + }, + Email: &domain.Email{ + EmailAddress: data.Email, + }, + } + if data.ExternalEmail != data.Email { + human.IsEmailVerified = false + } else { + human.IsEmailVerified = data.ExternalEmailVerified + } + if data.ExternalPhone == "" { + return human, nil + } + human.Phone = &domain.Phone{ + PhoneNumber: data.Phone, + } + if data.ExternalPhone != data.Phone { + human.IsPhoneVerified = false + } else { + human.IsPhoneVerified = data.ExternalPhoneVerified + } + return human, nil +} + +func (l *Login) getExternalIDP(data *externalRegisterFormData) (*domain.ExternalIDP, error) { + return &domain.ExternalIDP{ + IDPConfigID: data.ExternalIDPConfigID, + ExternalUserID: data.ExternalIDPExtUserID, + DisplayName: data.ExternalIDPDisplayName, + }, nil +} diff --git a/internal/ui/login/handler/renderer.go b/internal/ui/login/handler/renderer.go index 17bf1b4713..92fe60a641 100644 --- a/internal/ui/login/handler/renderer.go +++ b/internal/ui/login/handler/renderer.go @@ -62,6 +62,7 @@ func CreateRenderer(pathPrefix string, staticDir http.FileSystem, staticStorage tmplChangePasswordDone: "change_password_done.html", tmplRegisterOption: "register_option.html", tmplRegister: "register.html", + tmplExternalRegisterOverview: "external_register_overview.html", tmplLogoutDone: "logout_done.html", tmplRegisterOrg: "register_org.html", tmplChangeUsername: "change_username.html", @@ -181,6 +182,9 @@ func CreateRenderer(pathPrefix string, staticDir http.FileSystem, staticStorage "orgRegistrationUrl": func() string { return path.Join(r.pathPrefix, EndpointRegisterOrg) }, + "externalRegistrationUrl": func() string { + return path.Join(r.pathPrefix, EndpointExternalRegister) + }, "changeUsernameUrl": func() string { return path.Join(r.pathPrefix, EndpointChangeUsername) }, diff --git a/internal/ui/login/handler/router.go b/internal/ui/login/handler/router.go index 5a501ad435..68e408a567 100644 --- a/internal/ui/login/handler/router.go +++ b/internal/ui/login/handler/router.go @@ -82,6 +82,7 @@ func CreateRouter(login *Login, staticDir http.FileSystem, interceptors ...mux.M router.HandleFunc(EndpointRegister, login.handleRegister).Methods(http.MethodGet) router.HandleFunc(EndpointRegister, login.handleRegisterCheck).Methods(http.MethodPost) router.HandleFunc(EndpointExternalRegister, login.handleExternalRegister).Methods(http.MethodGet) + router.HandleFunc(EndpointExternalRegister, login.handleExternalRegisterCheck).Methods(http.MethodPost) router.HandleFunc(EndpointExternalRegisterCallback, login.handleExternalRegisterCallback).Methods(http.MethodGet) router.HandleFunc(EndpointLogoutDone, login.handleLogoutDone).Methods(http.MethodGet) router.HandleFunc(EndpointDynamicResources, login.handleDynamicResources).Methods(http.MethodGet) diff --git a/internal/ui/login/static/i18n/de.yaml b/internal/ui/login/static/i18n/de.yaml index 7d451f3e5a..0420038a61 100644 --- a/internal/ui/login/static/i18n/de.yaml +++ b/internal/ui/login/static/i18n/de.yaml @@ -221,6 +221,26 @@ RegistrationUser: BackButtonText: zurück NextButtonText: weiter +ExternalRegistrationUserOverview: + Title: Externer Benutzer Registration + Description: Deine Benutzerangaben werden vom ausgewählten Provider übernommen. Du kannst sie hier ändern und ergänzen, bevor dein Benutzer angelegt wird. + EmailLabel: E-Mail + UsernameLabel: Benutzername + FirstnameLabel: Vorname + LastnameLabel: Nachname + NicknameLabel: Nachname + PhoneLabel: Telefonnummer + LanguageLabel: Sprache + German: Deutsch + English: English + TosAndPrivacyLabel: Allgemeine Geschäftsbedingungen und Datenschutz + TosConfirm: Ich akzeptiere die + TosLinkText: AGBs + TosConfirmAnd: und die + PrivacyLinkText: Datenschutzerklärung + BackButtonText: zurück + NextButtonText: speichern + RegistrationOrg: Title: Organisations Registration Description: Gib deinen Organisationsnamen und deine Benutzerangaben an. @@ -260,6 +280,11 @@ ExternalNotFoundOption: Description: Externer Benutzer konnte nicht gefunden werden. Willst du deinen Benutzer mit einem bestehenden verlinken oder diesen als neuen Benutzer registrieren. LinkButtonText: Verlinken AutoRegisterButtonText: Automatisches registrieren + TosAndPrivacyLabel: Allgemeine Geschäftsbedingungen und Datenschutz + TosConfirm: Ich akzeptiere die + TosLinkText: AGBs + TosConfirmAnd: und die + PrivacyLinkText: Datenschutzerklärung Footer: PoweredBy: Powered By @@ -305,6 +330,8 @@ Errors: GeneratorAlgNotSupported: Generator Algorithums wird nicht unterstützt EmailVerify: UserIDEmpty: UserID ist leer + ExternalData: + CouldNotRead: Externe Daten konnten nicht korrekt gelesen werden MFA: NoProviders: Es stehen keine Multifaktorprovider zur Verfügung OTP: @@ -318,6 +345,9 @@ Errors: ExternalIDP: IDPTypeNotImplemented: IDP Typ ist nicht implementiert NotAllowed: Externer Login Provider ist nicht erlaubt + IDPConfigIDEmpty: Identity Provider ID ist leer + ExternalUserIDEmpty: Externe User ID ist leer + UserDisplayNameEmpty: Benutzer Anzeige Name ist leer GrantRequired: Der Login an diese Applikation ist nicht möglich. Der Benutzer benötigt mindestens eine Berechtigung an der Applikation. Bitte melde dich bei deinem Administrator. IdentityProvider: InvalidConfig: Identitäts Provider Konfiguration ist ungültig diff --git a/internal/ui/login/static/i18n/en.yaml b/internal/ui/login/static/i18n/en.yaml index 65494bcaf7..c5e4070bcc 100644 --- a/internal/ui/login/static/i18n/en.yaml +++ b/internal/ui/login/static/i18n/en.yaml @@ -221,6 +221,27 @@ RegistrationUser: BackButtonText: back NextButtonText: next +ExternalRegistrationUserOverview: + Title: External User Registration + Description: We have taken your user details from the selected provider. You can now change or complete them. + EmailLabel: E-Mail + UsernameLabel: Username + FirstnameLabel: Firstname + LastnameLabel: Lastname + NicknameLabel: Nickname + PhoneLabel: Phonenumber + LanguageLabel: Language + German: Deutsch + English: English + TosAndPrivacyLabel: Terms and conditions + TosConfirm: I accept the + TosLinkText: TOS + TosConfirmAnd: and the + PrivacyLinkText: privacy policy + ExternalLogin: or register with an external user + BackButtonText: back + NextButtonText: save + RegistrationOrg: Title: Organisation Registration Description: Enter your organisationname and userdata. @@ -260,6 +281,11 @@ ExternalNotFoundOption: Description: External user not found. Do you want to link your user or auto register a new one. LinkButtonText: Link AutoRegisterButtonText: Auto register + TosAndPrivacyLabel: Terms and conditions + TosConfirm: I accept the + TosLinkText: TOS + TosConfirmAnd: and the + PrivacyLinkText: privacy policy Footer: PoweredBy: Powered By @@ -305,6 +331,8 @@ Errors: GeneratorAlgNotSupported: Unsupported generator algorithm EmailVerify: UserIDEmpty: UserID is empty + ExternalData: + CouldNotRead: External data could not be read correctly MFA: NoProviders: No available multifactor providers OTP: @@ -318,6 +346,9 @@ Errors: ExternalIDP: IDPTypeNotImplemented: IDP Type is not implemented NotAllowed: External Login Provider not allowed + IDPConfigIDEmpty: Identity Provider ID is empty + ExternalUserIDEmpty: External User ID is empty + UserDisplayNameEmpty: User Display Name is empty GrantRequired: Login not possible. The user is required to have at least one grant on the application. Please contact your administrator. IdentityProvider: InvalidConfig: Identity Provider configuration is invalid diff --git a/internal/ui/login/static/resources/scripts/external_not_found_check.js b/internal/ui/login/static/resources/scripts/external_not_found_check.js new file mode 100644 index 0000000000..e84eb4b863 --- /dev/null +++ b/internal/ui/login/static/resources/scripts/external_not_found_check.js @@ -0,0 +1,5 @@ +let button1 = document.getElementById("link-button"); +disableSubmit(undefined, button1); + +let button2 = document.getElementById("auto-register-button"); +disableSubmit(undefined, button2); \ No newline at end of file diff --git a/internal/ui/login/static/templates/external_not_found_option.html b/internal/ui/login/static/templates/external_not_found_option.html index 0c432da6e3..81bb533e87 100644 --- a/internal/ui/login/static/templates/external_not_found_option.html +++ b/internal/ui/login/static/templates/external_not_found_option.html @@ -3,32 +3,65 @@
{{t "ExternalNotFoundOption.Description"}}
+{{t "ExternalRegistrationUserOverview.Description"}}
+