diff --git a/.make-lint-translation-keys-expect b/.make-lint-translation-keys-expect index 7c8362a3f5..bc6ee1a338 100644 --- a/.make-lint-translation-keys-expect +++ b/.make-lint-translation-keys-expect @@ -1,14 +1,18 @@ resources/authgear/templates/en/web/authflowv2/__base_page_frame.html:43:12: translation key not defined: "page-frame-content" -resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html:4:25: translation key not defined: "dialog-controller-str" -resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html:5:19: translation key not defined: "dialog-content" +resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html:5:27: translation key not defined: "dialog-controller-str" +resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html:6:21: translation key not defined: "dialog-content" +resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html:19:14: translation key not defined: "dialog-close-btn" +resources/authgear/templates/en/web/authflowv2/__country_input.html:6:16: invalid translation key: "$labelKey" resources/authgear/templates/en/web/authflowv2/__csrf_error_page_layout.html:28:18: translation key not defined: "page-content" -resources/authgear/templates/en/web/authflowv2/__dialog.html:9:14: translation key not defined: "dialog-attr" +resources/authgear/templates/en/web/authflowv2/__dialog.html:27:14: translation key not defined: "dialog-attr" resources/authgear/templates/en/web/authflowv2/__error.html:134:18: translation key not defined: "authflowv2/__error_account" resources/authgear/templates/en/web/authflowv2/__error.html:166:20: translation key not defined: "authflowv2/__error_account" resources/authgear/templates/en/web/authflowv2/__error.html:201:31: translation key not defined: "customer-support-link" resources/authgear/templates/en/web/authflowv2/__html_head.html:4:19: invalid translation key: "app.name" +resources/authgear/templates/en/web/authflowv2/__locale_input.html:6:16: invalid translation key: "$labelKey" resources/authgear/templates/en/web/authflowv2/__page_frame.html:12:18: translation key not defined: "page-content" -resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html:46:18: translation key not defined: "page-content" +resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html:46:15: translation key not defined: "page-navbar" +resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html:48:18: translation key not defined: "page-content" resources/authgear/templates/en/web/authflowv2/__toc_pp_footer.html:23:54: invalid translation key: "terms-of-service-link" resources/authgear/templates/en/web/authflowv2/__toc_pp_footer.html:24:53: invalid translation key: "privacy-policy-link" resources/authgear/templates/en/web/authflowv2/account_linking.html:94:21: invalid translation key: "printf "v2.component.oauth-branding.%s.label" .ProviderType" @@ -21,9 +25,21 @@ resources/authgear/templates/en/web/authflowv2/login.html:252:25: invalid transl resources/authgear/templates/en/web/authflowv2/login.html:274:25: invalid translation key: "printf "v2.component.ldap-branding.default.label-%s" .server_name" resources/authgear/templates/en/web/authflowv2/select_account.html:13:24: invalid translation key: "app.name" resources/authgear/templates/en/web/authflowv2/settings_layout.html:3:14: translation key not defined: "widget" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:29:18: translation key not defined: "__settings_profile_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:51:18: translation key not defined: "__settings_profile_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:68:22: translation key not defined: "__settings_profile_date_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:70:18: translation key not defined: "__settings_profile_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:87:22: translation key not defined: "__settings_profile_address_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:89:18: translation key not defined: "__settings_profile_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:107:18: translation key not defined: "__settings_profile_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:123:23: translation key not defined: "__settings_profile_locale_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:125:18: translation key not defined: "__settings_profile_item" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:174:22: invalid translation key: "$label" +resources/authgear/templates/en/web/authflowv2/settings_profile.html:185:29: invalid translation key: "printf "territory-%s" $.AddressCountry" +resources/authgear/templates/en/web/authflowv2/settings_profile_edit_gender.html:57:33: translation key not defined: "__settings_gender_edit_custom_gender_input" resources/authgear/templates/en/web/authflowv2/signup.html:40:18: invalid translation key: "app.name" resources/authgear/templates/en/web/authflowv2/signup.html:237:23: invalid translation key: "printf "v2.component.oauth-branding.%s.label" .provider_type" resources/authgear/templates/en/web/authflowv2/signup.html:259:23: invalid translation key: "printf "v2.component.ldap-branding.default.label-%s" .server_name" resources/authgear/templates/en/web/authflowv2/verify_login_link.html:4:18: invalid translation key: "app.name" -27 errors found +43 errors found exit status 1 diff --git a/authui/src/authflowv2.ts b/authui/src/authflowv2.ts index 6ebef474da..9458870cac 100644 --- a/authui/src/authflowv2.ts +++ b/authui/src/authflowv2.ts @@ -1,3 +1,4 @@ +import "cropperjs/dist/cropper.min.css"; import { start } from "@hotwired/turbo"; import { Application } from "@hotwired/stimulus"; import axios from "axios"; @@ -47,6 +48,8 @@ import { BotProtectionController } from "./authflowv2/botprotection/botProtectio import { BotProtectionDialogController } from "./authflowv2/botprotection/botProtectionDialog"; import { DialogController } from "./authflowv2/dialog"; import { BotProtectionStandalonePageController } from "./authflowv2/botprotection/botProtectionStandalonePage"; +import { ImagePickerController } from "./imagepicker"; +import { SelectInputController } from "./authflowv2/selectInput"; axios.defaults.withCredentials = true; @@ -89,6 +92,7 @@ Stimulus.register("custom-select", CustomSelectController); Stimulus.register("phone-input", PhoneInputController); Stimulus.register("countdown", CountdownController); Stimulus.register("copy-button", CopyButtonController); +Stimulus.register("image-picker", ImagePickerController); Stimulus.register("text-field", TextFieldController); Stimulus.register("dialog", DialogController); @@ -129,5 +133,6 @@ Stimulus.register("cloudflare-turnstile", CloudflareTurnstileController); Stimulus.register("recaptcha-v2", RecaptchaV2Controller); Stimulus.register("bot-protection", BotProtectionController); Stimulus.register("bot-protection-dialog", BotProtectionDialogController); +Stimulus.register("select-input", SelectInputController); injectCSSAttrs(document.documentElement); diff --git a/authui/src/authflowv2/components.css b/authui/src/authflowv2/components.css index 82fdc8d475..8627ad459b 100644 --- a/authui/src/authflowv2/components.css +++ b/authui/src/authflowv2/components.css @@ -21,17 +21,23 @@ @import "./components/password-strength-meter.css"; @import "./components/select.css"; @import "./components/phone-input.css"; +@import "./components/date-input.css"; @import "./components/screen-icon.css"; @import "./components/screen-icon-layout.css"; @import "./components/password-policy.css"; @import "./components/icon.css"; @import "./components/close-btn.css"; @import "./components/checkbox.css"; +@import "./components/settings-radio.css"; @import "./components/overlay.css"; @import "./components/dialog.css"; @import "./components/watermark.css"; @import "./components/settings-header.css"; +@import "./components/settings-content.css"; @import "./components/settings-title.css"; @import "./components/settings-description.css"; @import "./components/settings-item.css"; +@import "./components/settings-text-input.css"; @import "./components/navbar.css"; +@import "./components/settings-user-profile-pic.css"; +@import "./components/select-input.css"; diff --git a/authui/src/authflowv2/components/date-input.css b/authui/src/authflowv2/components/date-input.css new file mode 100644 index 0000000000..44e253de15 --- /dev/null +++ b/authui/src/authflowv2/components/date-input.css @@ -0,0 +1,15 @@ +@layer components { + :root { + --date-input--calendar-icon-filter: unset; + } + :root.dark { + --date-input--calendar-icon-filter: invert(100%); + } + .date-input { + &::-webkit-calendar-picker-indicator { + filter: var(--date-input--calendar-icon-filter); + height: 1.5rem; + width: 1.5rem; + } + } +} diff --git a/authui/src/authflowv2/components/dialog.css b/authui/src/authflowv2/components/dialog.css index 6ca0348612..9eb3ed1d27 100644 --- a/authui/src/authflowv2/components/dialog.css +++ b/authui/src/authflowv2/components/dialog.css @@ -123,7 +123,7 @@ } } - .close-btn { + .dialog-close-btn--bot-protection { /* close button icon distance to top/right edge = 21px * close button icon size = 14px * close button button size = 44px @@ -152,7 +152,7 @@ transform: none; /* slide animation only wanted on mobile */ } - .close-btn { + .dialog-close-btn--bot-protection { /* close button icon distance to top/right edge = 25px * close button icon size = 14px * close button button size = 44px diff --git a/authui/src/authflowv2/components/icon.css b/authui/src/authflowv2/components/icon.css index e028458af4..57909e5078 100644 --- a/authui/src/authflowv2/components/icon.css +++ b/authui/src/authflowv2/components/icon.css @@ -2,6 +2,7 @@ :root { --alternative-icon__font-size: 1.5rem; /* 24 / 16 = 1.5 */ --country-flag-icon__font-size: 1.5rem; /* 24 / 16 = 1.5 */ + --settings-item-icon__font-size: 1.5rem; } :root.dark { @@ -15,4 +16,8 @@ .country-flag-icon { font-size: var(--country-flag-icon__font-size); } + + .settings-item-icon { + font-size: var(--settings-item-icon__font-size); + } } diff --git a/authui/src/authflowv2/components/navbar.css b/authui/src/authflowv2/components/navbar.css index 9a241055b9..de9c786e86 100644 --- a/authui/src/authflowv2/components/navbar.css +++ b/authui/src/authflowv2/components/navbar.css @@ -9,6 +9,13 @@ --navbar__title-line-height: var(--typography-title-large__line-height); --navbar__title-text-color: var(--color-neutral-700); + --navbar__title--mobile-font-family: var(--navbar__title-font-family); + --navbar__title--mobile-font-size: 1.125rem; + --navbar__title--mobile-font-weight: var(--navbar__title-font-weight); + --navbar__title--mobile-letter-spacing: var(--navbar__title-letter-spacing); + --navbar__title--mobile-line-height: var(--navbar__title-line-height); + --navbar__title--mobile-text-color: var(--navbar__title-text-color); + --navbar__item-font-family: var(--typography-label-large__font-family); --navbar__item-font-size: var(--typography-label-large__font-size); --navbar__item-font-weight: var(--typography-label-large__font-weight); @@ -33,12 +40,21 @@ } .navbar__title { - color: var(--navbar__title-text-color); - font-family: var(--navbar__title-font-family); - font-size: var(--navbar__title-font-size); - font-weight: var(--navbar__title-font-weight); - letter-spacing: var(--navbar__title-letter-spacing); - line-height: var(--navbar__title-line-height); + color: var(--navbar__title--mobile-text-color); + font-family: var(--navbar__title--mobile-font-family); + font-size: var(--navbar__title--mobile-font-size); + font-weight: var(--navbar__title--mobile-font-weight); + letter-spacing: var(--navbar__title--mobile-letter-spacing); + line-height: var(--navbar__title--mobile-line-height); + + @media (min-width: theme("screens.tablet")) { + color: var(--navbar__title-text-color); + font-family: var(--navbar__title-font-family); + font-size: var(--navbar__title-font-size); + font-weight: var(--navbar__title-font-weight); + letter-spacing: var(--navbar__title-letter-spacing); + line-height: var(--navbar__title-line-height); + } @apply absolute inset-0; @apply flex justify-center items-center; @@ -53,9 +69,12 @@ font-weight: var(--navbar__item-font-weight); letter-spacing: var(--navbar__item-letter-spacing); line-height: var(--navbar__item-line-height); - } - .navbar__item_icon { - font-size: var(--navbar__item-icon-font-size); + &::before { + /* arrow_back_ios (<) in ltr and arrow_forward_ios (>) in rtl */ + @apply ltr:content-['arrow\_back\_ios'] rtl:content-['arrow\_forward\_ios']; + @apply material-icons; + font-size: var(--navbar__item-icon-font-size); + } } } diff --git a/authui/src/authflowv2/components/select-input.css b/authui/src/authflowv2/components/select-input.css new file mode 100644 index 0000000000..4a941fbffa --- /dev/null +++ b/authui/src/authflowv2/components/select-input.css @@ -0,0 +1,59 @@ +@layer components { + :root { + --select-input__font-size: var(--typography-body-large__font-size); + + --select-input__placeholder_color: var(--color-neutral-200); + --select-input__trigger-ring-color: var(--color-neutral-100); + --select-input__trigger-ring-color--focus: var( + --color-primary-theme-primary + ); + --select-input__trigger-ring-color--error: var(--color-error); + --select-input__trigger-ring-width: var(--border-width-regular); + --select-input__trigger-ring-width--focus: var( + --border-width-regular--active + ); + --select-input__trigger-border-radius: calc( + var(--select-input__font-size) * 14 / 16 + ) + /* 14 / 16 ratio to font size */; + --select-input__trigger-padding: 1em; + } + + :root.dark { + --select-input__text-color: var(--color-neutral-100); + --select-input__trigger-ring-color: var(--color-neutral-500); + } + + .select-input__trigger { + @apply flex justify-between items-center; + color: var(--select-input__text-color); + padding: var(--select-input__trigger-padding); + border-radius: var(--select-input__trigger-border-radius); + @apply ring-inset + ring-[length:var(--select-input\_\_trigger-ring-width)] + ring-[color:var(--select-input\_\_trigger-ring-color)]; + + &:focus { + @apply ring-inset + ring-[length:var(--select-input\_\_trigger-ring-width--focus)] + ring-[color:var(--select-input\_\_trigger-ring-color--focus)]; + } + + &::after { + @apply material-icons; + content: "arrow_forward_ios"; + font-size: 1.125rem; + @apply rotate-90; + } + + &.custom-select__trigger-no-value { + color: var(--select-input__placeholder_color); + } + + &.select__trigger--expanded { + &::after { + @apply -rotate-90; + } + } + } +} diff --git a/authui/src/authflowv2/components/settings-content.css b/authui/src/authflowv2/components/settings-content.css new file mode 100644 index 0000000000..0786d84a30 --- /dev/null +++ b/authui/src/authflowv2/components/settings-content.css @@ -0,0 +1,12 @@ +@layer components { + :root { + --settings-content__width: 21.5625rem; + } + + .settings-content { + @media (min-width: theme("screens.tablet")) { + margin: 0 auto; + width: var(--settings-content__width); + } + } +} diff --git a/authui/src/authflowv2/components/settings-item.css b/authui/src/authflowv2/components/settings-item.css index 46d272cc7f..7566edd841 100644 --- a/authui/src/authflowv2/components/settings-item.css +++ b/authui/src/authflowv2/components/settings-item.css @@ -45,6 +45,7 @@ .settings-item { @apply grid; + @apply gap-x-2; @apply items-center text-start; background-color: var(--settings-item__bg-color); @@ -54,23 +55,28 @@ border-bottom-width: 1px; border-style: solid; + --settings-item__grid-col-icon-width: 0; + &.with-icon { + --settings-item__grid-col-icon-width: 1.5rem; + } + &.with-content { /* When Mobile View */ grid-template-areas: "icon title arrow" ". content arrow"; - grid-template-columns: 2rem auto 1.125rem; + grid-template-columns: var(--settings-item__grid-col-icon-width) auto 1.125rem; /* When Not Mobile View */ @media (min-width: theme("screens.tablet")) { grid-template-areas: "icon title content arrow"; - grid-template-columns: 2rem 9rem auto 1.125rem; + grid-template-columns: var(--settings-item__grid-col-icon-width) 9rem auto 1.125rem; } } &.without-content { grid-template-areas: "icon title arrow"; - grid-template-columns: 2rem auto 1.125rem; + grid-template-columns: var(--settings-item__grid-col-icon-width) auto 1.125rem; } &:hover { @@ -90,8 +96,9 @@ } } - .settings-item > .settings-item_icon { + .settings-item > .settings-item_icon-container { grid-area: icon; + @apply flex items-center; } .settings-item > .settings-item__label { grid-area: title; @@ -115,4 +122,11 @@ .settings-item__forward_arrow { font-size: var(--settings-item__forward-arrow-font-size); color: var(--settings-item__forward-arrow-color); + + @apply flex items-center; + + &::before { + @apply material-icons; + @apply ltr:content-['arrow\_forward\_ios'] rtl:content-['arrow\_back\_ios']; + } } diff --git a/authui/src/authflowv2/components/settings-radio.css b/authui/src/authflowv2/components/settings-radio.css new file mode 100644 index 0000000000..71fd947f52 --- /dev/null +++ b/authui/src/authflowv2/components/settings-radio.css @@ -0,0 +1,77 @@ +@layer components { + :root { + --settings-radio__border-color: var(--color-neutral-500); + --settings-radio__border-color--checked: var(--color-primary-theme-primary); + --settings-radio__bg-color: var(--color-surface-primary); + + --settings-radio__text-color: var(--color-neutral-700); + --settings-radio__font-family: var(--typography-label-large__font-family); + --settings-radio__font-size: var(--typography-label-large__font-size); + --settings-radio__line-height: var(--typography-label-large__line-height); + --settings-radio__letter-spacing: var( + --typography-label-large__letter-spacing + ); + --settings-radio__font-weight: var(--typography-label-large__font-weight); + + --settings-radio__label-border-color: var(--color-neutral-100); + } + :root.dark { + --settings-radio__text-color: var(--color-neutral-100); + --settings-radio__label-border-color: var(--color-neutral-400); + } + + .settings-radio__container { + @apply grid grid-cols-[auto,1.25rem] gap-y-4; + @apply px-2 py-4; + @apply w-full; + @apply cursor-pointer; + + color: var(--settings-item__text-color); + background-color: var(--settings-radio__bg-color); + + border-color: var(--settings-radio__label-border-color); + border-bottom-width: 1px; + border-style: solid; + + font-family: var(--settings-radio__font-family); + font-size: var(--settings-radio__font-size); + line-height: var(--settings-radio__line-height); + letter-spacing: var(--settings-radio__letter-spacing); + font-weight: var(--settings-radio__font-weight); + } + + .settings-radio__label { + @apply cursor-pointer; + } + + .settings-radio { + @apply cursor-pointer; + @apply w-5 h-5; + @apply rounded-full; + @apply border-2 border-solid; + border-color: var(--settings-radio__border-color); + } + + .settings-radio:checked { + border-color: var(--settings-radio__border-color--checked); + background-color: var(--settings-radio__border-color--checked); + box-shadow: inset -0.005rem -0.005rem 0 0.15rem + var(--settings-radio__bg-color); + } + + .settings-radio:not(:checked):hover { + border-color: var(--settings-radio__border-color); + background-color: var(--settings-radio__border-color); + box-shadow: inset -0.005rem -0.005rem 0 0.15rem + var(--settings-radio__bg-color); + } + + .settings-radio__extra-content { + @apply hidden; + @apply col-span-2; + } + + .settings-radio:checked ~ .settings-radio__extra-content { + @apply block; + } +} diff --git a/authui/src/authflowv2/components/settings-text-input.css b/authui/src/authflowv2/components/settings-text-input.css new file mode 100644 index 0000000000..249d94d2b6 --- /dev/null +++ b/authui/src/authflowv2/components/settings-text-input.css @@ -0,0 +1,38 @@ +@layer components { + :root { + --settings-text-input__label-text-color: var(--color-neutral-700); + --settings-text-input__label-text-font-family: var( + --typography-label-large__font-family + ); + --settings-text-input__label-text-font-size: var( + --typography-label-large__font-size + ); + --settings-text-input__label-text-line-height: var( + --typography-label-large__line-height + ); + --settings-text-input__label-text-letter-spacing: var( + --typography-label-large__letter-spacing + ); + --settings-text-input__label-text-font-weight: var( + --typography-label-large__font-weight + ); + } + + :root.dark { + --settings-text-input__label-text-color: var(--color-neutral-100); + } + + .settings-text-input__label { + @apply flex flex-col gap-y-1; + } + + .settings-text-input__label-text { + @apply flex flex-col; + color: var(--settings-text-input__label-text-color); + font-family: var(--settings-text-input__label-text-font-family); + font-size: var(--settings-text-input__label-text-font-size); + line-height: var(--settings-text-input__label-text-line-height); + letter-spacing: var(--settings-text-input__label-text-letter-spacing); + font-weight: var(--settings-text-input__label-text-font-weight); + } +} diff --git a/authui/src/authflowv2/components/settings-user-profile-pic.css b/authui/src/authflowv2/components/settings-user-profile-pic.css new file mode 100644 index 0000000000..debac43b60 --- /dev/null +++ b/authui/src/authflowv2/components/settings-user-profile-pic.css @@ -0,0 +1,18 @@ +@layer components { + .settings-user-profile-pic__image-container { + @apply relative; + @apply h-22 w-22 tablet:h-50 tablet:w-50; + } + + .settings-user-profile-pic__edit-button { + @apply inline-flex items-center justify-center; + @apply w-9 h-9; + @apply absolute bottom-0 ltr:-right-2 rtl:-left-2 ltr:tablet:right-3.5 rtl:tablet:left-3.5; + @apply rounded-full bg-white; + @apply shadow-settings-user-profile-pic-edit-button; + } + + .settings-user-profile-pic__image--edit { + @apply h-50 w-50 tablet:h-75 tablet:w-75 rounded-full; + } +} diff --git a/authui/src/authflowv2/components/widget.css b/authui/src/authflowv2/components/widget.css index 37837a3fa2..b290605063 100644 --- a/authui/src/authflowv2/components/widget.css +++ b/authui/src/authflowv2/components/widget.css @@ -49,6 +49,7 @@ .widget-content.widget-content--settings { @apply px-6 py-6; + @apply gap-y-5 tablet:gap-y-8; max-width: var(--widget__max-width--settings); } diff --git a/authui/src/authflowv2/customSelect.ts b/authui/src/authflowv2/customSelect.ts index 8ac1627d87..8745fdfa19 100644 --- a/authui/src/authflowv2/customSelect.ts +++ b/authui/src/authflowv2/customSelect.ts @@ -136,6 +136,7 @@ export class CustomSelectController extends Controller { this.dropdownContainerTarget.classList.remove("hidden"); this.triggerTarget.setAttribute("aria-expanded", "true"); + this.triggerTarget.classList.add("select__trigger--expanded"); this.resetHightlightIndex(); this.clearSearch(); @@ -153,7 +154,7 @@ export class CustomSelectController extends Controller { this.dropdownContainerTarget.classList.add("hidden"); this.triggerTarget.setAttribute("aria-expanded", "false"); - this.triggerTarget.focus(); + this.triggerTarget.classList.remove("select__trigger--expanded"); this.dispatch("close"); } @@ -354,6 +355,11 @@ export class CustomSelectController extends Controller { } this.triggerTarget.innerHTML = option.triggerLabel ?? option.label; + if (this.value) { + this.triggerTarget.classList.remove("custom-select__trigger-no-value"); + } else { + this.triggerTarget.classList.add("custom-select__trigger-no-value"); + } } renderSearch() { diff --git a/authui/src/authflowv2/document.css b/authui/src/authflowv2/document.css index 172bd3834f..35ec69d395 100644 --- a/authui/src/authflowv2/document.css +++ b/authui/src/authflowv2/document.css @@ -1,4 +1,4 @@ -@layer component { +@layer components { :root { --document-pointer-event: auto; } diff --git a/authui/src/authflowv2/icons/material-symbols-outlined-subset.ttf b/authui/src/authflowv2/icons/material-symbols-outlined-subset.ttf index 0ca2b5d4fd..9cc3b1ee93 100644 Binary files a/authui/src/authflowv2/icons/material-symbols-outlined-subset.ttf and b/authui/src/authflowv2/icons/material-symbols-outlined-subset.ttf differ diff --git a/authui/src/authflowv2/icons/material-symbols-outlined-subset.woff2 b/authui/src/authflowv2/icons/material-symbols-outlined-subset.woff2 index ff8e3b36ff..02c64e1cce 100644 Binary files a/authui/src/authflowv2/icons/material-symbols-outlined-subset.woff2 and b/authui/src/authflowv2/icons/material-symbols-outlined-subset.woff2 differ diff --git a/authui/src/authflowv2/selectInput.ts b/authui/src/authflowv2/selectInput.ts new file mode 100644 index 0000000000..973172bff0 --- /dev/null +++ b/authui/src/authflowv2/selectInput.ts @@ -0,0 +1,26 @@ +import { Controller } from "@hotwired/stimulus"; + +interface Option { + triggerLabel: string; + searchLabel: string; + label: string; + value: string; +} + +export class SelectInputController extends Controller { + declare selectTarget: HTMLElement; + declare optionsValue: Option[]; + + static targets = ["select"]; + + static values = { + options: Array, + }; + + connect(): void { + this.selectTarget.setAttribute( + "data-custom-select-options-value", + JSON.stringify(this.optionsValue) + ); + } +} diff --git a/authui/src/imagepicker.ts b/authui/src/imagepicker.ts index c85a59a426..8f993ea43f 100644 --- a/authui/src/imagepicker.ts +++ b/authui/src/imagepicker.ts @@ -1,4 +1,6 @@ import axios from "axios"; +import Cropper from "cropperjs"; +import { Controller } from "@hotwired/stimulus"; import { disableAllButtons, hideProgressBar, @@ -10,8 +12,6 @@ import { showErrorMessage, hideErrorMessage, } from "./messageBar"; -import { Controller } from "@hotwired/stimulus"; -import Cropper from "cropperjs"; function destroyCropper(img: HTMLImageElement) { // The namespace .cropper is known by reading the source code. diff --git a/authui/tailwind.config.js b/authui/tailwind.config.js index 5b2b9af974..af232c05c1 100644 --- a/authui/tailwind.config.js +++ b/authui/tailwind.config.js @@ -36,6 +36,10 @@ module.exports = { } return spacing; }, + boxShadow: { + "settings-user-profile-pic-edit-button": + "0px 4px 10px 0px rgba(0, 0, 0, 0.1)", + }, }, screens: { tablet: "640px", diff --git a/pkg/auth/handler/webapp/authflowv2/deps.go b/pkg/auth/handler/webapp/authflowv2/deps.go index 9f673a45bc..61ad658dca 100644 --- a/pkg/auth/handler/webapp/authflowv2/deps.go +++ b/pkg/auth/handler/webapp/authflowv2/deps.go @@ -40,5 +40,7 @@ var DependencySet = wire.NewSet( wire.Struct(new(AuthflowV2WechatHandler), "*"), wire.Struct(new(AuthflowV2AccountLinkingHandler), "*"), wire.Struct(new(AuthflowV2LDAPLoginHandler), "*"), - wire.Struct(new(SettingsV2Handler), "*"), + wire.Struct(new(AuthflowV2SettingsHandler), "*"), + wire.Struct(new(AuthflowV2SettingsProfileHandler), "*"), + wire.Struct(new(AuthflowV2SettingsProfileEditHandler), "*"), ) diff --git a/pkg/auth/handler/webapp/authflowv2/routes.go b/pkg/auth/handler/webapp/authflowv2/routes.go index d6386b433f..7f96a600b4 100644 --- a/pkg/auth/handler/webapp/authflowv2/routes.go +++ b/pkg/auth/handler/webapp/authflowv2/routes.go @@ -66,13 +66,18 @@ const ( AuthflowV2RouteWechat = "/authflow/v2/wechat" AuthflowV2RouteAccountLinking = "/authflow/v2/account_linking" - SettingsV2RouteSettings = "/settings" + SettingsV2RouteSettings = "/settings" + SettingsV2RouteProfilePictureEditSettings = "/settings/profile/picture/edit" + + SettingsV2RouteSettingsProfileGenderEdit = "/settings/profile/gender/edit" // The following routes are dead ends. AuthflowV2RouteAccountStatus = "/authflow/v2/account_status" AuthflowV2RouteNoAuthenticator = "/authflow/v2/no_authenticator" AuthflowV2RouteFinishFlow = "/authflow/v2/finish" + + AuthflowV2RouteSettingsProfile = "/settings/v2/profile" ) type AuthflowV2NavigatorEndpointsProvider interface { diff --git a/pkg/auth/handler/webapp/authflowv2/settings.go b/pkg/auth/handler/webapp/authflowv2/settings.go index f6c72fed21..8c9cdb610c 100644 --- a/pkg/auth/handler/webapp/authflowv2/settings.go +++ b/pkg/auth/handler/webapp/authflowv2/settings.go @@ -12,7 +12,7 @@ import ( var TemplateWebSettingsV2HTML = template.RegisterHTML( "web/authflowv2/settings.html", - handlerwebapp.SettingsCompenents..., + handlerwebapp.SettingsComponents..., ) func ConfigureSettingsV2Route(route httproute.Route) httproute.Route { @@ -21,7 +21,7 @@ func ConfigureSettingsV2Route(route httproute.Route) httproute.Route { WithPathPattern(SettingsV2RouteSettings) } -type SettingsV2Handler struct { +type AuthflowV2SettingsHandler struct { ControllerFactory handlerwebapp.ControllerFactory BaseViewModel *viewmodels.BaseViewModeler AuthenticationViewModel *viewmodels.AuthenticationViewModeler @@ -31,7 +31,7 @@ type SettingsV2Handler struct { Renderer handlerwebapp.Renderer } -func (h *SettingsV2Handler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error) { +func (h *AuthflowV2SettingsHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error) { userID := session.GetUserID(r.Context()) data := map[string]interface{}{} @@ -65,7 +65,7 @@ func (h *SettingsV2Handler) GetData(r *http.Request, rw http.ResponseWriter) (ma return data, nil } -func (h *SettingsV2Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { +func (h *AuthflowV2SettingsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { ctrl, err := h.ControllerFactory.New(r, w) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) diff --git a/pkg/auth/handler/webapp/authflowv2/settings_profile.go b/pkg/auth/handler/webapp/authflowv2/settings_profile.go new file mode 100644 index 0000000000..61d27fca5f --- /dev/null +++ b/pkg/auth/handler/webapp/authflowv2/settings_profile.go @@ -0,0 +1,55 @@ +package authflowv2 + +import ( + "net/http" + + handlerwebapp "github.com/authgear/authgear-server/pkg/auth/handler/webapp" + "github.com/authgear/authgear-server/pkg/auth/handler/webapp/viewmodels" + "github.com/authgear/authgear-server/pkg/lib/session" + "github.com/authgear/authgear-server/pkg/util/template" +) + +var TemplateWebSettingsProfileHTML = template.RegisterHTML( + "web/authflowv2/settings_profile.html", + handlerwebapp.SettingsComponents..., +) + +type AuthflowV2SettingsProfileHandler struct { + ControllerFactory handlerwebapp.ControllerFactory + BaseViewModel *viewmodels.BaseViewModeler + SettingsProfileViewModel *viewmodels.SettingsProfileViewModeler + Renderer handlerwebapp.Renderer +} + +func (h *AuthflowV2SettingsProfileHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + ctrl, err := h.ControllerFactory.New(r, w) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + defer ctrl.Serve() + + ctrl.Get(func() error { + userID := session.GetUserID(r.Context()) + + data := map[string]interface{}{} + + baseViewModel := h.BaseViewModel.ViewModel(r, w) + viewmodels.Embed(data, baseViewModel) + + viewModelPtr, err := h.SettingsProfileViewModel.ViewModel(*userID) + if err != nil { + return err + } + viewmodels.Embed(data, *viewModelPtr) + + if viewModelPtr.IsStandardAttributesAllHidden { + http.Redirect(w, r, "/settings", http.StatusFound) + return nil + } + + h.Renderer.RenderHTML(w, r, TemplateWebSettingsProfileHTML, data) + + return nil + }) +} diff --git a/pkg/auth/handler/webapp/authflowv2/settings_profile_edit.go b/pkg/auth/handler/webapp/authflowv2/settings_profile_edit.go new file mode 100644 index 0000000000..ce31ba90be --- /dev/null +++ b/pkg/auth/handler/webapp/authflowv2/settings_profile_edit.go @@ -0,0 +1,197 @@ +package authflowv2 + +import ( + "net/http" + "net/url" + + handlerwebapp "github.com/authgear/authgear-server/pkg/auth/handler/webapp" + "github.com/authgear/authgear-server/pkg/auth/handler/webapp/viewmodels" + "github.com/authgear/authgear-server/pkg/auth/webapp" + "github.com/authgear/authgear-server/pkg/lib/authn/stdattrs" + "github.com/authgear/authgear-server/pkg/lib/config" + "github.com/authgear/authgear-server/pkg/lib/session" + "github.com/authgear/authgear-server/pkg/util/accesscontrol" + "github.com/authgear/authgear-server/pkg/util/httproute" + "github.com/authgear/authgear-server/pkg/util/template" +) + +func init() { + settingsProfileEditVariantToTemplate = make(map[string]*template.HTML) + settingsProfileEditVariantToTemplate["address"] = template.RegisterHTML( + "web/authflowv2/settings_profile_edit_address.html", + handlerwebapp.SettingsComponents..., + ) + settingsProfileEditVariantToTemplate["birthdate"] = template.RegisterHTML( + "web/authflowv2/settings_profile_edit_birthdate.html", + handlerwebapp.SettingsComponents..., + ) + settingsProfileEditVariantToTemplate["gender"] = template.RegisterHTML( + "web/authflowv2/settings_profile_edit_gender.html", + handlerwebapp.SettingsComponents..., + ) + settingsProfileEditVariantToTemplate["locale"] = template.RegisterHTML( + "web/authflowv2/settings_profile_edit_locale.html", + handlerwebapp.SettingsComponents..., + ) + settingsProfileEditVariantToTemplate["name"] = template.RegisterHTML( + "web/authflowv2/settings_profile_edit_name.html", + handlerwebapp.SettingsComponents..., + ) + settingsProfileEditVariantToTemplate["picture"] = template.RegisterHTML( + "web/authflowv2/settings_picture_edit.html", + handlerwebapp.SettingsComponents..., + ) + settingsProfileEditVariantToTemplate["zoneinfo"] = template.RegisterHTML( + "web/authflowv2/settings_profile_edit_zoneinfo.html", + handlerwebapp.SettingsComponents..., + ) +} + +var settingsProfileEditVariantToTemplate map[string]*template.HTML + +var TemplateSettingsProfileNoPermission = template.RegisterHTML( + "web/authflowv2/settings_profile_no_permission.html", + handlerwebapp.Components..., +) + +type AuthflowV2SettingsProfileEditHandler struct { + ControllerFactory handlerwebapp.ControllerFactory + BaseViewModel *viewmodels.BaseViewModeler + SettingsProfileViewModel *viewmodels.SettingsProfileViewModeler + Renderer handlerwebapp.Renderer + + UserProfileConfig *config.UserProfileConfig + + Users handlerwebapp.SettingsProfileEditUserService + StdAttrs handlerwebapp.SettingsProfileEditStdAttrsService + CustomAttrs handlerwebapp.SettingsProfileEditCustomAttrsService +} + +func (h *AuthflowV2SettingsProfileEditHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error) { + userID := session.GetUserID(r.Context()) + + data := map[string]interface{}{} + + baseViewModel := h.BaseViewModel.ViewModel(r, rw) + viewmodels.Embed(data, baseViewModel) + + viewModelPtr, err := h.SettingsProfileViewModel.ViewModel(*userID) + if err != nil { + return nil, err + } + viewmodels.Embed(data, *viewModelPtr) + + return data, nil +} + +func (h *AuthflowV2SettingsProfileEditHandler) isAttributeEditable(attributeVariant string) bool { + accessControl := h.UserProfileConfig.StandardAttributes.GetAccessControl().MergedWith( + h.UserProfileConfig.CustomAttributes.GetAccessControl(), + ) + + isEditable := func(jsonpointer string) bool { + level := accessControl.GetLevel( + accesscontrol.Subject(jsonpointer), + config.RoleEndUser, + config.AccessControlLevelHidden, + ) + return level == config.AccessControlLevelReadwrite + } + + switch attributeVariant { + case "name": + names := []string{"name", "given_name", "family_name", "middle_name", "nickname"} + for _, name := range names { + editable := isEditable("/" + name) + if editable { + return true + } + } + return false + default: + return isEditable("/" + attributeVariant) + } +} + +func (h *AuthflowV2SettingsProfileEditHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + ctrl, err := h.ControllerFactory.New(r, w) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + defer ctrl.Serve() + + ctrl.Get(func() error { + data, err := h.GetData(r, w) + if err != nil { + return err + } + + variant := httproute.GetParam(r, "variant") + + settingsTemplate, ok := settingsProfileEditVariantToTemplate[variant] + if !ok { + h.Renderer.RenderHTML(w, r, TemplateWebNotFoundHTML, data) + return nil + } + + hasPermissionToEdit := h.isAttributeEditable(variant) + + if !hasPermissionToEdit { + h.Renderer.RenderHTML(w, r, TemplateSettingsProfileNoPermission, data) + return nil + } + + h.Renderer.RenderHTML(w, r, settingsTemplate, data) + return nil + }) + + ctrl.PostAction("save", func() error { + userID := *session.GetUserID(r.Context()) + PatchGenderForm(r.Form) + m := handlerwebapp.JSONPointerFormToMap(r.Form) + + u, err := h.Users.GetRaw(userID) + if err != nil { + return err + } + + variant := httproute.GetParam(r, "variant") + if variant == "custom_attributes" { + err = h.CustomAttrs.UpdateCustomAttributesWithForm(config.RoleEndUser, userID, m) + if err != nil { + return err + } + } else { + attrs, err := stdattrs.T(u.StandardAttributes).MergedWithForm(m) + if err != nil { + return err + } + + err = h.StdAttrs.UpdateStandardAttributes(config.RoleEndUser, userID, attrs) + if err != nil { + return err + } + } + + result := webapp.Result{RedirectURI: "/settings/profile"} + result.WriteResponse(w, r) + return nil + }) +} + +func PatchGenderForm(form url.Values) { + _, genderSelectOK := form["gender-select"] + if !genderSelectOK { + return + } + + genderSelect := form.Get("gender-select") + genderInput := form.Get("gender-input") + + if genderSelect == "other" { + form.Set("/gender", genderInput) + } else { + form.Set("/gender", genderSelect) + } +} diff --git a/pkg/auth/handler/webapp/template.go b/pkg/auth/handler/webapp/template.go index 68ae9bc947..54dbb34847 100644 --- a/pkg/auth/handler/webapp/template.go +++ b/pkg/auth/handler/webapp/template.go @@ -6,7 +6,7 @@ import ( ) var Components = web.ComponentsHTML -var SettingsCompenents = web.SettingsComponentsHTML +var SettingsComponents = web.SettingsComponentsHTML var plainTextComponents = web.ComponentsPlainText diff --git a/pkg/auth/routes.go b/pkg/auth/routes.go index 06230bfa40..7613e82513 100644 --- a/pkg/auth/routes.go +++ b/pkg/auth/routes.go @@ -440,11 +440,17 @@ func NewRouter(p *deps.RootProvider, configSource *configsource.ConfigSource) *h router.Add(webapphandler.ConfigureEnterLoginIDRoute(webappAuthenticatedRoute), p.Handler(newWebAppEnterLoginIDHandler)) router.Add(webapphandler.ConfigureSettingsRoute(webappSettingsRoute), &webapphandler.SettingsImplementationSwitcherHandler{ SettingV1: p.Handler(newWebAppSettingsHandler), - SettingV2: p.Handler(newWebAppSettingsV2Handler), + SettingV2: p.Handler(newWebAppAuthflowV2SettingsHandler), }) - router.Add(webapphandler.ConfigureSettingsProfileRoute(webappSettingsSubRoutesRoute), p.Handler(newWebAppSettingsProfileHandler)) - router.Add(webapphandler.ConfigureSettingsProfileEditRoute(webappSettingsSubRoutesRoute), p.Handler(newWebAppSettingsProfileEditHandler)) + router.Add(webapphandler.ConfigureSettingsProfileRoute(webappSettingsRoute), &webapphandler.SettingsImplementationSwitcherHandler{ + SettingV1: p.Handler(newWebAppSettingsProfileHandler), + SettingV2: p.Handler(newWebAppAuthflowV2SettingsProfile), + }) + router.Add(webapphandler.ConfigureSettingsProfileEditRoute(webappSettingsSubRoutesRoute), &webapphandler.SettingsImplementationSwitcherHandler{ + SettingV1: p.Handler(newWebAppSettingsProfileEditHandler), + SettingV2: p.Handler(newWebAppAuthflowV2SettingsProfileEditHandler), + }) router.Add(webapphandler.ConfigureSettingsIdentityRoute(webappSettingsSubRoutesRoute), p.Handler(newWebAppSettingsIdentityHandler)) router.Add(webapphandler.ConfigureSettingsBiometricRoute(webappSettingsSubRoutesRoute), p.Handler(newWebAppSettingsBiometricHandler)) router.Add(webapphandler.ConfigureSettingsMFARoute(webappSettingsSubRoutesRoute), p.Handler(newWebAppSettingsMFAHandler)) diff --git a/pkg/auth/wire_gen.go b/pkg/auth/wire_gen.go index 272f9c2d0e..cd08c7837a 100644 --- a/pkg/auth/wire_gen.go +++ b/pkg/auth/wire_gen.go @@ -42900,7 +42900,7 @@ func newWebAppSettingsHandler(p *deps.RequestProvider) http.Handler { return settingsHandler } -func newWebAppSettingsV2Handler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2SettingsHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -43834,7 +43834,7 @@ func newWebAppSettingsV2Handler(p *deps.RequestProvider) http.Handler { Identities: facadeIdentityFacade, Clock: clockClock, } - settingsV2Handler := &authflowv2.SettingsV2Handler{ + authflowV2SettingsHandler := &authflowv2.AuthflowV2SettingsHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, AuthenticationViewModel: authenticationViewModeler, @@ -43843,7 +43843,7 @@ func newWebAppSettingsV2Handler(p *deps.RequestProvider) http.Handler { Identities: serviceService, Renderer: responseRenderer, } - return settingsV2Handler + return authflowV2SettingsHandler } func newWebAppSettingsProfileHandler(p *deps.RequestProvider) http.Handler { @@ -45722,7 +45722,7 @@ func newWebAppSettingsProfileEditHandler(p *deps.RequestProvider) http.Handler { return settingsProfileEditHandler } -func newWebAppSettingsIdentityHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2SettingsProfileEditHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -46635,23 +46635,39 @@ func newWebAppSettingsIdentityHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - authenticationViewModeler := &viewmodels.AuthenticationViewModeler{ - Authentication: authenticationConfig, - LoginID: loginIDConfig, + facadeIdentityFacade := &facade.IdentityFacade{ + Coordinator: coordinator, } - settingsIdentityHandler := &webapp.SettingsIdentityHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - AuthenticationViewModel: authenticationViewModeler, - Renderer: responseRenderer, - Identities: serviceService, - Verification: verificationService, - AccountDeletion: accountDeletionConfig, + settingsProfileViewModeler := &viewmodels.SettingsProfileViewModeler{ + Localization: localizationConfig, + UserProfileConfig: userProfileConfig, + Users: userQueries, + Identities: facadeIdentityFacade, + Clock: clockClock, } - return settingsIdentityHandler + userFacade := &facade.UserFacade{ + UserProvider: userProvider, + Coordinator: coordinator, + } + customattrsService := &customattrs.Service{ + Config: userProfileConfig, + ServiceNoEvent: customattrsServiceNoEvent, + Events: eventService, + } + authflowV2SettingsProfileEditHandler := &authflowv2.AuthflowV2SettingsProfileEditHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + SettingsProfileViewModel: settingsProfileViewModeler, + Renderer: responseRenderer, + UserProfileConfig: userProfileConfig, + Users: userFacade, + StdAttrs: stdattrsService, + CustomAttrs: customattrsService, + } + return authflowV2SettingsProfileEditHandler } -func newWebAppSettingsBiometricHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsIdentityHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -47564,16 +47580,23 @@ func newWebAppSettingsBiometricHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsBiometricHandler := &webapp.SettingsBiometricHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - Identities: serviceService, + authenticationViewModeler := &viewmodels.AuthenticationViewModeler{ + Authentication: authenticationConfig, + LoginID: loginIDConfig, } - return settingsBiometricHandler + settingsIdentityHandler := &webapp.SettingsIdentityHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + AuthenticationViewModel: authenticationViewModeler, + Renderer: responseRenderer, + Identities: serviceService, + Verification: verificationService, + AccountDeletion: accountDeletionConfig, + } + return settingsIdentityHandler } -func newWebAppSettingsMFAHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsBiometricHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -48486,24 +48509,16 @@ func newWebAppSettingsMFAHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - biometricConfig := identityConfig.Biometric - settingsViewModeler := &viewmodels.SettingsViewModeler{ - Authenticators: service3, - MFA: mfaService, - Authentication: authenticationConfig, - Biometric: biometricConfig, - } - settingsMFAHandler := &webapp.SettingsMFAHandler{ + settingsBiometricHandler := &webapp.SettingsBiometricHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, - SettingsViewModel: settingsViewModeler, Renderer: responseRenderer, - MFA: mfaService, + Identities: serviceService, } - return settingsMFAHandler + return settingsBiometricHandler } -func newWebAppSettingsTOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsMFAHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -49416,16 +49431,24 @@ func newWebAppSettingsTOTPHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsTOTPHandler := &webapp.SettingsTOTPHandler{ + biometricConfig := identityConfig.Biometric + settingsViewModeler := &viewmodels.SettingsViewModeler{ + Authenticators: service3, + MFA: mfaService, + Authentication: authenticationConfig, + Biometric: biometricConfig, + } + settingsMFAHandler := &webapp.SettingsMFAHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, + SettingsViewModel: settingsViewModeler, Renderer: responseRenderer, - Authenticators: service3, + MFA: mfaService, } - return settingsTOTPHandler + return settingsMFAHandler } -func newWebAppSettingsPasskeyHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsTOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -50338,16 +50361,16 @@ func newWebAppSettingsPasskeyHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsPasskeyHandler := &webapp.SettingsPasskeyHandler{ + settingsTOTPHandler := &webapp.SettingsTOTPHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, Renderer: responseRenderer, - Identities: serviceService, + Authenticators: service3, } - return settingsPasskeyHandler + return settingsTOTPHandler } -func newWebAppSettingsOOBOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsPasskeyHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -51260,16 +51283,16 @@ func newWebAppSettingsOOBOTPHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsOOBOTPHandler := &webapp.SettingsOOBOTPHandler{ + settingsPasskeyHandler := &webapp.SettingsPasskeyHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, Renderer: responseRenderer, - Authenticators: service3, + Identities: serviceService, } - return settingsOOBOTPHandler + return settingsPasskeyHandler } -func newWebAppSettingsRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsOOBOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -52182,17 +52205,16 @@ func newWebAppSettingsRecoveryCodeHandler(p *deps.RequestProvider) http.Handler LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsRecoveryCodeHandler := &webapp.SettingsRecoveryCodeHandler{ + settingsOOBOTPHandler := &webapp.SettingsOOBOTPHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, Renderer: responseRenderer, - Authentication: authenticationConfig, - MFA: mfaService, + Authenticators: service3, } - return settingsRecoveryCodeHandler + return settingsOOBOTPHandler } -func newWebAppSettingsSessionsHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -53105,39 +53127,17 @@ func newWebAppSettingsSessionsHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - oauthOfflineGrantService := &oauth2.OfflineGrantService{ - OAuthConfig: oAuthConfig, - Clock: clockClock, - IDPSessions: idpsessionProvider, - ClientResolver: resolver, - OfflineGrants: store, - } - authorizationService := &oauth2.AuthorizationService{ - AppID: appID, - Store: authorizationStore, - Clock: clockClock, - OAuthSessionManager: sessionManager, - OfflineGrantService: oauthOfflineGrantService, - OfflineGrantStore: store, - } - sessionListingService := &sessionlisting.SessionListingService{ - OAuthConfig: oAuthConfig, - IDPSessions: idpsessionProvider, - OfflineGrants: oauthOfflineGrantService, - } - settingsSessionsHandler := &webapp.SettingsSessionsHandler{ + settingsRecoveryCodeHandler := &webapp.SettingsRecoveryCodeHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, Renderer: responseRenderer, - Sessions: manager2, - Authorizations: authorizationService, - OAuthConfig: oAuthConfig, - SessionListing: sessionListingService, + Authentication: authenticationConfig, + MFA: mfaService, } - return settingsSessionsHandler + return settingsRecoveryCodeHandler } -func newWebAppForceChangePasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsSessionsHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -54050,21 +54050,39 @@ func newWebAppForceChangePasswordHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - changePasswordViewModeler := &viewmodels.ChangePasswordViewModeler{ - Authentication: authenticationConfig, - LoginID: loginIDConfig, + oauthOfflineGrantService := &oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: resolver, + OfflineGrants: store, } - forceChangePasswordHandler := &webapp.ForceChangePasswordHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - ChangePasswordViewModel: changePasswordViewModeler, - Renderer: responseRenderer, - PasswordPolicy: passwordChecker, + authorizationService := &oauth2.AuthorizationService{ + AppID: appID, + Store: authorizationStore, + Clock: clockClock, + OAuthSessionManager: sessionManager, + OfflineGrantService: oauthOfflineGrantService, + OfflineGrantStore: store, } - return forceChangePasswordHandler + sessionListingService := &sessionlisting.SessionListingService{ + OAuthConfig: oAuthConfig, + IDPSessions: idpsessionProvider, + OfflineGrants: oauthOfflineGrantService, + } + settingsSessionsHandler := &webapp.SettingsSessionsHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Sessions: manager2, + Authorizations: authorizationService, + OAuthConfig: oAuthConfig, + SessionListing: sessionListingService, + } + return settingsSessionsHandler } -func newWebAppSettingsChangePasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppForceChangePasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -54977,16 +54995,21 @@ func newWebAppSettingsChangePasswordHandler(p *deps.RequestProvider) http.Handle LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsChangePasswordHandler := &webapp.SettingsChangePasswordHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - PasswordPolicy: passwordChecker, + changePasswordViewModeler := &viewmodels.ChangePasswordViewModeler{ + Authentication: authenticationConfig, + LoginID: loginIDConfig, } - return settingsChangePasswordHandler + forceChangePasswordHandler := &webapp.ForceChangePasswordHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + ChangePasswordViewModel: changePasswordViewModeler, + Renderer: responseRenderer, + PasswordPolicy: passwordChecker, + } + return forceChangePasswordHandler } -func newWebAppForceChangeSecondaryPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsChangePasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -55899,21 +55922,16 @@ func newWebAppForceChangeSecondaryPasswordHandler(p *deps.RequestProvider) http. LoggerFactory: factory, ControllerDeps: controllerDeps, } - changePasswordViewModeler := viewmodels.ChangePasswordViewModeler{ - Authentication: authenticationConfig, - LoginID: loginIDConfig, - } - forceChangeSecondaryPasswordHandler := &webapp.ForceChangeSecondaryPasswordHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - ChangePasswordViewModel: changePasswordViewModeler, - Renderer: responseRenderer, - PasswordPolicy: passwordChecker, + settingsChangePasswordHandler := &webapp.SettingsChangePasswordHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + PasswordPolicy: passwordChecker, } - return forceChangeSecondaryPasswordHandler + return settingsChangePasswordHandler } -func newWebAppSettingsChangeSecondaryPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppForceChangeSecondaryPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -56826,16 +56844,21 @@ func newWebAppSettingsChangeSecondaryPasswordHandler(p *deps.RequestProvider) ht LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsChangeSecondaryPasswordHandler := &webapp.SettingsChangeSecondaryPasswordHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - PasswordPolicy: passwordChecker, + changePasswordViewModeler := viewmodels.ChangePasswordViewModeler{ + Authentication: authenticationConfig, + LoginID: loginIDConfig, } - return settingsChangeSecondaryPasswordHandler + forceChangeSecondaryPasswordHandler := &webapp.ForceChangeSecondaryPasswordHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + ChangePasswordViewModel: changePasswordViewModeler, + Renderer: responseRenderer, + PasswordPolicy: passwordChecker, + } + return forceChangeSecondaryPasswordHandler } -func newWebAppSettingsDeleteAccountHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsChangeSecondaryPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -57748,27 +57771,16 @@ func newWebAppSettingsDeleteAccountHandler(p *deps.RequestProvider) http.Handler LoggerFactory: factory, ControllerDeps: controllerDeps, } - userFacade := &facade.UserFacade{ - UserProvider: userProvider, - Coordinator: coordinator, - } - settingsDeleteAccountHandler := &webapp.SettingsDeleteAccountHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - AccountDeletion: accountDeletionConfig, - Clock: clockClock, - Users: userFacade, - Cookies: cookieManager, - OAuthSessions: oauthsessionStoreRedis, - Sessions: sessionStoreRedis, - SessionCookie: sessionCookieDef, - AuthenticationInfoService: authenticationinfoStoreRedis, + settingsChangeSecondaryPasswordHandler := &webapp.SettingsChangeSecondaryPasswordHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + PasswordPolicy: passwordChecker, } - return settingsDeleteAccountHandler + return settingsChangeSecondaryPasswordHandler } -func newWebAppSettingsDeleteAccountSuccessHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsDeleteAccountHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -58681,19 +58693,27 @@ func newWebAppSettingsDeleteAccountSuccessHandler(p *deps.RequestProvider) http. LoggerFactory: factory, ControllerDeps: controllerDeps, } - settingsDeleteAccountSuccessHandler := &webapp.SettingsDeleteAccountSuccessHandler{ + userFacade := &facade.UserFacade{ + UserProvider: userProvider, + Coordinator: coordinator, + } + settingsDeleteAccountHandler := &webapp.SettingsDeleteAccountHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, Renderer: responseRenderer, AccountDeletion: accountDeletionConfig, Clock: clockClock, - UIInfoResolver: uiService, + Users: userFacade, + Cookies: cookieManager, + OAuthSessions: oauthsessionStoreRedis, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, AuthenticationInfoService: authenticationinfoStoreRedis, } - return settingsDeleteAccountSuccessHandler + return settingsDeleteAccountHandler } -func newWebAppAccountStatusHandler(p *deps.RequestProvider) http.Handler { +func newWebAppSettingsDeleteAccountSuccessHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -59606,15 +59626,19 @@ func newWebAppAccountStatusHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - accountStatusHandler := &webapp.AccountStatusHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + settingsDeleteAccountSuccessHandler := &webapp.SettingsDeleteAccountSuccessHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + AccountDeletion: accountDeletionConfig, + Clock: clockClock, + UIInfoResolver: uiService, + AuthenticationInfoService: authenticationinfoStoreRedis, } - return accountStatusHandler + return settingsDeleteAccountSuccessHandler } -func newWebAppLogoutHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAccountStatusHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -60527,31 +60551,15 @@ func newWebAppLogoutHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - logoutHandler := &webapp.LogoutHandler{ - ControllerFactory: controllerFactory, - Database: handle, - TrustProxy: trustProxy, - OAuth: oAuthConfig, - UIConfig: uiConfig, - SessionManager: manager2, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - OAuthClientResolver: resolver, - } - return logoutHandler -} - -func newWebAppAppStaticAssetsHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - appContext := appProvider.AppContext - manager := appContext.Resources - appStaticAssetsHandler := &webapp.AppStaticAssetsHandler{ - Resources: manager, + accountStatusHandler := &webapp.AccountStatusHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return appStaticAssetsHandler + return accountStatusHandler } -func newWebAppReturnHandler(p *deps.RequestProvider) http.Handler { +func newWebAppLogoutHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -61464,15 +61472,31 @@ func newWebAppReturnHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - returnHandler := &webapp.ReturnHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + logoutHandler := &webapp.LogoutHandler{ + ControllerFactory: controllerFactory, + Database: handle, + TrustProxy: trustProxy, + OAuth: oAuthConfig, + UIConfig: uiConfig, + SessionManager: manager2, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + OAuthClientResolver: resolver, } - return returnHandler + return logoutHandler } -func newWebAppErrorHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAppStaticAssetsHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + appContext := appProvider.AppContext + manager := appContext.Resources + appStaticAssetsHandler := &webapp.AppStaticAssetsHandler{ + Resources: manager, + } + return appStaticAssetsHandler +} + +func newWebAppReturnHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -62385,28 +62409,49 @@ func newWebAppErrorHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - errorHandler := &webapp.ErrorHandler{ + returnHandler := &webapp.ReturnHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return errorHandler + return returnHandler } -func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { +func newWebAppErrorHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory - authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) + handle := appProvider.AppDatabase + appredisHandle := appProvider.Redis + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + appID := appConfig.ID + serviceLogger := webapp2.NewServiceLogger(factory) request := p.Request + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: appredisHandle, + } + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() + authenticationConfig := appConfig.Authentication + cookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig trustProxy := environmentConfig.TrustProxy + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: appredisHandle, + Cookies: cookieManager, + } + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI httpHost := deps.ProvideHTTPHost(request, trustProxy) httpProto := deps.ProvideHTTPProto(request, trustProxy) - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - uiConfig := appConfig.UI globalUIImplementation := environmentConfig.UIImplementation globalUISettingsImplementation := environmentConfig.UISettingsImplementation uiImplementationService := &web.UIImplementationService{ @@ -62419,52 +62464,46 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { HTTPProto: httpProto, UIImplementationService: uiImplementationService, } - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, } - clockClock := _wireSystemClockValue - sessionStoreRedis := &webapp2.SessionStoreRedis{ - AppID: appID, - Redis: handle, + resolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, } - sessionCookieDef := webapp2.NewSessionCookieDef() - signedUpCookieDef := webapp2.NewSignedUpCookieDef() + logger := interaction.NewLogger(factory) + remoteIP := deps.ProvideRemoteIP(request, trustProxy) contextContext := deps.ProvideRequestContext(request) + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + clockClock := _wireSystemClockValue featureConfig := config.FeatureConfig - remoteIP := deps.ProvideRemoteIP(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + redisLogger := redis.NewLogger(factory) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - appdbHandle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) - store := &user.Store{ + store := &redis.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Logger: redisLogger, SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, - AppID: appID, - } - rawCommands := &user.RawCommands{ - Store: store, - Clock: clockClock, - } - rawQueries := &user.RawQueries{ - Store: store, } userAgentString := deps.ProvideUserAgentString(request) - logger := event.NewLogger(factory) + eventLogger := event.NewLogger(factory) localizationConfig := appConfig.Localization sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) - authenticationConfig := appConfig.Authentication + userStore := &user.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + AppID: appID, + } + rawQueries := &user.RawQueries{ + Store: userStore, + } identityConfig := appConfig.Identity identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ @@ -62528,19 +62567,20 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { } store2 := &passkey2.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ + templateResolver := &template.Resolver{ Resources: manager, DefaultLanguageTag: defaultLanguageTag, SupportedLanguageTags: supportedLanguageTags, } engine := &template.Engine{ - Resolver: resolver, + Resolver: templateResolver, } + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -62578,14 +62618,14 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -62700,17 +62740,17 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -62736,7 +62776,7 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -62780,14 +62820,14 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { UserProfileConfig: userProfileConfig, Identities: serviceService, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, ClaimStore: storePQ, Transformer: pictureTransformer, } customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ Config: userProfileConfig, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, } nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint web3Service := &web3.Service{ @@ -62804,7 +62844,7 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { } userQueries := &user.Queries{ RawQueries: rawQueries, - Store: store, + Store: userStore, Identities: serviceService, Authenticators: service3, Verification: verificationService, @@ -62877,16 +62917,16 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: appdbHandle, + Database: handle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, Users: userQueries, - UserStore: store, + UserStore: userStore, IdentityService: serviceService, RolesGroups: rolesgroupsStore, TaskQueue: queue, @@ -62895,26 +62935,11 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: appdbHandle, - } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) - userCommands := &user.Commands{ - RawCommands: rawCommands, - RawQueries: rawQueries, - Events: eventService, - Verification: verificationService, - UserProfileConfig: userProfileConfig, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, - } - userProvider := &user.Provider{ - Commands: userCommands, - Queries: userQueries, + Database: handle, } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -62942,7 +62967,7 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: handle, + Redis: appredisHandle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -62957,21 +62982,21 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { FeatureConfig: messagingFeatureConfig, EnvConfig: rateLimitsEnvironmentConfig, } - serviceLogger := whatsapp.NewServiceLogger(factory) + whatsappServiceLogger := whatsapp.NewServiceLogger(factory) devMode := environmentConfig.DevMode featureTestModeWhatsappSuppressed := deps.ProvideTestModeWhatsappSuppressed(testModeFeatureConfig) testModeWhatsappConfig := testModeConfig.Whatsapp whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } onPremisesClient := whatsapp.NewWhatsappOnPremisesClient(whatsappConfig, whatsappOnPremisesCredentials, tokenStore) whatsappService := &whatsapp.Service{ Context: contextContext, - Logger: serviceLogger, + Logger: whatsappServiceLogger, DevMode: devMode, FeatureTestModeWhatsappSuppressed: featureTestModeWhatsappSuppressed, TestModeWhatsappConfig: testModeWhatsappConfig, @@ -62993,12 +63018,27 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { Sender: sender, Translation: translationService, } + rawCommands := &user.RawCommands{ + Store: userStore, + Clock: clockClock, + } + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } stdattrsService := &stdattrs2.Service{ UserProfileConfig: userProfileConfig, ServiceNoEvent: serviceNoEvent, Identities: serviceService, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, Events: eventService, } authorizationStore := &pq.AuthorizationStore{ @@ -63007,32 +63047,21 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, } sessionConfig := appConfig.Session - cookieDef := session.NewSessionCookieDef(sessionConfig) + cookieDef2 := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, Config: sessionConfig, Cookies: cookieManager, - CookieDef: cookieDef, - } - redisLogger := redis.NewLogger(factory) - redisStore := &redis.Store{ - Context: contextContext, - Redis: handle, - AppID: appID, - Logger: redisLogger, - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, + CookieDef: cookieDef2, } - oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -63044,7 +63073,7 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: handle, + Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -63052,19 +63081,15 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, Random: idpsessionRand, } - oauthclientResolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, - } offlineGrantService := oauth2.OfflineGrantService{ OAuthConfig: oAuthConfig, Clock: clockClock, IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, + ClientResolver: resolver, + OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ - Store: redisStore, + Store: store, Config: oAuthConfig, Service: offlineGrantService, } @@ -63103,31 +63128,43 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { identityFacade := facade.IdentityFacade{ Coordinator: coordinator, } + authenticatorFacade := facade.AuthenticatorFacade{ + Coordinator: coordinator, + } anonymousStoreRedis := &anonymous.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } - authenticatorFacade := facade.AuthenticatorFacade{ - Coordinator: coordinator, - } - mfaFacade := &facade.MFAFacade{ - Coordinator: coordinator, - } - customattrsService := &customattrs.Service{ - Config: userProfileConfig, - ServiceNoEvent: customattrsServiceNoEvent, - Events: eventService, - } messageSender := &otp.MessageSender{ Translation: translationService, Endpoints: endpointsEndpoints, Sender: sender, WhatsappService: whatsappService, } - workflowVerificationFacade := facade.WorkflowVerificationFacade{ - Verification: verificationService, + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + Context: contextContext, + AppID: appID, + Redis: appredisHandle, + } + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + webappoauthStore := &webappoauth.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, } forgotpasswordLogger := forgotpassword.NewLogger(factory) sender2 := forgotpassword.Sender{ @@ -63146,235 +63183,104 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { OTPSender: messageSender, PasswordSender: sender2, } - accountMigrationConfig := appConfig.AccountMigration - accountMigrationHookConfig := accountMigrationConfig.Hook - hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) - denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) - accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ - DenoHook: denoHook, - Client: hookDenoClient, - Logger: denoMiddlewareLogger, - } - hookWebHookImpl := &hook.WebHookImpl{ - Logger: webHookLogger, - Secret: webhookKeyMaterials, - } - hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) - webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) - accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ - WebHook: hookWebHookImpl, - Client: hookHTTPClient, - Logger: webhookMiddlewareLogger, - } - accountmigrationService := &accountmigration.Service{ - Config: accountMigrationHookConfig, - DenoHook: accountMigrationDenoHook, - WebHook: accountMigrationWebHook, + responseWriter := p.ResponseWriter + nonceService := &nonce.Service{ + Cookies: cookieManager, + Request: request, + ResponseWriter: responseWriter, } challengeProvider := &challenge.Provider{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } - captchaConfig := appConfig.Captcha - providerLogger := captcha.NewProviderLogger(factory) - deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) - cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) - captchaProvider := &captcha.Provider{ - RemoteIP: remoteIP, - Config: captchaConfig, - Logger: providerLogger, - CloudflareClient: cloudflareClient, - } - botProtectionConfig := appConfig.BotProtection - botprotectionProviderLogger := botprotection.NewProviderLogger(factory) - botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) - botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) - recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) - botprotectionProvider := &botprotection.Provider{ - RemoteIP: remoteIP, - Config: botProtectionConfig, - Logger: botprotectionProviderLogger, - CloudflareClient: botprotectionCloudflareClient, - RecaptchaV2Client: recaptchaV2Client, - Events: eventService, + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, } - oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) - oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) - simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ Context: contextContext, + Redis: appredisHandle, AppID: appID, - Redis: handle, - } - oAuthProviderFactory := &sso.OAuthProviderFactory{ - IdentityConfig: identityConfig, - Credentials: oAuthSSOProviderCredentials, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, - HTTPClient: oAuthHTTPClient, - SimpleStoreRedisFactory: simpleStoreRedisFactory, - } - requestOptionsService := &passkey2.RequestOptionsService{ - ConfigService: configService, - IdentityService: serviceService, - Store: store2, - } - creationOptionsService := &passkey2.CreationOptionsService{ - ConfigService: configService, - UserService: userQueries, - IdentityService: serviceService, - Store: store2, - } - ldapConfig := identityConfig.LDAP - ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) - clientFactory := &ldap2.ClientFactory{ - Config: ldapConfig, - SecretConfig: ldapServerUserCredentials, } manager2 := &session.Manager{ IDPSessions: idpsessionManager, AccessTokenSessions: sessionManager, Events: eventService, } - authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + oauthsessionStoreRedis := &oauthsession.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } - mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) - idTokenIssuer := &oidc.IDTokenIssuer{ - Secrets: oAuthKeyMaterials, - BaseURL: endpointsEndpoints, - Users: userQueries, - RolesAndGroups: queries, - Clock: clockClock, - } - dependencies := &authenticationflow.Dependencies{ + interactionContext := &interaction.Context{ + Request: request, + RemoteIP: remoteIP, + Database: sqlExecutor, + Clock: clockClock, Config: appConfig, FeatureConfig: featureConfig, - Clock: clockClock, - RemoteIP: remoteIP, - HTTPOrigin: httpOrigin, - HTTPRequest: request, - Users: userProvider, + OAuthClientResolver: resolver, + OfflineGrants: store, Identities: identityFacade, + Authenticators: authenticatorFacade, AnonymousIdentities: anonymousProvider, AnonymousUserPromotionCodeStore: anonymousStoreRedis, - Authenticators: authenticatorFacade, - MFA: mfaFacade, - StdAttrsService: stdattrsService, - CustomAttrsService: customattrsService, - OTPCodes: otpService, + BiometricIdentities: biometricProvider, + OTPCodeService: otpService, OTPSender: messageSender, - Verification: workflowVerificationFacade, + OAuthProviderFactory: oAuthProviderFactory, + OAuthRedirectURIBuilder: endpointsEndpoints, + OAuthStateStore: webappoauthStore, + MFA: mfaFacade, ForgotPassword: forgotpasswordService, ResetPassword: forgotpasswordService, - AccountMigrations: accountmigrationService, + Passkey: passkeyService, + Verification: verificationService, + RateLimiter: limiter, + PasswordGenerator: generator, + Nonces: nonceService, Challenges: challengeProvider, - Captcha: captchaProvider, - BotProtection: botprotectionProvider, - OAuthProviderFactory: oAuthProviderFactory, - PasskeyRequestOptionsService: requestOptionsService, - PasskeyCreationOptionsService: creationOptionsService, - PasskeyService: passkeyService, - LoginIDs: provider, - LDAP: ldapProvider, - LDAPClientFactory: clientFactory, - IDPSessions: idpsessionProvider, - Sessions: manager2, - AuthenticationInfos: authenticationinfoStoreRedis, - SessionCookie: cookieDef, - MFADeviceTokenCookie: mfaCookieDef, - Cookies: cookieManager, + Users: userProvider, + StdAttrsService: stdattrsService, Events: eventService, - RateLimiter: limiter, - OfflineGrants: redisStore, - IDTokens: idTokenIssuer, - } - authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) - authenticationflowStoreImpl := &authenticationflow.StoreImpl{ - Redis: handle, - AppID: appID, - Context: contextContext, - } - uiService := &authenticationinfo.UIService{ - EndpointsProvider: endpointsEndpoints, - } - authenticationflowService := &authenticationflow.Service{ - ContextDoNotUseDirectly: contextContext, - Deps: dependencies, - Logger: authenticationflowServiceLogger, - Store: authenticationflowStoreImpl, - Database: appdbHandle, - UIConfig: uiConfig, - UIInfoResolver: uiService, - OAuthClientResolver: oauthclientResolver, - } - oauthsessionStoreRedis := &oauthsession.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - samlsessionStoreRedis := &samlsession.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - promptResolver := &oauth2.PromptResolver{ - Clock: clockClock, - } - oauthOfflineGrantService := &oauth2.OfflineGrantService{ - OAuthConfig: oAuthConfig, - Clock: clockClock, - IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, - } - idTokenHintResolver := &oidc.IDTokenHintResolver{ - Issuer: idTokenIssuer, - Sessions: idpsessionProvider, - OfflineGrantService: oauthOfflineGrantService, - } - uiInfoResolver := &oidc.UIInfoResolver{ - Config: oAuthConfig, - EndpointsProvider: endpointsEndpoints, - PromptResolver: promptResolver, - IDTokenHintResolver: idTokenHintResolver, - Clock: clockClock, - Cookies: cookieManager, - ClientResolver: oauthclientResolver, + CookieManager: cookieManager, + AuthenticationInfoService: authenticationinfoStoreRedis, + Sessions: idpsessionProvider, + SessionManager: manager2, + SessionCookie: cookieDef2, + OAuthSessions: oauthsessionStoreRedis, + MFADeviceTokenCookie: cookieDef, } - webappoauthStore := &webappoauth.Store{ - Context: contextContext, - Redis: handle, - AppID: appID, + interactionStoreRedis := &interaction.StoreRedis{ + Redis: appredisHandle, + AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ - Endpoints: endpointsEndpoints, - OAuthStateStore: webappoauthStore, + interactionService := &interaction.Service{ + Logger: logger, + Context: interactionContext, + Store: interactionStoreRedis, } - authflowController := &webapp.AuthflowController{ - Logger: authflowControllerLogger, - TesterEndpointsProvider: endpointsEndpoints, - ErrorService: errorService, - TrustProxy: trustProxy, - Clock: clockClock, - Cookies: cookieManager, - Sessions: sessionStoreRedis, - SessionCookie: sessionCookieDef, - SignedUpCookie: signedUpCookieDef, - Authflows: authenticationflowService, - OAuthSessions: oauthsessionStoreRedis, - SAMLSessions: samlsessionStoreRedis, - UIInfoResolver: uiInfoResolver, - UIConfig: uiConfig, - OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + webappService2 := &webapp2.Service2{ + Logger: serviceLogger, + Request: request, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, + SignedUpCookie: signedUpCookieDef, + MFADeviceTokenCookie: cookieDef, + ErrorService: errorService, + Cookies: cookieManager, + OAuthConfig: oAuthConfig, + UIConfig: uiConfig, + TrustProxy: trustProxy, + UIInfoResolver: uiService, + OAuthClientResolver: resolver, + Graph: interactionService, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection flashMessage := &httputil.FlashMessage{ Cookies: cookieManager, } @@ -63399,21 +63305,40 @@ func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { SupportedLanguageTags: supportedLanguageTags, AuthUISentryDSN: authUISentryDSN, AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: oauthclientResolver, + OAuthClientResolver: resolver, Logger: baseLogger, } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ErrorHandler := &authflowv2.AuthflowV2ErrorHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + publisher := webapp.NewPublisher(appID, appredisHandle) + controllerDeps := webapp.ControllerDeps{ + Database: handle, + RedisHandle: appredisHandle, + AppID: appID, + Page: webappService2, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Publisher: publisher, + Clock: clockClock, + UIConfig: uiConfig, + ErrorService: errorService, + TesterEndpointsProvider: endpointsEndpoints, + TrustProxy: trustProxy, } - return authflowV2ErrorHandler + controllerFactory := webapp.ControllerFactory{ + LoggerFactory: factory, + ControllerDeps: controllerDeps, + } + errorHandler := &webapp.ErrorHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + } + return errorHandler } -func newWebAppCSRFErrorInstructionHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ErrorHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -64425,49 +64350,28 @@ func newWebAppCSRFErrorInstructionHandler(p *deps.RequestProvider) http.Handler responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - csrfErrorInstructionHandler := &webapp.CSRFErrorInstructionHandler{ + authflowV2ErrorHandler := &authflowv2.AuthflowV2ErrorHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return csrfErrorInstructionHandler + return authflowV2ErrorHandler } -func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { +func newWebAppCSRFErrorInstructionHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory - handle := appProvider.AppDatabase - appredisHandle := appProvider.Redis - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - appID := appConfig.ID - serviceLogger := webapp2.NewServiceLogger(factory) + authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) request := p.Request - sessionStoreRedis := &webapp2.SessionStoreRedis{ - AppID: appID, - Redis: appredisHandle, - } - sessionCookieDef := webapp2.NewSessionCookieDef() - signedUpCookieDef := webapp2.NewSignedUpCookieDef() - authenticationConfig := appConfig.Authentication - cookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig trustProxy := environmentConfig.TrustProxy - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: appredisHandle, - Cookies: cookieManager, - } - oAuthConfig := appConfig.OAuth - uiConfig := appConfig.UI httpHost := deps.ProvideHTTPHost(request, trustProxy) httpProto := deps.ProvideHTTPProto(request, trustProxy) + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + uiConfig := appConfig.UI globalUIImplementation := environmentConfig.UIImplementation globalUISettingsImplementation := environmentConfig.UISettingsImplementation uiImplementationService := &web.UIImplementationService{ @@ -64480,46 +64384,52 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { HTTPProto: httpProto, UIImplementationService: uiImplementationService, } - uiService := &authenticationinfo.UIService{ - EndpointsProvider: endpointsEndpoints, + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, } - resolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, + clockClock := _wireSystemClockValue + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: handle, } - logger := interaction.NewLogger(factory) - remoteIP := deps.ProvideRemoteIP(request, trustProxy) + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() contextContext := deps.ProvideRequestContext(request) - sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) - clockClock := _wireSystemClockValue featureConfig := config.FeatureConfig - redisLogger := redis.NewLogger(factory) + remoteIP := deps.ProvideRemoteIP(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - store := &redis.Store{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, - Logger: redisLogger, + appdbHandle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) + store := &user.Store{ SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, + AppID: appID, + } + rawCommands := &user.RawCommands{ + Store: store, + Clock: clockClock, + } + rawQueries := &user.RawQueries{ + Store: store, } userAgentString := deps.ProvideUserAgentString(request) - eventLogger := event.NewLogger(factory) + logger := event.NewLogger(factory) localizationConfig := appConfig.Localization sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) - userStore := &user.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, - AppID: appID, - } - rawQueries := &user.RawQueries{ - Store: userStore, - } + authenticationConfig := appConfig.Authentication identityConfig := appConfig.Identity identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ @@ -64583,20 +64493,19 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { } store2 := &passkey2.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - templateResolver := &template.Resolver{ + resolver := &template.Resolver{ Resources: manager, DefaultLanguageTag: defaultLanguageTag, SupportedLanguageTags: supportedLanguageTags, } engine := &template.Engine{ - Resolver: templateResolver, + Resolver: resolver, } - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -64634,14 +64543,14 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -64756,17 +64665,17 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -64792,7 +64701,7 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -64836,14 +64745,14 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { UserProfileConfig: userProfileConfig, Identities: serviceService, UserQueries: rawQueries, - UserStore: userStore, + UserStore: store, ClaimStore: storePQ, Transformer: pictureTransformer, } customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ Config: userProfileConfig, UserQueries: rawQueries, - UserStore: userStore, + UserStore: store, } nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint web3Service := &web3.Service{ @@ -64860,7 +64769,7 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { } userQueries := &user.Queries{ RawQueries: rawQueries, - Store: userStore, + Store: store, Identities: serviceService, Authenticators: service3, Verification: verificationService, @@ -64933,16 +64842,16 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: handle, + Database: appdbHandle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, Users: userQueries, - UserStore: userStore, + UserStore: store, IdentityService: serviceService, RolesGroups: rolesgroupsStore, TaskQueue: queue, @@ -64951,11 +64860,26 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: handle, + Database: appdbHandle, + } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -64983,7 +64907,7 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: appredisHandle, + Redis: handle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -64998,21 +64922,21 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { FeatureConfig: messagingFeatureConfig, EnvConfig: rateLimitsEnvironmentConfig, } - whatsappServiceLogger := whatsapp.NewServiceLogger(factory) + serviceLogger := whatsapp.NewServiceLogger(factory) devMode := environmentConfig.DevMode featureTestModeWhatsappSuppressed := deps.ProvideTestModeWhatsappSuppressed(testModeFeatureConfig) testModeWhatsappConfig := testModeConfig.Whatsapp whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } onPremisesClient := whatsapp.NewWhatsappOnPremisesClient(whatsappConfig, whatsappOnPremisesCredentials, tokenStore) whatsappService := &whatsapp.Service{ Context: contextContext, - Logger: whatsappServiceLogger, + Logger: serviceLogger, DevMode: devMode, FeatureTestModeWhatsappSuppressed: featureTestModeWhatsappSuppressed, TestModeWhatsappConfig: testModeWhatsappConfig, @@ -65034,27 +64958,12 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { Sender: sender, Translation: translationService, } - rawCommands := &user.RawCommands{ - Store: userStore, - Clock: clockClock, - } - userCommands := &user.Commands{ - RawCommands: rawCommands, - RawQueries: rawQueries, - Events: eventService, - Verification: verificationService, - UserProfileConfig: userProfileConfig, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, - } stdattrsService := &stdattrs2.Service{ UserProfileConfig: userProfileConfig, ServiceNoEvent: serviceNoEvent, Identities: serviceService, UserQueries: rawQueries, - UserStore: userStore, + UserStore: store, Events: eventService, } authorizationStore := &pq.AuthorizationStore{ @@ -65063,21 +64972,32 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, } sessionConfig := appConfig.Session - cookieDef2 := session.NewSessionCookieDef(sessionConfig) + cookieDef := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, Config: sessionConfig, Cookies: cookieManager, - CookieDef: cookieDef2, + CookieDef: cookieDef, } + redisLogger := redis.NewLogger(factory) + redisStore := &redis.Store{ + Context: contextContext, + Redis: handle, + AppID: appID, + Logger: redisLogger, + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + } + oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -65089,7 +65009,7 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: appredisHandle, + Redis: handle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -65097,15 +65017,19 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, Random: idpsessionRand, } + oauthclientResolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } offlineGrantService := oauth2.OfflineGrantService{ OAuthConfig: oAuthConfig, Clock: clockClock, IDPSessions: idpsessionProvider, - ClientResolver: resolver, - OfflineGrants: store, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ - Store: store, + Store: redisStore, Config: oAuthConfig, Service: offlineGrantService, } @@ -65144,43 +65068,31 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { identityFacade := facade.IdentityFacade{ Coordinator: coordinator, } - authenticatorFacade := facade.AuthenticatorFacade{ - Coordinator: coordinator, - } anonymousStoreRedis := &anonymous.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } + authenticatorFacade := facade.AuthenticatorFacade{ + Coordinator: coordinator, + } + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, + } + customattrsService := &customattrs.Service{ + Config: userProfileConfig, + ServiceNoEvent: customattrsServiceNoEvent, + Events: eventService, + } messageSender := &otp.MessageSender{ Translation: translationService, Endpoints: endpointsEndpoints, Sender: sender, WhatsappService: whatsappService, } - oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) - oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) - simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ - Context: contextContext, - AppID: appID, - Redis: appredisHandle, - } - oAuthProviderFactory := &sso.OAuthProviderFactory{ - IdentityConfig: identityConfig, - Credentials: oAuthSSOProviderCredentials, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, - HTTPClient: oAuthHTTPClient, - SimpleStoreRedisFactory: simpleStoreRedisFactory, - } - webappoauthStore := &webappoauth.Store{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, - } - mfaFacade := &facade.MFAFacade{ - Coordinator: coordinator, + workflowVerificationFacade := facade.WorkflowVerificationFacade{ + Verification: verificationService, } forgotpasswordLogger := forgotpassword.NewLogger(factory) sender2 := forgotpassword.Sender{ @@ -65199,104 +65111,235 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { OTPSender: messageSender, PasswordSender: sender2, } - responseWriter := p.ResponseWriter - nonceService := &nonce.Service{ - Cookies: cookieManager, - Request: request, - ResponseWriter: responseWriter, + accountMigrationConfig := appConfig.AccountMigration + accountMigrationHookConfig := accountMigrationConfig.Hook + hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) + denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) + accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ + DenoHook: denoHook, + Client: hookDenoClient, + Logger: denoMiddlewareLogger, + } + hookWebHookImpl := &hook.WebHookImpl{ + Logger: webHookLogger, + Secret: webhookKeyMaterials, + } + hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) + webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) + accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ + WebHook: hookWebHookImpl, + Client: hookHTTPClient, + Logger: webhookMiddlewareLogger, + } + accountmigrationService := &accountmigration.Service{ + Config: accountMigrationHookConfig, + DenoHook: accountMigrationDenoHook, + WebHook: accountMigrationWebHook, } challengeProvider := &challenge.Provider{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } - userProvider := &user.Provider{ - Commands: userCommands, - Queries: userQueries, + captchaConfig := appConfig.Captcha + providerLogger := captcha.NewProviderLogger(factory) + deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) + cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) + captchaProvider := &captcha.Provider{ + RemoteIP: remoteIP, + Config: captchaConfig, + Logger: providerLogger, + CloudflareClient: cloudflareClient, } - authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + botProtectionConfig := appConfig.BotProtection + botprotectionProviderLogger := botprotection.NewProviderLogger(factory) + botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) + botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) + recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) + botprotectionProvider := &botprotection.Provider{ + RemoteIP: remoteIP, + Config: botProtectionConfig, + Logger: botprotectionProviderLogger, + CloudflareClient: botprotectionCloudflareClient, + RecaptchaV2Client: recaptchaV2Client, + Events: eventService, + } + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ Context: contextContext, - Redis: appredisHandle, AppID: appID, + Redis: handle, + } + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + requestOptionsService := &passkey2.RequestOptionsService{ + ConfigService: configService, + IdentityService: serviceService, + Store: store2, + } + creationOptionsService := &passkey2.CreationOptionsService{ + ConfigService: configService, + UserService: userQueries, + IdentityService: serviceService, + Store: store2, + } + ldapConfig := identityConfig.LDAP + ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) + clientFactory := &ldap2.ClientFactory{ + Config: ldapConfig, + SecretConfig: ldapServerUserCredentials, } manager2 := &session.Manager{ IDPSessions: idpsessionManager, AccessTokenSessions: sessionManager, Events: eventService, } - oauthsessionStoreRedis := &oauthsession.StoreRedis{ + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } - interactionContext := &interaction.Context{ - Request: request, - RemoteIP: remoteIP, - Database: sqlExecutor, - Clock: clockClock, + mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + idTokenIssuer := &oidc.IDTokenIssuer{ + Secrets: oAuthKeyMaterials, + BaseURL: endpointsEndpoints, + Users: userQueries, + RolesAndGroups: queries, + Clock: clockClock, + } + dependencies := &authenticationflow.Dependencies{ Config: appConfig, FeatureConfig: featureConfig, - OAuthClientResolver: resolver, - OfflineGrants: store, + Clock: clockClock, + RemoteIP: remoteIP, + HTTPOrigin: httpOrigin, + HTTPRequest: request, + Users: userProvider, Identities: identityFacade, - Authenticators: authenticatorFacade, AnonymousIdentities: anonymousProvider, AnonymousUserPromotionCodeStore: anonymousStoreRedis, - BiometricIdentities: biometricProvider, - OTPCodeService: otpService, - OTPSender: messageSender, - OAuthProviderFactory: oAuthProviderFactory, - OAuthRedirectURIBuilder: endpointsEndpoints, - OAuthStateStore: webappoauthStore, + Authenticators: authenticatorFacade, MFA: mfaFacade, + StdAttrsService: stdattrsService, + CustomAttrsService: customattrsService, + OTPCodes: otpService, + OTPSender: messageSender, + Verification: workflowVerificationFacade, ForgotPassword: forgotpasswordService, ResetPassword: forgotpasswordService, - Passkey: passkeyService, - Verification: verificationService, - RateLimiter: limiter, - PasswordGenerator: generator, - Nonces: nonceService, + AccountMigrations: accountmigrationService, Challenges: challengeProvider, - Users: userProvider, - StdAttrsService: stdattrsService, + Captcha: captchaProvider, + BotProtection: botprotectionProvider, + OAuthProviderFactory: oAuthProviderFactory, + PasskeyRequestOptionsService: requestOptionsService, + PasskeyCreationOptionsService: creationOptionsService, + PasskeyService: passkeyService, + LoginIDs: provider, + LDAP: ldapProvider, + LDAPClientFactory: clientFactory, + IDPSessions: idpsessionProvider, + Sessions: manager2, + AuthenticationInfos: authenticationinfoStoreRedis, + SessionCookie: cookieDef, + MFADeviceTokenCookie: mfaCookieDef, + Cookies: cookieManager, Events: eventService, - CookieManager: cookieManager, - AuthenticationInfoService: authenticationinfoStoreRedis, - Sessions: idpsessionProvider, - SessionManager: manager2, - SessionCookie: cookieDef2, - OAuthSessions: oauthsessionStoreRedis, - MFADeviceTokenCookie: cookieDef, + RateLimiter: limiter, + OfflineGrants: redisStore, + IDTokens: idTokenIssuer, } - interactionStoreRedis := &interaction.StoreRedis{ - Redis: appredisHandle, - AppID: appID, + authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) + authenticationflowStoreImpl := &authenticationflow.StoreImpl{ + Redis: handle, + AppID: appID, + Context: contextContext, } - interactionService := &interaction.Service{ - Logger: logger, - Context: interactionContext, - Store: interactionStoreRedis, + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, } - webappService2 := &webapp2.Service2{ - Logger: serviceLogger, - Request: request, - Sessions: sessionStoreRedis, - SessionCookie: sessionCookieDef, - SignedUpCookie: signedUpCookieDef, - MFADeviceTokenCookie: cookieDef, - ErrorService: errorService, - Cookies: cookieManager, - OAuthConfig: oAuthConfig, - UIConfig: uiConfig, - TrustProxy: trustProxy, - UIInfoResolver: uiService, - OAuthClientResolver: resolver, - Graph: interactionService, + authenticationflowService := &authenticationflow.Service{ + ContextDoNotUseDirectly: contextContext, + Deps: dependencies, + Logger: authenticationflowServiceLogger, + Store: authenticationflowStoreImpl, + Database: appdbHandle, + UIConfig: uiConfig, + UIInfoResolver: uiService, + OAuthClientResolver: oauthclientResolver, + } + oauthsessionStoreRedis := &oauthsession.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + samlsessionStoreRedis := &samlsession.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + promptResolver := &oauth2.PromptResolver{ + Clock: clockClock, + } + oauthOfflineGrantService := &oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, + } + idTokenHintResolver := &oidc.IDTokenHintResolver{ + Issuer: idTokenIssuer, + Sessions: idpsessionProvider, + OfflineGrantService: oauthOfflineGrantService, + } + uiInfoResolver := &oidc.UIInfoResolver{ + Config: oAuthConfig, + EndpointsProvider: endpointsEndpoints, + PromptResolver: promptResolver, + IDTokenHintResolver: idTokenHintResolver, + Clock: clockClock, + Cookies: cookieManager, + ClientResolver: oauthclientResolver, + } + webappoauthStore := &webappoauth.Store{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + Endpoints: endpointsEndpoints, + OAuthStateStore: webappoauthStore, + } + authflowController := &webapp.AuthflowController{ + Logger: authflowControllerLogger, + TesterEndpointsProvider: endpointsEndpoints, + ErrorService: errorService, + TrustProxy: trustProxy, + Clock: clockClock, + Cookies: cookieManager, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, + SignedUpCookie: signedUpCookieDef, + Authflows: authenticationflowService, + OAuthSessions: oauthsessionStoreRedis, + SAMLSessions: samlsessionStoreRedis, + UIInfoResolver: uiInfoResolver, + UIConfig: uiConfig, + OAuthClientResolver: oauthclientResolver, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword googleTagManagerConfig := appConfig.GoogleTagManager - botProtectionConfig := appConfig.BotProtection flashMessage := &httputil.FlashMessage{ Cookies: cookieManager, } @@ -65321,40 +65364,21 @@ func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { SupportedLanguageTags: supportedLanguageTags, AuthUISentryDSN: authUISentryDSN, AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: resolver, + OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - publisher := webapp.NewPublisher(appID, appredisHandle) - controllerDeps := webapp.ControllerDeps{ - Database: handle, - RedisHandle: appredisHandle, - AppID: appID, - Page: webappService2, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - Publisher: publisher, - Clock: clockClock, - UIConfig: uiConfig, - ErrorService: errorService, - TesterEndpointsProvider: endpointsEndpoints, - TrustProxy: trustProxy, - } - controllerFactory := webapp.ControllerFactory{ - LoggerFactory: factory, - ControllerDeps: controllerDeps, - } - notFoundHandler := &webapp.NotFoundHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + csrfErrorInstructionHandler := &webapp.CSRFErrorInstructionHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return notFoundHandler + return csrfErrorInstructionHandler } -func newWebAppAuthflowV2NotFoundHandler(p *deps.RequestProvider) http.Handler { +func newWebAppNotFoundHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -66267,45 +66291,28 @@ func newWebAppAuthflowV2NotFoundHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - authflowV2NotFoundHandler := &authflowv2.AuthflowV2NotFoundHandler{ + notFoundHandler := &webapp.NotFoundHandler{ ControllerFactory: controllerFactory, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2NotFoundHandler + return notFoundHandler } -func newWebAppWebsocketHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2NotFoundHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider + factory := appProvider.LoggerFactory + handle := appProvider.AppDatabase + appredisHandle := appProvider.Redis appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig appID := appConfig.ID - factory := appProvider.LoggerFactory - handle := appProvider.Redis - publisher := webapp.NewPublisher(appID, handle) - websocketHandler := &webapp.WebsocketHandler{ - AppID: appID, - LoggerFactory: factory, - RedisHandle: handle, - Publisher: publisher, - } - return websocketHandler -} - -func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - factory := appProvider.LoggerFactory serviceLogger := webapp2.NewServiceLogger(factory) request := p.Request - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - appID := appConfig.ID - handle := appProvider.Redis sessionStoreRedis := &webapp2.SessionStoreRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } sessionCookieDef := webapp2.NewSessionCookieDef() signedUpCookieDef := webapp2.NewSignedUpCookieDef() @@ -66320,7 +66327,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle errorService := &webapp2.ErrorService{ AppID: appID, Cookie: errorTokenCookieDef, - RedisHandle: handle, + RedisHandle: appredisHandle, Cookies: cookieManager, } oAuthConfig := appConfig.OAuth @@ -66349,8 +66356,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle logger := interaction.NewLogger(factory) remoteIP := deps.ProvideRemoteIP(request, trustProxy) contextContext := deps.ProvideRequestContext(request) - appdbHandle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) clockClock := _wireSystemClockValue featureConfig := config.FeatureConfig redisLogger := redis.NewLogger(factory) @@ -66359,7 +66365,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) store := &redis.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Logger: redisLogger, SQLBuilder: sqlBuilderApp, @@ -66443,7 +66449,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle } store2 := &passkey2.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) @@ -66494,14 +66500,14 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -66616,17 +66622,17 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -66652,7 +66658,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -66793,11 +66799,11 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: appdbHandle, + Database: handle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, @@ -66811,11 +66817,11 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: appdbHandle, + Database: handle, } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -66843,7 +66849,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: handle, + Redis: appredisHandle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -66865,7 +66871,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -66923,7 +66929,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, @@ -66937,7 +66943,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle CookieDef: cookieDef2, } eventStoreRedis := &access.EventStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -66949,7 +66955,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: handle, + Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -67009,7 +67015,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle } anonymousStoreRedis := &anonymous.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -67024,7 +67030,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ Context: contextContext, AppID: appID, - Redis: handle, + Redis: appredisHandle, } oAuthProviderFactory := &sso.OAuthProviderFactory{ IdentityConfig: identityConfig, @@ -67036,7 +67042,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle } webappoauthStore := &webappoauth.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } mfaFacade := &facade.MFAFacade{ @@ -67066,7 +67072,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle ResponseWriter: responseWriter, } challengeProvider := &challenge.Provider{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -67076,7 +67082,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle } authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } manager2 := &session.Manager{ @@ -67086,7 +67092,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle } oauthsessionStoreRedis := &oauthsession.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } interactionContext := &interaction.Context{ @@ -67129,7 +67135,7 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle MFADeviceTokenCookie: cookieDef, } interactionStoreRedis := &interaction.StoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, } interactionService := &interaction.Service{ @@ -67153,26 +67159,86 @@ func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handle OAuthClientResolver: resolver, Graph: interactionService, } - jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) - jsonResponseWriter := &httputil.JSONResponseWriter{ - Logger: jsonResponseWriterLogger, + uiFeatureConfig := featureConfig.UI + forgotPasswordConfig := appConfig.ForgotPassword + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, } - creationOptionsService := &passkey2.CreationOptionsService{ - ConfigService: configService, - UserService: userQueries, - IdentityService: serviceService, - Store: store2, + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: resolver, + Logger: baseLogger, } - passkeyCreationOptionsHandler := &webapp.PasskeyCreationOptionsHandler{ - Page: webappService2, - Database: appdbHandle, - JSON: jsonResponseWriter, - Passkey: creationOptionsService, + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, } - return passkeyCreationOptionsHandler + publisher := webapp.NewPublisher(appID, appredisHandle) + controllerDeps := webapp.ControllerDeps{ + Database: handle, + RedisHandle: appredisHandle, + AppID: appID, + Page: webappService2, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Publisher: publisher, + Clock: clockClock, + UIConfig: uiConfig, + ErrorService: errorService, + TesterEndpointsProvider: endpointsEndpoints, + TrustProxy: trustProxy, + } + controllerFactory := webapp.ControllerFactory{ + LoggerFactory: factory, + ControllerDeps: controllerDeps, + } + authflowV2NotFoundHandler := &authflowv2.AuthflowV2NotFoundHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + } + return authflowV2NotFoundHandler } -func newWebAppPasskeyRequestOptionsHandler(p *deps.RequestProvider) http.Handler { +func newWebAppWebsocketHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + appID := appConfig.ID + factory := appProvider.LoggerFactory + handle := appProvider.Redis + publisher := webapp.NewPublisher(appID, handle) + websocketHandler := &webapp.WebsocketHandler{ + AppID: appID, + LoggerFactory: factory, + RedisHandle: handle, + Publisher: publisher, + } + return websocketHandler +} + +func newWebAppPasskeyCreationOptionsHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory serviceLogger := webapp2.NewServiceLogger(factory) @@ -68036,34 +68102,34 @@ func newWebAppPasskeyRequestOptionsHandler(p *deps.RequestProvider) http.Handler jsonResponseWriter := &httputil.JSONResponseWriter{ Logger: jsonResponseWriterLogger, } - requestOptionsService := &passkey2.RequestOptionsService{ + creationOptionsService := &passkey2.CreationOptionsService{ ConfigService: configService, + UserService: userQueries, IdentityService: serviceService, Store: store2, } - passkeyRequestOptionsHandler := &webapp.PasskeyRequestOptionsHandler{ + passkeyCreationOptionsHandler := &webapp.PasskeyCreationOptionsHandler{ Page: webappService2, Database: appdbHandle, JSON: jsonResponseWriter, - Passkey: requestOptionsService, + Passkey: creationOptionsService, } - return passkeyRequestOptionsHandler + return passkeyCreationOptionsHandler } -func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { +func newWebAppPasskeyRequestOptionsHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory - handle := appProvider.AppDatabase - appredisHandle := appProvider.Redis + serviceLogger := webapp2.NewServiceLogger(factory) + request := p.Request appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig appID := appConfig.ID - serviceLogger := webapp2.NewServiceLogger(factory) - request := p.Request + handle := appProvider.Redis sessionStoreRedis := &webapp2.SessionStoreRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } sessionCookieDef := webapp2.NewSessionCookieDef() signedUpCookieDef := webapp2.NewSignedUpCookieDef() @@ -68078,7 +68144,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { errorService := &webapp2.ErrorService{ AppID: appID, Cookie: errorTokenCookieDef, - RedisHandle: appredisHandle, + RedisHandle: handle, Cookies: cookieManager, } oAuthConfig := appConfig.OAuth @@ -68107,7 +68173,8 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { logger := interaction.NewLogger(factory) remoteIP := deps.ProvideRemoteIP(request, trustProxy) contextContext := deps.ProvideRequestContext(request) - sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + appdbHandle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) clockClock := _wireSystemClockValue featureConfig := config.FeatureConfig redisLogger := redis.NewLogger(factory) @@ -68116,7 +68183,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) store := &redis.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Logger: redisLogger, SQLBuilder: sqlBuilderApp, @@ -68200,7 +68267,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { } store2 := &passkey2.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) @@ -68251,14 +68318,14 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -68373,17 +68440,17 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -68409,7 +68476,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -68550,11 +68617,11 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: handle, + Database: appdbHandle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, @@ -68568,11 +68635,11 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: handle, + Database: appdbHandle, } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -68600,7 +68667,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: appredisHandle, + Redis: handle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -68622,7 +68689,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -68680,7 +68747,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, @@ -68694,7 +68761,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { CookieDef: cookieDef2, } eventStoreRedis := &access.EventStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -68706,7 +68773,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: appredisHandle, + Redis: handle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -68766,7 +68833,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { } anonymousStoreRedis := &anonymous.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -68781,7 +68848,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ Context: contextContext, AppID: appID, - Redis: appredisHandle, + Redis: handle, } oAuthProviderFactory := &sso.OAuthProviderFactory{ IdentityConfig: identityConfig, @@ -68793,7 +68860,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { } webappoauthStore := &webappoauth.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } mfaFacade := &facade.MFAFacade{ @@ -68823,7 +68890,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { ResponseWriter: responseWriter, } challengeProvider := &challenge.Provider{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -68833,7 +68900,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { } authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } manager2 := &session.Manager{ @@ -68843,7 +68910,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { } oauthsessionStoreRedis := &oauthsession.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } interactionContext := &interaction.Context{ @@ -68886,7 +68953,7 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { MFADeviceTokenCookie: cookieDef, } interactionStoreRedis := &interaction.StoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, } interactionService := &interaction.Service{ @@ -68910,78 +68977,25 @@ func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { OAuthClientResolver: resolver, Graph: interactionService, } - uiFeatureConfig := featureConfig.UI - forgotPasswordConfig := appConfig.ForgotPassword - googleTagManagerConfig := appConfig.GoogleTagManager - botProtectionConfig := appConfig.BotProtection - flashMessage := &httputil.FlashMessage{ - Cookies: cookieManager, - } - authUISentryDSN := environmentConfig.AuthUISentryDSN - authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins - baseLogger := viewmodels.NewBaseLogger(factory) - baseViewModeler := &viewmodels.BaseViewModeler{ - TrustProxy: trustProxy, - OAuth: oAuthConfig, - AuthUI: uiConfig, - AuthUIFeatureConfig: uiFeatureConfig, - StaticAssets: staticAssetResolver, - ForgotPassword: forgotPasswordConfig, - Authentication: authenticationConfig, - GoogleTagManager: googleTagManagerConfig, - BotProtection: botProtectionConfig, - ErrorService: errorService, - Translations: translationService, - Clock: clockClock, - FlashMessage: flashMessage, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - AuthUISentryDSN: authUISentryDSN, - AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: resolver, - Logger: baseLogger, - } - responseRenderer := &webapp.ResponseRenderer{ - TemplateEngine: engine, - } - publisher := webapp.NewPublisher(appID, appredisHandle) - controllerDeps := webapp.ControllerDeps{ - Database: handle, - RedisHandle: appredisHandle, - AppID: appID, - Page: webappService2, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - Publisher: publisher, - Clock: clockClock, - UIConfig: uiConfig, - ErrorService: errorService, - TesterEndpointsProvider: endpointsEndpoints, - TrustProxy: trustProxy, - } - controllerFactory := webapp.ControllerFactory{ - LoggerFactory: factory, - ControllerDeps: controllerDeps, - } - authenticationViewModeler := &viewmodels.AuthenticationViewModeler{ - Authentication: authenticationConfig, - LoginID: loginIDConfig, + jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) + jsonResponseWriter := &httputil.JSONResponseWriter{ + Logger: jsonResponseWriterLogger, } - alternativeStepsViewModeler := &viewmodels.AlternativeStepsViewModeler{ - AuthenticationConfig: authenticationConfig, + requestOptionsService := &passkey2.RequestOptionsService{ + ConfigService: configService, + IdentityService: serviceService, + Store: store2, } - connectWeb3AccountHandler := &webapp.ConnectWeb3AccountHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - AuthenticationViewModel: authenticationViewModeler, - AlternativeStepsViewModel: alternativeStepsViewModeler, - Renderer: responseRenderer, - AuthenticationConfig: authenticationConfig, + passkeyRequestOptionsHandler := &webapp.PasskeyRequestOptionsHandler{ + Page: webappService2, + Database: appdbHandle, + JSON: jsonResponseWriter, + Passkey: requestOptionsService, } - return connectWeb3AccountHandler + return passkeyRequestOptionsHandler } -func newWebAppMissingWeb3WalletHandler(p *deps.RequestProvider) http.Handler { +func newWebAppConnectWeb3AccountHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -69894,16 +69908,25 @@ func newWebAppMissingWeb3WalletHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - missingWeb3WalletHandler := &webapp.MissingWeb3WalletHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authenticationViewModeler := &viewmodels.AuthenticationViewModeler{ + Authentication: authenticationConfig, + LoginID: loginIDConfig, + } + alternativeStepsViewModeler := &viewmodels.AlternativeStepsViewModeler{ AuthenticationConfig: authenticationConfig, } - return missingWeb3WalletHandler + connectWeb3AccountHandler := &webapp.ConnectWeb3AccountHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + AuthenticationViewModel: authenticationViewModeler, + AlternativeStepsViewModel: alternativeStepsViewModeler, + Renderer: responseRenderer, + AuthenticationConfig: authenticationConfig, + } + return connectWeb3AccountHandler } -func newWebAppFeatureDisabledHandler(p *deps.RequestProvider) http.Handler { +func newWebAppMissingWeb3WalletHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.AppDatabase @@ -70816,23 +70839,24 @@ func newWebAppFeatureDisabledHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - featureDisabledHandler := &webapp.FeatureDisabledHandler{ - ControllerFactory: controllerFactory, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + missingWeb3WalletHandler := &webapp.MissingWeb3WalletHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + AuthenticationConfig: authenticationConfig, } - return featureDisabledHandler + return missingWeb3WalletHandler } -func newWebAppTesterHandler(p *deps.RequestProvider) http.Handler { +func newWebAppFeatureDisabledHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider + factory := appProvider.LoggerFactory + handle := appProvider.AppDatabase + appredisHandle := appProvider.Redis appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig appID := appConfig.ID - factory := appProvider.LoggerFactory - handle := appProvider.AppDatabase - appredisHandle := appProvider.Redis serviceLogger := webapp2.NewServiceLogger(factory) request := p.Request sessionStoreRedis := &webapp2.SessionStoreRedis{ @@ -71737,222 +71761,101 @@ func newWebAppTesterHandler(p *deps.RequestProvider) http.Handler { LoggerFactory: factory, ControllerDeps: controllerDeps, } - globalredisHandle := appProvider.GlobalRedis - testerStore := &tester.TesterStore{ - Context: contextContext, - Redis: globalredisHandle, - } - appDomains := appContext.Domains - oAuthFeatureConfig := featureConfig.OAuth - oAuthClientCredentials := deps.ProvideOAuthClientCredentials(secretConfig) - tokenHandlerLogger := handler.NewTokenHandlerLogger(factory) - oauthOfflineGrantService := &oauth2.OfflineGrantService{ - OAuthConfig: oAuthConfig, - Clock: clockClock, - IDPSessions: idpsessionProvider, - ClientResolver: resolver, - OfflineGrants: store, - } - authorizationService := &oauth2.AuthorizationService{ - AppID: appID, - Store: authorizationStore, - Clock: clockClock, - OAuthSessionManager: sessionManager, - OfflineGrantService: oauthOfflineGrantService, - OfflineGrantStore: store, - } - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) - idTokenIssuer := &oidc.IDTokenIssuer{ - Secrets: oAuthKeyMaterials, - BaseURL: endpointsEndpoints, - Users: userQueries, - RolesAndGroups: queries, - Clock: clockClock, - } - facadeIdentityFacade := &facade.IdentityFacade{ - Coordinator: coordinator, - } - accessTokenEncoding := oauth2.AccessTokenEncoding{ - Secrets: oAuthKeyMaterials, - Clock: clockClock, - IDTokenIssuer: idTokenIssuer, - BaseURL: endpointsEndpoints, - Events: eventService, - Identities: facadeIdentityFacade, - } - accessGrantService := &oauth2.AccessGrantService{ - AppID: appID, - AccessGrants: store, - AccessTokenIssuer: accessTokenEncoding, - Clock: clockClock, - } - preAuthenticatedURLTokenServiceImpl := &handler.PreAuthenticatedURLTokenServiceImpl{ - Clock: clockClock, - PreAuthenticatedURLTokens: store, - AccessGrantService: accessGrantService, - OfflineGrantService: oauthOfflineGrantService, - } - oauthAccessTokenEncoding := &oauth2.AccessTokenEncoding{ - Secrets: oAuthKeyMaterials, - Clock: clockClock, - IDTokenIssuer: idTokenIssuer, - BaseURL: endpointsEndpoints, - Events: eventService, - Identities: facadeIdentityFacade, - } - tokenGenerator := _wireTokenGeneratorValue - oauthAccessGrantService := oauth2.AccessGrantService{ - AppID: appID, - AccessGrants: store, - AccessTokenIssuer: accessTokenEncoding, - Clock: clockClock, - } - tokenService := &handler.TokenService{ - RemoteIP: remoteIP, - UserAgentString: userAgentString, - AppID: appID, - Config: oAuthConfig, - Authorizations: authorizationStore, - OfflineGrants: store, - AccessGrants: store, - OfflineGrantService: offlineGrantService, - AccessEvents: eventProvider, - AccessTokenIssuer: oauthAccessTokenEncoding, - GenerateToken: tokenGenerator, - Clock: clockClock, - Users: userQueries, - AccessGrantService: oauthAccessGrantService, - } - app2appProvider := &app2app.Provider{ - Clock: clockClock, - } - codeGrantService := handler.CodeGrantService{ - AppID: appID, - CodeGenerator: tokenGenerator, - Clock: clockClock, - CodeGrants: store, - } - promptResolver := &oauth2.PromptResolver{ - Clock: clockClock, - } - idTokenHintResolver := &oidc.IDTokenHintResolver{ - Issuer: idTokenIssuer, - Sessions: idpsessionProvider, - OfflineGrantService: oauthOfflineGrantService, - } - uiInfoResolver := &oidc.UIInfoResolver{ - Config: oAuthConfig, - EndpointsProvider: endpointsEndpoints, - PromptResolver: promptResolver, - IDTokenHintResolver: idTokenHintResolver, - Clock: clockClock, - Cookies: cookieManager, - ClientResolver: resolver, - } - scopesValidator := _wireScopesValidatorValue - tokenHandler := &handler.TokenHandler{ - Context: contextContext, - AppID: appID, - AppDomains: appDomains, - HTTPProto: httpProto, - HTTPOrigin: httpOrigin, - OAuthFeatureConfig: oAuthFeatureConfig, - IdentityFeatureConfig: identityFeatureConfig, - OAuthClientCredentials: oAuthClientCredentials, - Logger: tokenHandlerLogger, - Authorizations: authorizationService, - CodeGrants: store, - SettingsActionGrantStore: store, - IDPSessions: idpsessionProvider, - OfflineGrants: store, - AppSessionTokens: store, - OfflineGrantService: oauthOfflineGrantService, - PreAuthenticatedURLTokenService: preAuthenticatedURLTokenServiceImpl, - Graphs: interactionService, - IDTokenIssuer: idTokenIssuer, - Clock: clockClock, - TokenService: tokenService, - Events: eventService, - SessionManager: manager2, - App2App: app2appProvider, - Challenges: challengeProvider, - CodeGrantService: codeGrantService, - ClientResolver: resolver, - UIInfoResolver: uiInfoResolver, - RemoteIP: remoteIP, - UserAgentString: userAgentString, - ValidateScopes: scopesValidator, - } - appSessionTokenService := &oauth2.AppSessionTokenService{ - AppSessions: store, - AppSessionTokens: store, - OfflineGrantService: oauthOfflineGrantService, - Cookies: cookieManager, - Clock: clockClock, - } - testerHandler := &webapp.TesterHandler{ - AppID: appID, - ControllerFactory: controllerFactory, - OauthEndpointsProvider: endpointsEndpoints, - TesterEndpointsProvider: endpointsEndpoints, - TesterService: testerStore, - TesterTokenIssuer: tokenHandler, - OAuthClientResolver: resolver, - AppSessionTokenService: appSessionTokenService, - CookieManager: cookieManager, - Renderer: responseRenderer, - BaseViewModel: baseViewModeler, - UserInfoProvider: idTokenIssuer, - OfflineGrants: oauthOfflineGrantService, + featureDisabledHandler := &webapp.FeatureDisabledHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return testerHandler + return featureDisabledHandler } -func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { +func newWebAppTesterHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + appID := appConfig.ID factory := appProvider.LoggerFactory - jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) - jsonResponseWriter := &httputil.JSONResponseWriter{ - Logger: jsonResponseWriterLogger, - } + handle := appProvider.AppDatabase + appredisHandle := appProvider.Redis + serviceLogger := webapp2.NewServiceLogger(factory) request := p.Request + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: appredisHandle, + } + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() + authenticationConfig := appConfig.Authentication + cookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig trustProxy := environmentConfig.TrustProxy - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig httpConfig := appConfig.HTTP cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: appredisHandle, + Cookies: cookieManager, + } + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpProto := deps.ProvideHTTPProto(request, trustProxy) + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, + } + resolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } + logger := interaction.NewLogger(factory) + remoteIP := deps.ProvideRemoteIP(request, trustProxy) contextContext := deps.ProvideRequestContext(request) - featureConfig := config.FeatureConfig + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) clockClock := _wireSystemClockValue - remoteIP := deps.ProvideRemoteIP(request, trustProxy) + featureConfig := config.FeatureConfig + redisLogger := redis.NewLogger(factory) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) - appID := appConfig.ID sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - handle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) - store := &user.Store{ + store := &redis.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Logger: redisLogger, SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, - AppID: appID, - } - rawCommands := &user.RawCommands{ - Store: store, - Clock: clockClock, - } - rawQueries := &user.RawQueries{ - Store: store, } userAgentString := deps.ProvideUserAgentString(request) - logger := event.NewLogger(factory) + eventLogger := event.NewLogger(factory) localizationConfig := appConfig.Localization sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) - authenticationConfig := appConfig.Authentication + userStore := &user.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + AppID: appID, + } + rawQueries := &user.RawQueries{ + Store: userStore, + } identityConfig := appConfig.Identity identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ @@ -71964,7 +71867,6 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { SQLExecutor: sqlExecutor, } loginIDConfig := identityConfig.LoginID - uiConfig := appConfig.UI manager := appContext.Resources typeCheckerFactory := &loginid.TypeCheckerFactory{ UIConfig: uiConfig, @@ -72015,7 +71917,6 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } - appredisHandle := appProvider.Redis store2 := &passkey2.Store{ Context: contextContext, Redis: appredisHandle, @@ -72023,16 +71924,14 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ + templateResolver := &template.Resolver{ Resources: manager, DefaultLanguageTag: defaultLanguageTag, SupportedLanguageTags: supportedLanguageTags, } engine := &template.Engine{ - Resolver: resolver, + Resolver: templateResolver, } - httpProto := deps.ProvideHTTPProto(request, trustProxy) - httpHost := deps.ProvideHTTPHost(request, trustProxy) httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources @@ -72273,14 +72172,14 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { UserProfileConfig: userProfileConfig, Identities: serviceService, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, ClaimStore: storePQ, Transformer: pictureTransformer, } customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ Config: userProfileConfig, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, } nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint web3Service := &web3.Service{ @@ -72297,7 +72196,7 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { } userQueries := &user.Queries{ RawQueries: rawQueries, - Store: store, + Store: userStore, Identities: serviceService, Authenticators: service3, Verification: verificationService, @@ -72379,7 +72278,7 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { AppID: appID, Client: client, Users: userQueries, - UserStore: store, + UserStore: userStore, IdentityService: serviceService, RolesGroups: rolesgroupsStore, TaskQueue: queue, @@ -72390,22 +72289,7 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { Service: elasticsearchService, Database: handle, } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) - userCommands := &user.Commands{ - RawCommands: rawCommands, - RawQueries: rawQueries, - Events: eventService, - Verification: verificationService, - UserProfileConfig: userProfileConfig, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, - } - userProvider := &user.Provider{ - Commands: userCommands, - Queries: userQueries, - } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ Redis: appredisHandle, AppID: appID, @@ -72450,7 +72334,7 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { FeatureConfig: messagingFeatureConfig, EnvConfig: rateLimitsEnvironmentConfig, } - serviceLogger := whatsapp.NewServiceLogger(factory) + whatsappServiceLogger := whatsapp.NewServiceLogger(factory) devMode := environmentConfig.DevMode featureTestModeWhatsappSuppressed := deps.ProvideTestModeWhatsappSuppressed(testModeFeatureConfig) testModeWhatsappConfig := testModeConfig.Whatsapp @@ -72464,7 +72348,7 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { onPremisesClient := whatsapp.NewWhatsappOnPremisesClient(whatsappConfig, whatsappOnPremisesCredentials, tokenStore) whatsappService := &whatsapp.Service{ Context: contextContext, - Logger: serviceLogger, + Logger: whatsappServiceLogger, DevMode: devMode, FeatureTestModeWhatsappSuppressed: featureTestModeWhatsappSuppressed, TestModeWhatsappConfig: testModeWhatsappConfig, @@ -72486,12 +72370,27 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { Sender: sender, Translation: translationService, } + rawCommands := &user.RawCommands{ + Store: userStore, + Clock: clockClock, + } + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } stdattrsService := &stdattrs2.Service{ UserProfileConfig: userProfileConfig, ServiceNoEvent: serviceNoEvent, Identities: serviceService, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, Events: eventService, } authorizationStore := &pq.AuthorizationStore{ @@ -72506,24 +72405,13 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { Logger: storeRedisLogger, } sessionConfig := appConfig.Session - cookieDef := session.NewSessionCookieDef(sessionConfig) + cookieDef2 := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, Config: sessionConfig, Cookies: cookieManager, - CookieDef: cookieDef, - } - redisLogger := redis.NewLogger(factory) - redisStore := &redis.Store{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, - Logger: redisLogger, - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, + CookieDef: cookieDef2, } - oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ Redis: appredisHandle, AppID: appID, @@ -72545,31 +72433,15 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, Random: idpsessionRand, } - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, - } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, - } - oauthclientResolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, - } offlineGrantService := oauth2.OfflineGrantService{ OAuthConfig: oAuthConfig, Clock: clockClock, IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, + ClientResolver: resolver, + OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ - Store: redisStore, + Store: store, Config: oAuthConfig, Service: offlineGrantService, } @@ -72611,13 +72483,11 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { authenticatorFacade := facade.AuthenticatorFacade{ Coordinator: coordinator, } - mfaFacade := &facade.MFAFacade{ - Coordinator: coordinator, - } - customattrsService := &customattrs.Service{ - Config: userProfileConfig, - ServiceNoEvent: customattrsServiceNoEvent, - Events: eventService, + anonymousStoreRedis := &anonymous.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, } messageSender := &otp.MessageSender{ Translation: translationService, @@ -72625,8 +72495,28 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { Sender: sender, WhatsappService: whatsappService, } - workflowVerificationFacade := facade.WorkflowVerificationFacade{ - Verification: verificationService, + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + Context: contextContext, + AppID: appID, + Redis: appredisHandle, + } + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + webappoauthStore := &webappoauth.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, } forgotpasswordLogger := forgotpassword.NewLogger(factory) sender2 := forgotpassword.Sender{ @@ -72645,107 +72535,176 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { OTPSender: messageSender, PasswordSender: sender2, } - accountMigrationConfig := appConfig.AccountMigration - accountMigrationHookConfig := accountMigrationConfig.Hook - hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) - denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) - accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ - DenoHook: denoHook, - Client: hookDenoClient, - Logger: denoMiddlewareLogger, - } - hookWebHookImpl := &hook.WebHookImpl{ - Logger: webHookLogger, - Secret: webhookKeyMaterials, + responseWriter := p.ResponseWriter + nonceService := &nonce.Service{ + Cookies: cookieManager, + Request: request, + ResponseWriter: responseWriter, } - hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) - webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) - accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ - WebHook: hookWebHookImpl, - Client: hookHTTPClient, - Logger: webhookMiddlewareLogger, + challengeProvider := &challenge.Provider{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, } - accountmigrationService := &accountmigration.Service{ - Config: accountMigrationHookConfig, - DenoHook: accountMigrationDenoHook, - WebHook: accountMigrationWebHook, + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, } - captchaConfig := appConfig.Captcha - providerLogger := captcha.NewProviderLogger(factory) - deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) - cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) - captchaProvider := &captcha.Provider{ - RemoteIP: remoteIP, - Config: captchaConfig, - Logger: providerLogger, - CloudflareClient: cloudflareClient, + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, } manager2 := &session.Manager{ IDPSessions: idpsessionManager, AccessTokenSessions: sessionManager, Events: eventService, } - authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + oauthsessionStoreRedis := &oauthsession.StoreRedis{ Context: contextContext, Redis: appredisHandle, AppID: appID, } - mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) - workflowStoreImpl := &workflow.StoreImpl{ - Redis: appredisHandle, - AppID: appID, - Context: contextContext, + interactionContext := &interaction.Context{ + Request: request, + RemoteIP: remoteIP, + Database: sqlExecutor, + Clock: clockClock, + Config: appConfig, + FeatureConfig: featureConfig, + OAuthClientResolver: resolver, + OfflineGrants: store, + Identities: identityFacade, + Authenticators: authenticatorFacade, + AnonymousIdentities: anonymousProvider, + AnonymousUserPromotionCodeStore: anonymousStoreRedis, + BiometricIdentities: biometricProvider, + OTPCodeService: otpService, + OTPSender: messageSender, + OAuthProviderFactory: oAuthProviderFactory, + OAuthRedirectURIBuilder: endpointsEndpoints, + OAuthStateStore: webappoauthStore, + MFA: mfaFacade, + ForgotPassword: forgotpasswordService, + ResetPassword: forgotpasswordService, + Passkey: passkeyService, + Verification: verificationService, + RateLimiter: limiter, + PasswordGenerator: generator, + Nonces: nonceService, + Challenges: challengeProvider, + Users: userProvider, + StdAttrsService: stdattrsService, + Events: eventService, + CookieManager: cookieManager, + AuthenticationInfoService: authenticationinfoStoreRedis, + Sessions: idpsessionProvider, + SessionManager: manager2, + SessionCookie: cookieDef2, + OAuthSessions: oauthsessionStoreRedis, + MFADeviceTokenCookie: cookieDef, } - eventStoreImpl := workflow.NewEventStore(appID, appredisHandle, workflowStoreImpl) - dependencies := &workflow.Dependencies{ - Config: appConfig, - FeatureConfig: featureConfig, - Clock: clockClock, - RemoteIP: remoteIP, - HTTPRequest: request, - Users: userProvider, - Identities: identityFacade, - Authenticators: authenticatorFacade, - MFA: mfaFacade, - StdAttrsService: stdattrsService, - CustomAttrsService: customattrsService, - OTPCodes: otpService, - OTPSender: messageSender, - Verification: workflowVerificationFacade, - ForgotPassword: forgotpasswordService, - ResetPassword: forgotpasswordService, - AccountMigrations: accountmigrationService, - Captcha: captchaProvider, - IDPSessions: idpsessionProvider, - Sessions: manager2, - AuthenticationInfos: authenticationinfoStoreRedis, - SessionCookie: cookieDef, - MFADeviceTokenCookie: mfaCookieDef, + interactionStoreRedis := &interaction.StoreRedis{ + Redis: appredisHandle, + AppID: appID, + } + interactionService := &interaction.Service{ + Logger: logger, + Context: interactionContext, + Store: interactionStoreRedis, + } + webappService2 := &webapp2.Service2{ + Logger: serviceLogger, + Request: request, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, + SignedUpCookie: signedUpCookieDef, + MFADeviceTokenCookie: cookieDef, + ErrorService: errorService, Cookies: cookieManager, - Events: eventService, - RateLimiter: limiter, - WorkflowEvents: eventStoreImpl, - OfflineGrants: redisStore, + OAuthConfig: oAuthConfig, + UIConfig: uiConfig, + TrustProxy: trustProxy, + UIInfoResolver: uiService, + OAuthClientResolver: resolver, + Graph: interactionService, } - workflowServiceLogger := workflow.NewServiceLogger(factory) - uiService := &authenticationinfo.UIService{ - EndpointsProvider: endpointsEndpoints, + uiFeatureConfig := featureConfig.UI + forgotPasswordConfig := appConfig.ForgotPassword + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, } - workflowService := &workflow.Service{ - ContextDoNotUseDirectly: contextContext, - Deps: dependencies, - Logger: workflowServiceLogger, - Store: workflowStoreImpl, + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: resolver, + Logger: baseLogger, + } + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, + } + publisher := webapp.NewPublisher(appID, appredisHandle) + controllerDeps := webapp.ControllerDeps{ Database: handle, - UIInfoResolver: uiService, + RedisHandle: appredisHandle, + AppID: appID, + Page: webappService2, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Publisher: publisher, + Clock: clockClock, + UIConfig: uiConfig, + ErrorService: errorService, + TesterEndpointsProvider: endpointsEndpoints, + TrustProxy: trustProxy, } - oauthsessionStoreRedis := &oauthsession.StoreRedis{ + controllerFactory := webapp.ControllerFactory{ + LoggerFactory: factory, + ControllerDeps: controllerDeps, + } + globalredisHandle := appProvider.GlobalRedis + testerStore := &tester.TesterStore{ Context: contextContext, - Redis: appredisHandle, - AppID: appID, + Redis: globalredisHandle, } - promptResolver := &oauth2.PromptResolver{ - Clock: clockClock, + appDomains := appContext.Domains + oAuthFeatureConfig := featureConfig.OAuth + oAuthClientCredentials := deps.ProvideOAuthClientCredentials(secretConfig) + tokenHandlerLogger := handler.NewTokenHandlerLogger(factory) + oauthOfflineGrantService := &oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: resolver, + OfflineGrants: store, + } + authorizationService := &oauth2.AuthorizationService{ + AppID: appID, + Store: authorizationStore, + Clock: clockClock, + OAuthSessionManager: sessionManager, + OfflineGrantService: oauthOfflineGrantService, + OfflineGrantStore: store, } oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) idTokenIssuer := &oidc.IDTokenIssuer{ @@ -72755,12 +72714,71 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { RolesAndGroups: queries, Clock: clockClock, } - oauthOfflineGrantService := &oauth2.OfflineGrantService{ - OAuthConfig: oAuthConfig, - Clock: clockClock, - IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, + facadeIdentityFacade := &facade.IdentityFacade{ + Coordinator: coordinator, + } + accessTokenEncoding := oauth2.AccessTokenEncoding{ + Secrets: oAuthKeyMaterials, + Clock: clockClock, + IDTokenIssuer: idTokenIssuer, + BaseURL: endpointsEndpoints, + Events: eventService, + Identities: facadeIdentityFacade, + } + accessGrantService := &oauth2.AccessGrantService{ + AppID: appID, + AccessGrants: store, + AccessTokenIssuer: accessTokenEncoding, + Clock: clockClock, + } + preAuthenticatedURLTokenServiceImpl := &handler.PreAuthenticatedURLTokenServiceImpl{ + Clock: clockClock, + PreAuthenticatedURLTokens: store, + AccessGrantService: accessGrantService, + OfflineGrantService: oauthOfflineGrantService, + } + oauthAccessTokenEncoding := &oauth2.AccessTokenEncoding{ + Secrets: oAuthKeyMaterials, + Clock: clockClock, + IDTokenIssuer: idTokenIssuer, + BaseURL: endpointsEndpoints, + Events: eventService, + Identities: facadeIdentityFacade, + } + tokenGenerator := _wireTokenGeneratorValue + oauthAccessGrantService := oauth2.AccessGrantService{ + AppID: appID, + AccessGrants: store, + AccessTokenIssuer: accessTokenEncoding, + Clock: clockClock, + } + tokenService := &handler.TokenService{ + RemoteIP: remoteIP, + UserAgentString: userAgentString, + AppID: appID, + Config: oAuthConfig, + Authorizations: authorizationStore, + OfflineGrants: store, + AccessGrants: store, + OfflineGrantService: offlineGrantService, + AccessEvents: eventProvider, + AccessTokenIssuer: oauthAccessTokenEncoding, + GenerateToken: tokenGenerator, + Clock: clockClock, + Users: userQueries, + AccessGrantService: oauthAccessGrantService, + } + app2appProvider := &app2app.Provider{ + Clock: clockClock, + } + codeGrantService := handler.CodeGrantService{ + AppID: appID, + CodeGenerator: tokenGenerator, + Clock: clockClock, + CodeGrants: store, + } + promptResolver := &oauth2.PromptResolver{ + Clock: clockClock, } idTokenHintResolver := &oidc.IDTokenHintResolver{ Issuer: idTokenIssuer, @@ -72774,19 +72792,68 @@ func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { IDTokenHintResolver: idTokenHintResolver, Clock: clockClock, Cookies: cookieManager, - ClientResolver: oauthclientResolver, + ClientResolver: resolver, } - workflowNewHandler := &api.WorkflowNewHandler{ - JSON: jsonResponseWriter, - Cookies: cookieManager, - Workflows: workflowService, - OAuthSessions: oauthsessionStoreRedis, - UIInfoResolver: uiInfoResolver, + scopesValidator := _wireScopesValidatorValue + tokenHandler := &handler.TokenHandler{ + Context: contextContext, + AppID: appID, + AppDomains: appDomains, + HTTPProto: httpProto, + HTTPOrigin: httpOrigin, + OAuthFeatureConfig: oAuthFeatureConfig, + IdentityFeatureConfig: identityFeatureConfig, + OAuthClientCredentials: oAuthClientCredentials, + Logger: tokenHandlerLogger, + Authorizations: authorizationService, + CodeGrants: store, + SettingsActionGrantStore: store, + IDPSessions: idpsessionProvider, + OfflineGrants: store, + AppSessionTokens: store, + OfflineGrantService: oauthOfflineGrantService, + PreAuthenticatedURLTokenService: preAuthenticatedURLTokenServiceImpl, + Graphs: interactionService, + IDTokenIssuer: idTokenIssuer, + Clock: clockClock, + TokenService: tokenService, + Events: eventService, + SessionManager: manager2, + App2App: app2appProvider, + Challenges: challengeProvider, + CodeGrantService: codeGrantService, + ClientResolver: resolver, + UIInfoResolver: uiInfoResolver, + RemoteIP: remoteIP, + UserAgentString: userAgentString, + ValidateScopes: scopesValidator, } - return workflowNewHandler + appSessionTokenService := &oauth2.AppSessionTokenService{ + AppSessions: store, + AppSessionTokens: store, + OfflineGrantService: oauthOfflineGrantService, + Cookies: cookieManager, + Clock: clockClock, + } + testerHandler := &webapp.TesterHandler{ + AppID: appID, + ControllerFactory: controllerFactory, + OauthEndpointsProvider: endpointsEndpoints, + TesterEndpointsProvider: endpointsEndpoints, + TesterService: testerStore, + TesterTokenIssuer: tokenHandler, + OAuthClientResolver: resolver, + AppSessionTokenService: appSessionTokenService, + CookieManager: cookieManager, + Renderer: responseRenderer, + BaseViewModel: baseViewModeler, + UserInfoProvider: idTokenIssuer, + OfflineGrants: oauthOfflineGrantService, + } + return testerHandler } -func newAPIWorkflowGetHandler(p *deps.RequestProvider) http.Handler { +func newAPIWorkflowNewHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) @@ -72794,15 +72861,17 @@ func newAPIWorkflowGetHandler(p *deps.RequestProvider) http.Handler { Logger: jsonResponseWriterLogger, } request := p.Request - contextContext := deps.ProvideRequestContext(request) + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + contextContext := deps.ProvideRequestContext(request) featureConfig := config.FeatureConfig clockClock := _wireSystemClockValue - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy remoteIP := deps.ProvideRemoteIP(request, trustProxy) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) @@ -73382,8 +73451,6 @@ func newAPIWorkflowGetHandler(p *deps.RequestProvider) http.Handler { Logger: storeRedisLogger, } sessionConfig := appConfig.Session - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) cookieDef := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, @@ -73617,15 +73684,54 @@ func newAPIWorkflowGetHandler(p *deps.RequestProvider) http.Handler { Database: handle, UIInfoResolver: uiService, } - workflowGetHandler := &api.WorkflowGetHandler{ - JSON: jsonResponseWriter, - Workflows: workflowService, - Cookies: cookieManager, + oauthsessionStoreRedis := &oauthsession.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, } - return workflowGetHandler + promptResolver := &oauth2.PromptResolver{ + Clock: clockClock, + } + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + idTokenIssuer := &oidc.IDTokenIssuer{ + Secrets: oAuthKeyMaterials, + BaseURL: endpointsEndpoints, + Users: userQueries, + RolesAndGroups: queries, + Clock: clockClock, + } + oauthOfflineGrantService := &oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, + } + idTokenHintResolver := &oidc.IDTokenHintResolver{ + Issuer: idTokenIssuer, + Sessions: idpsessionProvider, + OfflineGrantService: oauthOfflineGrantService, + } + uiInfoResolver := &oidc.UIInfoResolver{ + Config: oAuthConfig, + EndpointsProvider: endpointsEndpoints, + PromptResolver: promptResolver, + IDTokenHintResolver: idTokenHintResolver, + Clock: clockClock, + Cookies: cookieManager, + ClientResolver: oauthclientResolver, + } + workflowNewHandler := &api.WorkflowNewHandler{ + JSON: jsonResponseWriter, + Cookies: cookieManager, + Workflows: workflowService, + OAuthSessions: oauthsessionStoreRedis, + UIInfoResolver: uiInfoResolver, + } + return workflowNewHandler } -func newAPIWorkflowInputHandler(p *deps.RequestProvider) http.Handler { +func newAPIWorkflowGetHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) @@ -74456,50 +74562,15 @@ func newAPIWorkflowInputHandler(p *deps.RequestProvider) http.Handler { Database: handle, UIInfoResolver: uiService, } - workflowInputHandler := &api.WorkflowInputHandler{ + workflowGetHandler := &api.WorkflowGetHandler{ JSON: jsonResponseWriter, Workflows: workflowService, Cookies: cookieManager, } - return workflowInputHandler -} - -func newAPIWorkflowWebsocketHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - appID := appConfig.ID - handle := appProvider.Redis - request := p.Request - contextContext := deps.ProvideRequestContext(request) - storeImpl := &workflow.StoreImpl{ - Redis: handle, - AppID: appID, - Context: contextContext, - } - eventStoreImpl := workflow.NewEventStore(appID, handle, storeImpl) - factory := appProvider.LoggerFactory - httpConfig := appConfig.HTTP - oAuthConfig := appConfig.OAuth - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - corsAllowedOrigins := environmentConfig.CORSAllowedOrigins - corsMatcher := &middleware.CORSMatcher{ - Config: httpConfig, - OAuthConfig: oAuthConfig, - CORSAllowedOrigins: corsAllowedOrigins, - } - workflowWebsocketHandler := &api.WorkflowWebsocketHandler{ - Events: eventStoreImpl, - LoggerFactory: factory, - RedisHandle: handle, - OriginMatcher: corsMatcher, - } - return workflowWebsocketHandler + return workflowGetHandler } -func newAPIWorkflowV2Handler(p *deps.RequestProvider) http.Handler { +func newAPIWorkflowInputHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) @@ -74507,17 +74578,15 @@ func newAPIWorkflowV2Handler(p *deps.RequestProvider) http.Handler { Logger: jsonResponseWriterLogger, } request := p.Request - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy + contextContext := deps.ProvideRequestContext(request) appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - contextContext := deps.ProvideRequestContext(request) featureConfig := config.FeatureConfig clockClock := _wireSystemClockValue + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy remoteIP := deps.ProvideRemoteIP(request, trustProxy) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) @@ -75097,6 +75166,8 @@ func newAPIWorkflowV2Handler(p *deps.RequestProvider) http.Handler { Logger: storeRedisLogger, } sessionConfig := appConfig.Session + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) cookieDef := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, @@ -75330,57 +75401,52 @@ func newAPIWorkflowV2Handler(p *deps.RequestProvider) http.Handler { Database: handle, UIInfoResolver: uiService, } - oauthsessionStoreRedis := &oauthsession.StoreRedis{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, - } - promptResolver := &oauth2.PromptResolver{ - Clock: clockClock, - } - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) - idTokenIssuer := &oidc.IDTokenIssuer{ - Secrets: oAuthKeyMaterials, - BaseURL: endpointsEndpoints, - Users: userQueries, - RolesAndGroups: queries, - Clock: clockClock, - } - oauthOfflineGrantService := &oauth2.OfflineGrantService{ - OAuthConfig: oAuthConfig, - Clock: clockClock, - IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, + workflowInputHandler := &api.WorkflowInputHandler{ + JSON: jsonResponseWriter, + Workflows: workflowService, + Cookies: cookieManager, } - idTokenHintResolver := &oidc.IDTokenHintResolver{ - Issuer: idTokenIssuer, - Sessions: idpsessionProvider, - OfflineGrantService: oauthOfflineGrantService, + return workflowInputHandler +} + +func newAPIWorkflowWebsocketHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + appID := appConfig.ID + handle := appProvider.Redis + request := p.Request + contextContext := deps.ProvideRequestContext(request) + storeImpl := &workflow.StoreImpl{ + Redis: handle, + AppID: appID, + Context: contextContext, } - uiInfoResolver := &oidc.UIInfoResolver{ - Config: oAuthConfig, - EndpointsProvider: endpointsEndpoints, - PromptResolver: promptResolver, - IDTokenHintResolver: idTokenHintResolver, - Clock: clockClock, - Cookies: cookieManager, - ClientResolver: oauthclientResolver, + eventStoreImpl := workflow.NewEventStore(appID, handle, storeImpl) + factory := appProvider.LoggerFactory + httpConfig := appConfig.HTTP + oAuthConfig := appConfig.OAuth + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + corsAllowedOrigins := environmentConfig.CORSAllowedOrigins + corsMatcher := &middleware.CORSMatcher{ + Config: httpConfig, + OAuthConfig: oAuthConfig, + CORSAllowedOrigins: corsAllowedOrigins, } - workflowV2Handler := &api.WorkflowV2Handler{ - JSON: jsonResponseWriter, - Cookies: cookieManager, - Workflows: workflowService, - OAuthSessions: oauthsessionStoreRedis, - UIInfoResolver: uiInfoResolver, + workflowWebsocketHandler := &api.WorkflowWebsocketHandler{ + Events: eventStoreImpl, + LoggerFactory: factory, + RedisHandle: handle, + OriginMatcher: corsMatcher, } - return workflowV2Handler + return workflowWebsocketHandler } -func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handler { +func newAPIWorkflowV2Handler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory - handle := appProvider.Redis jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) jsonResponseWriter := &httputil.JSONResponseWriter{ Logger: jsonResponseWriterLogger, @@ -75398,15 +75464,12 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl featureConfig := config.FeatureConfig clockClock := _wireSystemClockValue remoteIP := deps.ProvideRemoteIP(request, trustProxy) - httpProto := deps.ProvideHTTPProto(request, trustProxy) - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) appID := appConfig.ID sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - appdbHandle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) + handle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) store := &user.Store{ SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, @@ -75488,9 +75551,10 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } + appredisHandle := appProvider.Redis store2 := &passkey2.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) @@ -75503,6 +75567,9 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl engine := &template.Engine{ Resolver: resolver, } + httpProto := deps.ProvideHTTPProto(request, trustProxy) + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -75540,14 +75607,14 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -75662,17 +75729,17 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -75698,7 +75765,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -75839,11 +75906,11 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: appdbHandle, + Database: handle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, @@ -75857,9 +75924,9 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: appdbHandle, + Database: handle, } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) userCommands := &user.Commands{ RawCommands: rawCommands, RawQueries: rawQueries, @@ -75876,7 +75943,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl Queries: userQueries, } storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -75904,7 +75971,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: handle, + Redis: appredisHandle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -75926,7 +75993,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -75969,7 +76036,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, @@ -75985,7 +76052,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl redisLogger := redis.NewLogger(factory) redisStore := &redis.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Logger: redisLogger, SQLBuilder: sqlBuilderApp, @@ -75994,7 +76061,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl } oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -76006,7 +76073,7 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: handle, + Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -76077,12 +76144,6 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl identityFacade := facade.IdentityFacade{ Coordinator: coordinator, } - anonymousStoreRedis := &anonymous.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - Clock: clockClock, - } authenticatorFacade := facade.AuthenticatorFacade{ Coordinator: coordinator, } @@ -76145,11 +76206,6 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl DenoHook: accountMigrationDenoHook, WebHook: accountMigrationWebHook, } - challengeProvider := &challenge.Provider{ - Redis: handle, - AppID: appID, - Clock: clockClock, - } captchaConfig := appConfig.Captcha providerLogger := captcha.NewProviderLogger(factory) deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) @@ -76160,51 +76216,6 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl Logger: providerLogger, CloudflareClient: cloudflareClient, } - botProtectionConfig := appConfig.BotProtection - botprotectionProviderLogger := botprotection.NewProviderLogger(factory) - botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) - botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) - recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) - botprotectionProvider := &botprotection.Provider{ - RemoteIP: remoteIP, - Config: botProtectionConfig, - Logger: botprotectionProviderLogger, - CloudflareClient: botprotectionCloudflareClient, - RecaptchaV2Client: recaptchaV2Client, - Events: eventService, - } - oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) - oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) - simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ - Context: contextContext, - AppID: appID, - Redis: handle, - } - oAuthProviderFactory := &sso.OAuthProviderFactory{ - IdentityConfig: identityConfig, - Credentials: oAuthSSOProviderCredentials, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, - HTTPClient: oAuthHTTPClient, - SimpleStoreRedisFactory: simpleStoreRedisFactory, - } - requestOptionsService := &passkey2.RequestOptionsService{ - ConfigService: configService, - IdentityService: serviceService, - Store: store2, - } - creationOptionsService := &passkey2.CreationOptionsService{ - ConfigService: configService, - UserService: userQueries, - IdentityService: serviceService, - Store: store2, - } - ldapConfig := identityConfig.LDAP - ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) - clientFactory := &ldap2.ClientFactory{ - Config: ldapConfig, - SecretConfig: ldapServerUserCredentials, - } manager2 := &session.Manager{ IDPSessions: idpsessionManager, AccessTokenSessions: sessionManager, @@ -76212,87 +76223,74 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl } authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) - idTokenIssuer := &oidc.IDTokenIssuer{ - Secrets: oAuthKeyMaterials, - BaseURL: endpointsEndpoints, - Users: userQueries, - RolesAndGroups: queries, - Clock: clockClock, - } - dependencies := &authenticationflow.Dependencies{ - Config: appConfig, - FeatureConfig: featureConfig, - Clock: clockClock, - RemoteIP: remoteIP, - HTTPOrigin: httpOrigin, - HTTPRequest: request, - Users: userProvider, - Identities: identityFacade, - AnonymousIdentities: anonymousProvider, - AnonymousUserPromotionCodeStore: anonymousStoreRedis, - Authenticators: authenticatorFacade, - MFA: mfaFacade, - StdAttrsService: stdattrsService, - CustomAttrsService: customattrsService, - OTPCodes: otpService, - OTPSender: messageSender, - Verification: workflowVerificationFacade, - ForgotPassword: forgotpasswordService, - ResetPassword: forgotpasswordService, - AccountMigrations: accountmigrationService, - Challenges: challengeProvider, - Captcha: captchaProvider, - BotProtection: botprotectionProvider, - OAuthProviderFactory: oAuthProviderFactory, - PasskeyRequestOptionsService: requestOptionsService, - PasskeyCreationOptionsService: creationOptionsService, - PasskeyService: passkeyService, - LoginIDs: provider, - LDAP: ldapProvider, - LDAPClientFactory: clientFactory, - IDPSessions: idpsessionProvider, - Sessions: manager2, - AuthenticationInfos: authenticationinfoStoreRedis, - SessionCookie: cookieDef, - MFADeviceTokenCookie: mfaCookieDef, - Cookies: cookieManager, - Events: eventService, - RateLimiter: limiter, - OfflineGrants: redisStore, - IDTokens: idTokenIssuer, - } - authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) - authenticationflowStoreImpl := &authenticationflow.StoreImpl{ - Redis: handle, + workflowStoreImpl := &workflow.StoreImpl{ + Redis: appredisHandle, AppID: appID, Context: contextContext, } + eventStoreImpl := workflow.NewEventStore(appID, appredisHandle, workflowStoreImpl) + dependencies := &workflow.Dependencies{ + Config: appConfig, + FeatureConfig: featureConfig, + Clock: clockClock, + RemoteIP: remoteIP, + HTTPRequest: request, + Users: userProvider, + Identities: identityFacade, + Authenticators: authenticatorFacade, + MFA: mfaFacade, + StdAttrsService: stdattrsService, + CustomAttrsService: customattrsService, + OTPCodes: otpService, + OTPSender: messageSender, + Verification: workflowVerificationFacade, + ForgotPassword: forgotpasswordService, + ResetPassword: forgotpasswordService, + AccountMigrations: accountmigrationService, + Captcha: captchaProvider, + IDPSessions: idpsessionProvider, + Sessions: manager2, + AuthenticationInfos: authenticationinfoStoreRedis, + SessionCookie: cookieDef, + MFADeviceTokenCookie: mfaCookieDef, + Cookies: cookieManager, + Events: eventService, + RateLimiter: limiter, + WorkflowEvents: eventStoreImpl, + OfflineGrants: redisStore, + } + workflowServiceLogger := workflow.NewServiceLogger(factory) uiService := &authenticationinfo.UIService{ EndpointsProvider: endpointsEndpoints, } - authenticationflowService := &authenticationflow.Service{ + workflowService := &workflow.Service{ ContextDoNotUseDirectly: contextContext, Deps: dependencies, - Logger: authenticationflowServiceLogger, - Store: authenticationflowStoreImpl, - Database: appdbHandle, - UIConfig: uiConfig, + Logger: workflowServiceLogger, + Store: workflowStoreImpl, + Database: handle, UIInfoResolver: uiService, - OAuthClientResolver: oauthclientResolver, } oauthsessionStoreRedis := &oauthsession.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } promptResolver := &oauth2.PromptResolver{ Clock: clockClock, } + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + idTokenIssuer := &oidc.IDTokenIssuer{ + Secrets: oAuthKeyMaterials, + BaseURL: endpointsEndpoints, + Users: userQueries, + RolesAndGroups: queries, + Clock: clockClock, + } oauthOfflineGrantService := &oauth2.OfflineGrantService{ OAuthConfig: oAuthConfig, Clock: clockClock, @@ -76314,19 +76312,17 @@ func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handl Cookies: cookieManager, ClientResolver: oauthclientResolver, } - authenticationFlowV1CreateHandler := &api.AuthenticationFlowV1CreateHandler{ - LoggerFactory: factory, - RedisHandle: handle, + workflowV2Handler := &api.WorkflowV2Handler{ JSON: jsonResponseWriter, Cookies: cookieManager, - Workflows: authenticationflowService, + Workflows: workflowService, OAuthSessions: oauthsessionStoreRedis, UIInfoResolver: uiInfoResolver, } - return authenticationFlowV1CreateHandler + return workflowV2Handler } -func newAPIAuthenticationFlowV1InputHandler(p *deps.RequestProvider) http.Handler { +func newAPIAuthenticationFlowV1CreateHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.Redis @@ -77234,17 +77230,48 @@ func newAPIAuthenticationFlowV1InputHandler(p *deps.RequestProvider) http.Handle UIInfoResolver: uiService, OAuthClientResolver: oauthclientResolver, } - authenticationFlowV1InputHandler := &api.AuthenticationFlowV1InputHandler{ - LoggerFactory: factory, - RedisHandle: handle, - JSON: jsonResponseWriter, - Cookies: cookieManager, - Workflows: authenticationflowService, + oauthsessionStoreRedis := &oauthsession.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, } - return authenticationFlowV1InputHandler + promptResolver := &oauth2.PromptResolver{ + Clock: clockClock, + } + oauthOfflineGrantService := &oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, + } + idTokenHintResolver := &oidc.IDTokenHintResolver{ + Issuer: idTokenIssuer, + Sessions: idpsessionProvider, + OfflineGrantService: oauthOfflineGrantService, + } + uiInfoResolver := &oidc.UIInfoResolver{ + Config: oAuthConfig, + EndpointsProvider: endpointsEndpoints, + PromptResolver: promptResolver, + IDTokenHintResolver: idTokenHintResolver, + Clock: clockClock, + Cookies: cookieManager, + ClientResolver: oauthclientResolver, + } + authenticationFlowV1CreateHandler := &api.AuthenticationFlowV1CreateHandler{ + LoggerFactory: factory, + RedisHandle: handle, + JSON: jsonResponseWriter, + Cookies: cookieManager, + Workflows: authenticationflowService, + OAuthSessions: oauthsessionStoreRedis, + UIInfoResolver: uiInfoResolver, + } + return authenticationFlowV1CreateHandler } -func newAPIAuthenticationFlowV1GetHandler(p *deps.RequestProvider) http.Handler { +func newAPIAuthenticationFlowV1InputHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.Redis @@ -77253,15 +77280,17 @@ func newAPIAuthenticationFlowV1GetHandler(p *deps.RequestProvider) http.Handler Logger: jsonResponseWriterLogger, } request := p.Request - contextContext := deps.ProvideRequestContext(request) + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + contextContext := deps.ProvideRequestContext(request) featureConfig := config.FeatureConfig clockClock := _wireSystemClockValue - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy remoteIP := deps.ProvideRemoteIP(request, trustProxy) httpProto := deps.ProvideHTTPProto(request, trustProxy) httpHost := deps.ProvideHTTPHost(request, trustProxy) @@ -77840,8 +77869,6 @@ func newAPIAuthenticationFlowV1GetHandler(p *deps.RequestProvider) http.Handler Logger: storeRedisLogger, } sessionConfig := appConfig.Session - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) cookieDef := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, @@ -78152,119 +78179,64 @@ func newAPIAuthenticationFlowV1GetHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiService, OAuthClientResolver: oauthclientResolver, } - authenticationFlowV1GetHandler := &api.AuthenticationFlowV1GetHandler{ + authenticationFlowV1InputHandler := &api.AuthenticationFlowV1InputHandler{ LoggerFactory: factory, RedisHandle: handle, JSON: jsonResponseWriter, + Cookies: cookieManager, Workflows: authenticationflowService, } - return authenticationFlowV1GetHandler + return authenticationFlowV1InputHandler } -func newAPIAuthenticationFlowV1WebsocketHandler(p *deps.RequestProvider) http.Handler { +func newAPIAuthenticationFlowV1GetHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory handle := appProvider.Redis - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - httpConfig := appConfig.HTTP - oAuthConfig := appConfig.OAuth - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - corsAllowedOrigins := environmentConfig.CORSAllowedOrigins - corsMatcher := &middleware.CORSMatcher{ - Config: httpConfig, - OAuthConfig: oAuthConfig, - CORSAllowedOrigins: corsAllowedOrigins, - } - appID := appConfig.ID - request := p.Request - contextContext := deps.ProvideRequestContext(request) - storeImpl := &authenticationflow.StoreImpl{ - Redis: handle, - AppID: appID, - Context: contextContext, - } - websocketEventStore := authenticationflow.NewWebsocketEventStore(appID, handle, storeImpl) - authenticationFlowV1WebsocketHandler := &api.AuthenticationFlowV1WebsocketHandler{ - LoggerFactory: factory, - RedisHandle: handle, - OriginMatcher: corsMatcher, - Events: websocketEventStore, - } - return authenticationFlowV1WebsocketHandler -} - -func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - factory := appProvider.LoggerFactory jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) jsonResponseWriter := &httputil.JSONResponseWriter{ Logger: jsonResponseWriterLogger, } - handle := appProvider.AppDatabase request := p.Request contextContext := deps.ProvideRequestContext(request) appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig - appID := appConfig.ID - appredisHandle := appProvider.Redis + featureConfig := config.FeatureConfig clockClock := _wireSystemClockValue - redisStore := &accountmanagement.RedisStore{ - Context: contextContext, - AppID: appID, - Redis: appredisHandle, - Clock: clockClock, - } - identityConfig := appConfig.Identity - secretConfig := config.SecretConfig - oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) - loginIDConfig := identityConfig.LoginID - normalizerFactory := &loginid.NormalizerFactory{ - Config: loginIDConfig, - } - normalizer := &stdattrs.Normalizer{ - LoginIDNormalizerFactory: normalizerFactory, - } rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig - oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) - simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ - Context: contextContext, - AppID: appID, - Redis: appredisHandle, - } - oAuthProviderFactory := &sso.OAuthProviderFactory{ - IdentityConfig: identityConfig, - Credentials: oAuthSSOProviderCredentials, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, - HTTPClient: oAuthHTTPClient, - SimpleStoreRedisFactory: simpleStoreRedisFactory, - } trustProxy := environmentConfig.TrustProxy remoteIP := deps.ProvideRemoteIP(request, trustProxy) - userAgentString := deps.ProvideUserAgentString(request) - logger := event.NewLogger(factory) - localizationConfig := appConfig.Localization + httpProto := deps.ProvideHTTPProto(request, trustProxy) + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) - sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) - sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) - storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) + appID := appConfig.ID sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) + appdbHandle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) store := &user.Store{ SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, AppID: appID, } + rawCommands := &user.RawCommands{ + Store: store, + Clock: clockClock, + } rawQueries := &user.RawQueries{ Store: store, } + userAgentString := deps.ProvideUserAgentString(request) + logger := event.NewLogger(factory) + localizationConfig := appConfig.Localization + sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) + storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) authenticationConfig := appConfig.Authentication - featureConfig := config.FeatureConfig + identityConfig := appConfig.Identity identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ SQLBuilder: sqlBuilderApp, @@ -78274,6 +78246,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } + loginIDConfig := identityConfig.LoginID uiConfig := appConfig.UI manager := appContext.Resources typeCheckerFactory := &loginid.TypeCheckerFactory{ @@ -78285,6 +78258,9 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt Config: loginIDConfig, TypeCheckerFactory: typeCheckerFactory, } + normalizerFactory := &loginid.NormalizerFactory{ + Config: loginIDConfig, + } provider := &loginid.Provider{ Store: loginidStore, Config: loginIDConfig, @@ -78324,7 +78300,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt } store2 := &passkey2.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) @@ -78337,9 +78313,6 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt engine := &template.Engine{ Resolver: resolver, } - httpProto := deps.ProvideHTTPProto(request, trustProxy) - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -78377,14 +78350,14 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -78412,6 +78385,9 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } + normalizer := &stdattrs.Normalizer{ + LoginIDNormalizerFactory: normalizerFactory, + } ldapProvider := &ldap.Provider{ Store: ldapStore, Clock: clockClock, @@ -78496,17 +78472,17 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -78532,7 +78508,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -78673,11 +78649,11 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: handle, + Database: appdbHandle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, @@ -78691,11 +78667,26 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: handle, + Database: appdbHandle, + } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -78723,7 +78714,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: appredisHandle, + Redis: handle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -78745,7 +78736,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -78774,21 +78765,6 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt Sender: sender, Translation: translationService, } - rawCommands := &user.RawCommands{ - Store: store, - Clock: clockClock, - } - userCommands := &user.Commands{ - RawCommands: rawCommands, - RawQueries: rawQueries, - Events: eventService, - Verification: verificationService, - UserProfileConfig: userProfileConfig, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, - } stdattrsService := &stdattrs2.Service{ UserProfileConfig: userProfileConfig, ServiceNoEvent: serviceNoEvent, @@ -78803,7 +78779,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, @@ -78819,9 +78795,9 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt CookieDef: cookieDef, } redisLogger := redis.NewLogger(factory) - store5 := &redis.Store{ + redisStore := &redis.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Logger: redisLogger, SQLBuilder: sqlBuilderApp, @@ -78830,7 +78806,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt } oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -78842,7 +78818,7 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: appredisHandle, + Redis: handle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -78871,10 +78847,10 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, - OfflineGrants: store5, + OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ - Store: store5, + Store: redisStore, Config: oAuthConfig, Service: offlineGrantService, } @@ -78910,24 +78886,262 @@ func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) htt Clock: clockClock, PasswordGenerator: generator, } - identityFacade := &facade.IdentityFacade{ + identityFacade := facade.IdentityFacade{ Coordinator: coordinator, } - accountmanagementService := &accountmanagement.Service{ - Database: handle, - Store: redisStore, - OAuthProvider: oAuthProviderFactory, - Identities: identityFacade, - Events: eventService, + anonymousStoreRedis := &anonymous.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + Clock: clockClock, } - accountManagementV1IdentificationHandler := &api.AccountManagementV1IdentificationHandler{ - JSON: jsonResponseWriter, - Service: accountmanagementService, + authenticatorFacade := facade.AuthenticatorFacade{ + Coordinator: coordinator, } - return accountManagementV1IdentificationHandler + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, + } + customattrsService := &customattrs.Service{ + Config: userProfileConfig, + ServiceNoEvent: customattrsServiceNoEvent, + Events: eventService, + } + messageSender := &otp.MessageSender{ + Translation: translationService, + Endpoints: endpointsEndpoints, + Sender: sender, + WhatsappService: whatsappService, + } + workflowVerificationFacade := facade.WorkflowVerificationFacade{ + Verification: verificationService, + } + forgotpasswordLogger := forgotpassword.NewLogger(factory) + sender2 := forgotpassword.Sender{ + AppConfg: appConfig, + Identities: serviceService, + Sender: sender, + Translation: translationService, + } + forgotpasswordService := &forgotpassword.Service{ + Logger: forgotpasswordLogger, + Config: appConfig, + FeatureConfig: featureConfig, + Identities: serviceService, + Authenticators: authenticatorFacade, + OTPCodes: otpService, + OTPSender: messageSender, + PasswordSender: sender2, + } + accountMigrationConfig := appConfig.AccountMigration + accountMigrationHookConfig := accountMigrationConfig.Hook + hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) + denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) + accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ + DenoHook: denoHook, + Client: hookDenoClient, + Logger: denoMiddlewareLogger, + } + hookWebHookImpl := &hook.WebHookImpl{ + Logger: webHookLogger, + Secret: webhookKeyMaterials, + } + hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) + webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) + accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ + WebHook: hookWebHookImpl, + Client: hookHTTPClient, + Logger: webhookMiddlewareLogger, + } + accountmigrationService := &accountmigration.Service{ + Config: accountMigrationHookConfig, + DenoHook: accountMigrationDenoHook, + WebHook: accountMigrationWebHook, + } + challengeProvider := &challenge.Provider{ + Redis: handle, + AppID: appID, + Clock: clockClock, + } + captchaConfig := appConfig.Captcha + providerLogger := captcha.NewProviderLogger(factory) + deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) + cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) + captchaProvider := &captcha.Provider{ + RemoteIP: remoteIP, + Config: captchaConfig, + Logger: providerLogger, + CloudflareClient: cloudflareClient, + } + botProtectionConfig := appConfig.BotProtection + botprotectionProviderLogger := botprotection.NewProviderLogger(factory) + botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) + botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) + recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) + botprotectionProvider := &botprotection.Provider{ + RemoteIP: remoteIP, + Config: botProtectionConfig, + Logger: botprotectionProviderLogger, + CloudflareClient: botprotectionCloudflareClient, + RecaptchaV2Client: recaptchaV2Client, + Events: eventService, + } + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + Context: contextContext, + AppID: appID, + Redis: handle, + } + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + requestOptionsService := &passkey2.RequestOptionsService{ + ConfigService: configService, + IdentityService: serviceService, + Store: store2, + } + creationOptionsService := &passkey2.CreationOptionsService{ + ConfigService: configService, + UserService: userQueries, + IdentityService: serviceService, + Store: store2, + } + ldapConfig := identityConfig.LDAP + ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) + clientFactory := &ldap2.ClientFactory{ + Config: ldapConfig, + SecretConfig: ldapServerUserCredentials, + } + manager2 := &session.Manager{ + IDPSessions: idpsessionManager, + AccessTokenSessions: sessionManager, + Events: eventService, + } + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + idTokenIssuer := &oidc.IDTokenIssuer{ + Secrets: oAuthKeyMaterials, + BaseURL: endpointsEndpoints, + Users: userQueries, + RolesAndGroups: queries, + Clock: clockClock, + } + dependencies := &authenticationflow.Dependencies{ + Config: appConfig, + FeatureConfig: featureConfig, + Clock: clockClock, + RemoteIP: remoteIP, + HTTPOrigin: httpOrigin, + HTTPRequest: request, + Users: userProvider, + Identities: identityFacade, + AnonymousIdentities: anonymousProvider, + AnonymousUserPromotionCodeStore: anonymousStoreRedis, + Authenticators: authenticatorFacade, + MFA: mfaFacade, + StdAttrsService: stdattrsService, + CustomAttrsService: customattrsService, + OTPCodes: otpService, + OTPSender: messageSender, + Verification: workflowVerificationFacade, + ForgotPassword: forgotpasswordService, + ResetPassword: forgotpasswordService, + AccountMigrations: accountmigrationService, + Challenges: challengeProvider, + Captcha: captchaProvider, + BotProtection: botprotectionProvider, + OAuthProviderFactory: oAuthProviderFactory, + PasskeyRequestOptionsService: requestOptionsService, + PasskeyCreationOptionsService: creationOptionsService, + PasskeyService: passkeyService, + LoginIDs: provider, + LDAP: ldapProvider, + LDAPClientFactory: clientFactory, + IDPSessions: idpsessionProvider, + Sessions: manager2, + AuthenticationInfos: authenticationinfoStoreRedis, + SessionCookie: cookieDef, + MFADeviceTokenCookie: mfaCookieDef, + Cookies: cookieManager, + Events: eventService, + RateLimiter: limiter, + OfflineGrants: redisStore, + IDTokens: idTokenIssuer, + } + authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) + authenticationflowStoreImpl := &authenticationflow.StoreImpl{ + Redis: handle, + AppID: appID, + Context: contextContext, + } + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, + } + authenticationflowService := &authenticationflow.Service{ + ContextDoNotUseDirectly: contextContext, + Deps: dependencies, + Logger: authenticationflowServiceLogger, + Store: authenticationflowStoreImpl, + Database: appdbHandle, + UIConfig: uiConfig, + UIInfoResolver: uiService, + OAuthClientResolver: oauthclientResolver, + } + authenticationFlowV1GetHandler := &api.AuthenticationFlowV1GetHandler{ + LoggerFactory: factory, + RedisHandle: handle, + JSON: jsonResponseWriter, + Workflows: authenticationflowService, + } + return authenticationFlowV1GetHandler } -func newAPIAccountManagementV1IdentificationOAuthHandler(p *deps.RequestProvider) http.Handler { +func newAPIAuthenticationFlowV1WebsocketHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + factory := appProvider.LoggerFactory + handle := appProvider.Redis + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + httpConfig := appConfig.HTTP + oAuthConfig := appConfig.OAuth + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + corsAllowedOrigins := environmentConfig.CORSAllowedOrigins + corsMatcher := &middleware.CORSMatcher{ + Config: httpConfig, + OAuthConfig: oAuthConfig, + CORSAllowedOrigins: corsAllowedOrigins, + } + appID := appConfig.ID + request := p.Request + contextContext := deps.ProvideRequestContext(request) + storeImpl := &authenticationflow.StoreImpl{ + Redis: handle, + AppID: appID, + Context: contextContext, + } + websocketEventStore := authenticationflow.NewWebsocketEventStore(appID, handle, storeImpl) + authenticationFlowV1WebsocketHandler := &api.AuthenticationFlowV1WebsocketHandler{ + LoggerFactory: factory, + RedisHandle: handle, + OriginMatcher: corsMatcher, + Events: websocketEventStore, + } + return authenticationFlowV1WebsocketHandler +} + +func newAPIAccountManagementV1IdentificationHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) @@ -79651,86 +79865,82 @@ func newAPIAccountManagementV1IdentificationOAuthHandler(p *deps.RequestProvider Identities: identityFacade, Events: eventService, } - accountManagementV1IdentificationOAuthHandler := &api.AccountManagementV1IdentificationOAuthHandler{ + accountManagementV1IdentificationHandler := &api.AccountManagementV1IdentificationHandler{ JSON: jsonResponseWriter, Service: accountmanagementService, } - return accountManagementV1IdentificationOAuthHandler + return accountManagementV1IdentificationHandler } -func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { +func newAPIAccountManagementV1IdentificationOAuthHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory - authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) + jsonResponseWriterLogger := httputil.NewJSONResponseWriterLogger(factory) + jsonResponseWriter := &httputil.JSONResponseWriter{ + Logger: jsonResponseWriterLogger, + } + handle := appProvider.AppDatabase request := p.Request - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpProto := deps.ProvideHTTPProto(request, trustProxy) + contextContext := deps.ProvideRequestContext(request) appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig - uiConfig := appConfig.UI - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, + appID := appConfig.ID + appredisHandle := appProvider.Redis + clockClock := _wireSystemClockValue + redisStore := &accountmanagement.RedisStore{ + Context: contextContext, + AppID: appID, + Redis: appredisHandle, + Clock: clockClock, } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, + identityConfig := appConfig.Identity + secretConfig := config.SecretConfig + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + loginIDConfig := identityConfig.LoginID + normalizerFactory := &loginid.NormalizerFactory{ + Config: loginIDConfig, } - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, + normalizer := &stdattrs.Normalizer{ + LoginIDNormalizerFactory: normalizerFactory, } - clockClock := _wireSystemClockValue - sessionStoreRedis := &webapp2.SessionStoreRedis{ - AppID: appID, - Redis: handle, + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + Context: contextContext, + AppID: appID, + Redis: appredisHandle, } - sessionCookieDef := webapp2.NewSessionCookieDef() - signedUpCookieDef := webapp2.NewSignedUpCookieDef() - contextContext := deps.ProvideRequestContext(request) - featureConfig := config.FeatureConfig + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + trustProxy := environmentConfig.TrustProxy remoteIP := deps.ProvideRemoteIP(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) - secretConfig := config.SecretConfig + userAgentString := deps.ProvideUserAgentString(request) + logger := event.NewLogger(factory) + localizationConfig := appConfig.Localization databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) + sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - appdbHandle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) store := &user.Store{ SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, AppID: appID, } - rawCommands := &user.RawCommands{ - Store: store, - Clock: clockClock, - } rawQueries := &user.RawQueries{ Store: store, } - userAgentString := deps.ProvideUserAgentString(request) - logger := event.NewLogger(factory) - localizationConfig := appConfig.Localization - sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) - storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) authenticationConfig := appConfig.Authentication - identityConfig := appConfig.Identity + featureConfig := config.FeatureConfig identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ SQLBuilder: sqlBuilderApp, @@ -79740,7 +79950,7 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } - loginIDConfig := identityConfig.LoginID + uiConfig := appConfig.UI manager := appContext.Resources typeCheckerFactory := &loginid.TypeCheckerFactory{ UIConfig: uiConfig, @@ -79751,9 +79961,6 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { Config: loginIDConfig, TypeCheckerFactory: typeCheckerFactory, } - normalizerFactory := &loginid.NormalizerFactory{ - Config: loginIDConfig, - } provider := &loginid.Provider{ Store: loginidStore, Config: loginIDConfig, @@ -79793,7 +80000,7 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { } store2 := &passkey2.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) @@ -79806,6 +80013,9 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { engine := &template.Engine{ Resolver: resolver, } + httpProto := deps.ProvideHTTPProto(request, trustProxy) + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -79843,14 +80053,14 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -79878,9 +80088,6 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } - normalizer := &stdattrs.Normalizer{ - LoginIDNormalizerFactory: normalizerFactory, - } ldapProvider := &ldap.Provider{ Store: ldapStore, Clock: clockClock, @@ -79965,17 +80172,17 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -80001,7 +80208,7 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -80142,11 +80349,11 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: appdbHandle, + Database: handle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, @@ -80160,26 +80367,11 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: appdbHandle, - } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) - userCommands := &user.Commands{ - RawCommands: rawCommands, - RawQueries: rawQueries, - Events: eventService, - Verification: verificationService, - UserProfileConfig: userProfileConfig, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, - } - userProvider := &user.Provider{ - Commands: userCommands, - Queries: userQueries, + Database: handle, } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -80207,7 +80399,7 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: handle, + Redis: appredisHandle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -80229,7 +80421,7 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -80258,6 +80450,21 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { Sender: sender, Translation: translationService, } + rawCommands := &user.RawCommands{ + Store: store, + Clock: clockClock, + } + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } stdattrsService := &stdattrs2.Service{ UserProfileConfig: userProfileConfig, ServiceNoEvent: serviceNoEvent, @@ -80272,12 +80479,14 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, } sessionConfig := appConfig.Session + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) cookieDef := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, @@ -80286,9 +80495,9 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { CookieDef: cookieDef, } redisLogger := redis.NewLogger(factory) - redisStore := &redis.Store{ + store5 := &redis.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Logger: redisLogger, SQLBuilder: sqlBuilderApp, @@ -80297,7 +80506,7 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { } oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -80309,7 +80518,7 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: handle, + Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -80317,6 +80526,18 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, Random: idpsessionRand, } + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } oauthclientResolver := &oauthclient.Resolver{ OAuthConfig: oAuthConfig, TesterEndpoints: endpointsEndpoints, @@ -80326,10 +80547,10 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, IDPSessions: idpsessionProvider, ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, + OfflineGrants: store5, } sessionManager := &oauth2.SessionManager{ - Store: redisStore, + Store: store5, Config: oAuthConfig, Service: offlineGrantService, } @@ -80365,537 +80586,216 @@ func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, PasswordGenerator: generator, } - identityFacade := facade.IdentityFacade{ + identityFacade := &facade.IdentityFacade{ Coordinator: coordinator, } - anonymousStoreRedis := &anonymous.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - Clock: clockClock, + accountmanagementService := &accountmanagement.Service{ + Database: handle, + Store: redisStore, + OAuthProvider: oAuthProviderFactory, + Identities: identityFacade, + Events: eventService, } - authenticatorFacade := facade.AuthenticatorFacade{ - Coordinator: coordinator, + accountManagementV1IdentificationOAuthHandler := &api.AccountManagementV1IdentificationOAuthHandler{ + JSON: jsonResponseWriter, + Service: accountmanagementService, } - mfaFacade := &facade.MFAFacade{ - Coordinator: coordinator, + return accountManagementV1IdentificationOAuthHandler +} + +func newWebAppAuthflowLoginHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + factory := appProvider.LoggerFactory + authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) + request := p.Request + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpProto := deps.ProvideHTTPProto(request, trustProxy) + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + uiConfig := appConfig.UI + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, } - customattrsService := &customattrs.Service{ - Config: userProfileConfig, - ServiceNoEvent: customattrsServiceNoEvent, - Events: eventService, + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, } - messageSender := &otp.MessageSender{ - Translation: translationService, - Endpoints: endpointsEndpoints, - Sender: sender, - WhatsappService: whatsappService, + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, } - workflowVerificationFacade := facade.WorkflowVerificationFacade{ - Verification: verificationService, + clockClock := _wireSystemClockValue + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: handle, } - forgotpasswordLogger := forgotpassword.NewLogger(factory) - sender2 := forgotpassword.Sender{ - AppConfg: appConfig, - Identities: serviceService, - Sender: sender, - Translation: translationService, + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() + contextContext := deps.ProvideRequestContext(request) + featureConfig := config.FeatureConfig + remoteIP := deps.ProvideRemoteIP(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + secretConfig := config.SecretConfig + databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) + sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) + appdbHandle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) + store := &user.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + AppID: appID, } - forgotpasswordService := &forgotpassword.Service{ - Logger: forgotpasswordLogger, - Config: appConfig, - FeatureConfig: featureConfig, - Identities: serviceService, - Authenticators: authenticatorFacade, - OTPCodes: otpService, - OTPSender: messageSender, - PasswordSender: sender2, + rawCommands := &user.RawCommands{ + Store: store, + Clock: clockClock, } - accountMigrationConfig := appConfig.AccountMigration - accountMigrationHookConfig := accountMigrationConfig.Hook - hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) - denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) - accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ - DenoHook: denoHook, - Client: hookDenoClient, - Logger: denoMiddlewareLogger, + rawQueries := &user.RawQueries{ + Store: store, } - hookWebHookImpl := &hook.WebHookImpl{ - Logger: webHookLogger, - Secret: webhookKeyMaterials, + userAgentString := deps.ProvideUserAgentString(request) + logger := event.NewLogger(factory) + localizationConfig := appConfig.Localization + sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) + storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) + authenticationConfig := appConfig.Authentication + identityConfig := appConfig.Identity + identityFeatureConfig := featureConfig.Identity + serviceStore := &service.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, } - hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) - webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) - accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ - WebHook: hookWebHookImpl, - Client: hookHTTPClient, - Logger: webhookMiddlewareLogger, + loginidStore := &loginid.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, } - accountmigrationService := &accountmigration.Service{ - Config: accountMigrationHookConfig, - DenoHook: accountMigrationDenoHook, - WebHook: accountMigrationWebHook, + loginIDConfig := identityConfig.LoginID + manager := appContext.Resources + typeCheckerFactory := &loginid.TypeCheckerFactory{ + UIConfig: uiConfig, + LoginIDConfig: loginIDConfig, + Resources: manager, } - challengeProvider := &challenge.Provider{ - Redis: handle, - AppID: appID, + checker := &loginid.Checker{ + Config: loginIDConfig, + TypeCheckerFactory: typeCheckerFactory, + } + normalizerFactory := &loginid.NormalizerFactory{ + Config: loginIDConfig, + } + provider := &loginid.Provider{ + Store: loginidStore, + Config: loginIDConfig, + Checker: checker, + NormalizerFactory: normalizerFactory, + Clock: clockClock, + } + oauthStore := &oauth3.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + IdentityConfig: identityConfig, + } + oauthProvider := &oauth3.Provider{ + Store: oauthStore, + Clock: clockClock, + IdentityConfig: identityConfig, + } + anonymousStore := &anonymous.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + anonymousProvider := &anonymous.Provider{ + Store: anonymousStore, Clock: clockClock, } - captchaConfig := appConfig.Captcha - providerLogger := captcha.NewProviderLogger(factory) - deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) - cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) - captchaProvider := &captcha.Provider{ - RemoteIP: remoteIP, - Config: captchaConfig, - Logger: providerLogger, - CloudflareClient: cloudflareClient, + biometricStore := &biometric.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, } - botProtectionConfig := appConfig.BotProtection - botprotectionProviderLogger := botprotection.NewProviderLogger(factory) - botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) - botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) - recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) - botprotectionProvider := &botprotection.Provider{ - RemoteIP: remoteIP, - Config: botProtectionConfig, - Logger: botprotectionProviderLogger, - CloudflareClient: botprotectionCloudflareClient, - RecaptchaV2Client: recaptchaV2Client, - Events: eventService, + biometricProvider := &biometric.Provider{ + Store: biometricStore, + Clock: clockClock, } - oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) - oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) - simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + passkeyStore := &passkey.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + store2 := &passkey2.Store{ Context: contextContext, - AppID: appID, Redis: handle, + AppID: appID, } - oAuthProviderFactory := &sso.OAuthProviderFactory{ - IdentityConfig: identityConfig, - Credentials: oAuthSSOProviderCredentials, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, - HTTPClient: oAuthHTTPClient, - SimpleStoreRedisFactory: simpleStoreRedisFactory, + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + resolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, } - requestOptionsService := &passkey2.RequestOptionsService{ - ConfigService: configService, - IdentityService: serviceService, - Store: store2, + engine := &template.Engine{ + Resolver: resolver, } - creationOptionsService := &passkey2.CreationOptionsService{ - ConfigService: configService, - UserService: userQueries, - IdentityService: serviceService, - Store: store2, + webAppCDNHost := environmentConfig.WebAppCDNHost + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, } - ldapConfig := identityConfig.LDAP - ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) - clientFactory := &ldap2.ClientFactory{ - Config: ldapConfig, - SecretConfig: ldapServerUserCredentials, + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, } - manager2 := &session.Manager{ - IDPSessions: idpsessionManager, - AccessTokenSessions: sessionManager, - Events: eventService, + configService := &passkey2.ConfigService{ + Request: request, + TrustProxy: trustProxy, + TranslationService: translationService, } - authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + passkeyService := &passkey2.Service{ + Store: store2, + ConfigService: configService, + } + passkeyProvider := &passkey.Provider{ + Store: passkeyStore, + Clock: clockClock, + Passkey: passkeyService, + } + siweStore := &siwe.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + web3Config := appConfig.Web3 + storeRedis := &siwe2.StoreRedis{ Context: contextContext, Redis: handle, AppID: appID, + Clock: clockClock, } - mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) - idTokenIssuer := &oidc.IDTokenIssuer{ - Secrets: oAuthKeyMaterials, - BaseURL: endpointsEndpoints, - Users: userQueries, - RolesAndGroups: queries, - Clock: clockClock, - } - dependencies := &authenticationflow.Dependencies{ - Config: appConfig, - FeatureConfig: featureConfig, - Clock: clockClock, - RemoteIP: remoteIP, - HTTPOrigin: httpOrigin, - HTTPRequest: request, - Users: userProvider, - Identities: identityFacade, - AnonymousIdentities: anonymousProvider, - AnonymousUserPromotionCodeStore: anonymousStoreRedis, - Authenticators: authenticatorFacade, - MFA: mfaFacade, - StdAttrsService: stdattrsService, - CustomAttrsService: customattrsService, - OTPCodes: otpService, - OTPSender: messageSender, - Verification: workflowVerificationFacade, - ForgotPassword: forgotpasswordService, - ResetPassword: forgotpasswordService, - AccountMigrations: accountmigrationService, - Challenges: challengeProvider, - Captcha: captchaProvider, - BotProtection: botprotectionProvider, - OAuthProviderFactory: oAuthProviderFactory, - PasskeyRequestOptionsService: requestOptionsService, - PasskeyCreationOptionsService: creationOptionsService, - PasskeyService: passkeyService, - LoginIDs: provider, - LDAP: ldapProvider, - LDAPClientFactory: clientFactory, - IDPSessions: idpsessionProvider, - Sessions: manager2, - AuthenticationInfos: authenticationinfoStoreRedis, - SessionCookie: cookieDef, - MFADeviceTokenCookie: mfaCookieDef, - Cookies: cookieManager, - Events: eventService, - RateLimiter: limiter, - OfflineGrants: redisStore, - IDTokens: idTokenIssuer, - } - authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) - authenticationflowStoreImpl := &authenticationflow.StoreImpl{ - Redis: handle, - AppID: appID, - Context: contextContext, - } - uiService := &authenticationinfo.UIService{ - EndpointsProvider: endpointsEndpoints, - } - authenticationflowService := &authenticationflow.Service{ - ContextDoNotUseDirectly: contextContext, - Deps: dependencies, - Logger: authenticationflowServiceLogger, - Store: authenticationflowStoreImpl, - Database: appdbHandle, - UIConfig: uiConfig, - UIInfoResolver: uiService, - OAuthClientResolver: oauthclientResolver, - } - oauthsessionStoreRedis := &oauthsession.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - samlsessionStoreRedis := &samlsession.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - promptResolver := &oauth2.PromptResolver{ - Clock: clockClock, - } - oauthOfflineGrantService := &oauth2.OfflineGrantService{ - OAuthConfig: oAuthConfig, - Clock: clockClock, - IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, - } - idTokenHintResolver := &oidc.IDTokenHintResolver{ - Issuer: idTokenIssuer, - Sessions: idpsessionProvider, - OfflineGrantService: oauthOfflineGrantService, - } - uiInfoResolver := &oidc.UIInfoResolver{ - Config: oAuthConfig, - EndpointsProvider: endpointsEndpoints, - PromptResolver: promptResolver, - IDTokenHintResolver: idTokenHintResolver, - Clock: clockClock, - Cookies: cookieManager, - ClientResolver: oauthclientResolver, - } - webappoauthStore := &webappoauth.Store{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - authflowNavigator := &webapp2.AuthflowNavigator{ - Endpoints: endpointsEndpoints, - OAuthStateStore: webappoauthStore, - } - authflowController := &webapp.AuthflowController{ - Logger: authflowControllerLogger, - TesterEndpointsProvider: endpointsEndpoints, - ErrorService: errorService, - TrustProxy: trustProxy, - Clock: clockClock, - Cookies: cookieManager, - Sessions: sessionStoreRedis, - SessionCookie: sessionCookieDef, - SignedUpCookie: signedUpCookieDef, - Authflows: authenticationflowService, - OAuthSessions: oauthsessionStoreRedis, - SAMLSessions: samlsessionStoreRedis, - UIInfoResolver: uiInfoResolver, - UIConfig: uiConfig, - OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, - } - uiFeatureConfig := featureConfig.UI - forgotPasswordConfig := appConfig.ForgotPassword - googleTagManagerConfig := appConfig.GoogleTagManager - flashMessage := &httputil.FlashMessage{ - Cookies: cookieManager, - } - authUISentryDSN := environmentConfig.AuthUISentryDSN - authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins - baseLogger := viewmodels.NewBaseLogger(factory) - baseViewModeler := &viewmodels.BaseViewModeler{ - TrustProxy: trustProxy, - OAuth: oAuthConfig, - AuthUI: uiConfig, - AuthUIFeatureConfig: uiFeatureConfig, - StaticAssets: staticAssetResolver, - ForgotPassword: forgotPasswordConfig, - Authentication: authenticationConfig, - GoogleTagManager: googleTagManagerConfig, - BotProtection: botProtectionConfig, - ErrorService: errorService, - Translations: translationService, - Clock: clockClock, - FlashMessage: flashMessage, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - AuthUISentryDSN: authUISentryDSN, - AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: oauthclientResolver, - Logger: baseLogger, - } - authflowViewModeler := &viewmodels.AuthflowViewModeler{ - Authentication: authenticationConfig, - LoginID: loginIDConfig, - Identity: identityConfig, - } - responseRenderer := &webapp.ResponseRenderer{ - TemplateEngine: engine, - } - analyticredisHandle := appProvider.AnalyticRedis - meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) - writeStoreRedis := &meter.WriteStoreRedis{ - Context: contextContext, - Redis: analyticredisHandle, - AppID: appID, - Clock: clockClock, - Logger: meterStoreRedisLogger, - } - meterService := &meter.Service{ - Counter: writeStoreRedis, - } - tutorialCookie := &httputil.TutorialCookie{ - Cookies: cookieManager, - } - authflowLoginHandler := &webapp.AuthflowLoginHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - AuthflowViewModel: authflowViewModeler, - Renderer: responseRenderer, - MeterService: meterService, - TutorialCookie: tutorialCookie, - ErrorService: errorService, - Endpoints: endpointsEndpoints, - } - return authflowLoginHandler -} - -func newWebAppAuthflowV2LoginHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - factory := appProvider.LoggerFactory - authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) - request := p.Request - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpProto := deps.ProvideHTTPProto(request, trustProxy) - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - uiConfig := appConfig.UI - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, - } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, - } - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, - } - clockClock := _wireSystemClockValue - sessionStoreRedis := &webapp2.SessionStoreRedis{ - AppID: appID, - Redis: handle, - } - sessionCookieDef := webapp2.NewSessionCookieDef() - signedUpCookieDef := webapp2.NewSignedUpCookieDef() - contextContext := deps.ProvideRequestContext(request) - featureConfig := config.FeatureConfig - remoteIP := deps.ProvideRemoteIP(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) - secretConfig := config.SecretConfig - databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) - sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - appdbHandle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) - store := &user.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, - AppID: appID, - } - rawCommands := &user.RawCommands{ - Store: store, - Clock: clockClock, - } - rawQueries := &user.RawQueries{ - Store: store, - } - userAgentString := deps.ProvideUserAgentString(request) - logger := event.NewLogger(factory) - localizationConfig := appConfig.Localization - sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) - storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) - authenticationConfig := appConfig.Authentication - identityConfig := appConfig.Identity - identityFeatureConfig := featureConfig.Identity - serviceStore := &service.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - } - loginidStore := &loginid.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - } - loginIDConfig := identityConfig.LoginID - manager := appContext.Resources - typeCheckerFactory := &loginid.TypeCheckerFactory{ - UIConfig: uiConfig, - LoginIDConfig: loginIDConfig, - Resources: manager, - } - checker := &loginid.Checker{ - Config: loginIDConfig, - TypeCheckerFactory: typeCheckerFactory, - } - normalizerFactory := &loginid.NormalizerFactory{ - Config: loginIDConfig, - } - provider := &loginid.Provider{ - Store: loginidStore, - Config: loginIDConfig, - Checker: checker, - NormalizerFactory: normalizerFactory, - Clock: clockClock, - } - oauthStore := &oauth3.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - IdentityConfig: identityConfig, - } - oauthProvider := &oauth3.Provider{ - Store: oauthStore, - Clock: clockClock, - IdentityConfig: identityConfig, - } - anonymousStore := &anonymous.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - } - anonymousProvider := &anonymous.Provider{ - Store: anonymousStore, - Clock: clockClock, - } - biometricStore := &biometric.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - } - biometricProvider := &biometric.Provider{ - Store: biometricStore, - Clock: clockClock, - } - passkeyStore := &passkey.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - } - store2 := &passkey2.Store{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) - supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ - Resources: manager, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - } - engine := &template.Engine{ - Resolver: resolver, - } - webAppCDNHost := environmentConfig.WebAppCDNHost - globalEmbeddedResourceManager := rootProvider.EmbeddedResources - staticAssetResolver := &web.StaticAssetResolver{ - Context: contextContext, - Localization: localizationConfig, - HTTPOrigin: httpOrigin, - HTTPProto: httpProto, - WebAppCDNHost: webAppCDNHost, - Resources: manager, - EmbeddedResources: globalEmbeddedResourceManager, - } - translationService := &translation.Service{ - Context: contextContext, - TemplateEngine: engine, - StaticAssets: staticAssetResolver, - } - configService := &passkey2.ConfigService{ - Request: request, - TrustProxy: trustProxy, - TranslationService: translationService, - } - passkeyService := &passkey2.Service{ - Store: store2, - ConfigService: configService, - } - passkeyProvider := &passkey.Provider{ - Store: passkeyStore, - Clock: clockClock, - Passkey: passkeyService, - } - siweStore := &siwe.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - } - web3Config := appConfig.Web3 - storeRedis := &siwe2.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - Clock: clockClock, - } - ratelimitLogger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ - AppID: appID, - Redis: handle, + ratelimitLogger := ratelimit.NewLogger(factory) + storageRedis := &ratelimit.StorageRedis{ + AppID: appID, + Redis: handle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -81660,7 +81560,7 @@ func newWebAppAuthflowV2LoginHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -81680,7 +81580,7 @@ func newWebAppAuthflowV2LoginHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -81735,32 +81635,20 @@ func newWebAppAuthflowV2LoginHandler(p *deps.RequestProvider) http.Handler { tutorialCookie := &httputil.TutorialCookie{ Cookies: cookieManager, } - internalAuthflowV2SignupLoginHandler := authflowv2.InternalAuthflowV2SignupLoginHandler{ + authflowLoginHandler := &webapp.AuthflowLoginHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, AuthflowViewModel: authflowViewModeler, Renderer: responseRenderer, MeterService: meterService, TutorialCookie: tutorialCookie, + ErrorService: errorService, Endpoints: endpointsEndpoints, } - authflowV2LoginHandler := &authflowv2.AuthflowV2LoginHandler{ - SignupLoginHandler: internalAuthflowV2SignupLoginHandler, - UIConfig: uiConfig, - AuthenticationConfig: authenticationConfig, - Controller: authflowController, - BaseViewModel: baseViewModeler, - AuthflowViewModel: authflowViewModeler, - Renderer: responseRenderer, - MeterService: meterService, - TutorialCookie: tutorialCookie, - ErrorService: errorService, - Endpoints: endpointsEndpoints, - } - return authflowV2LoginHandler + return authflowLoginHandler } -func newWebAppAuthflowSignupHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2LoginHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -82717,7 +82605,7 @@ func newWebAppAuthflowSignupHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -82737,7 +82625,7 @@ func newWebAppAuthflowSignupHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -82792,7 +82680,7 @@ func newWebAppAuthflowSignupHandler(p *deps.RequestProvider) http.Handler { tutorialCookie := &httputil.TutorialCookie{ Cookies: cookieManager, } - authflowSignupHandler := &webapp.AuthflowSignupHandler{ + internalAuthflowV2SignupLoginHandler := authflowv2.InternalAuthflowV2SignupLoginHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, AuthflowViewModel: authflowViewModeler, @@ -82801,10 +82689,23 @@ func newWebAppAuthflowSignupHandler(p *deps.RequestProvider) http.Handler { TutorialCookie: tutorialCookie, Endpoints: endpointsEndpoints, } - return authflowSignupHandler + authflowV2LoginHandler := &authflowv2.AuthflowV2LoginHandler{ + SignupLoginHandler: internalAuthflowV2SignupLoginHandler, + UIConfig: uiConfig, + AuthenticationConfig: authenticationConfig, + Controller: authflowController, + BaseViewModel: baseViewModeler, + AuthflowViewModel: authflowViewModeler, + Renderer: responseRenderer, + MeterService: meterService, + TutorialCookie: tutorialCookie, + ErrorService: errorService, + Endpoints: endpointsEndpoints, + } + return authflowV2LoginHandler } -func newWebAppAuthflowV2SignupHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowSignupHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -83761,7 +83662,7 @@ func newWebAppAuthflowV2SignupHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -83781,7 +83682,7 @@ func newWebAppAuthflowV2SignupHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -83836,7 +83737,7 @@ func newWebAppAuthflowV2SignupHandler(p *deps.RequestProvider) http.Handler { tutorialCookie := &httputil.TutorialCookie{ Cookies: cookieManager, } - internalAuthflowV2SignupLoginHandler := authflowv2.InternalAuthflowV2SignupLoginHandler{ + authflowSignupHandler := &webapp.AuthflowSignupHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, AuthflowViewModel: authflowViewModeler, @@ -83845,15 +83746,10 @@ func newWebAppAuthflowV2SignupHandler(p *deps.RequestProvider) http.Handler { TutorialCookie: tutorialCookie, Endpoints: endpointsEndpoints, } - authflowV2SignupHandler := &authflowv2.AuthflowV2SignupHandler{ - SignupLoginHandler: internalAuthflowV2SignupLoginHandler, - AuthenticationConfig: authenticationConfig, - UIConfig: uiConfig, - } - return authflowV2SignupHandler + return authflowSignupHandler } -func newWebAppAuthflowPromoteHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2SignupHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -84810,7 +84706,7 @@ func newWebAppAuthflowPromoteHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -84830,7 +84726,7 @@ func newWebAppAuthflowPromoteHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -84870,17 +84766,39 @@ func newWebAppAuthflowPromoteHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowPromoteHandler := &webapp.AuthflowPromoteHandler{ + analyticredisHandle := appProvider.AnalyticRedis + meterStoreRedisLogger := meter.NewStoreRedisLogger(factory) + writeStoreRedis := &meter.WriteStoreRedis{ + Context: contextContext, + Redis: analyticredisHandle, + AppID: appID, + Clock: clockClock, + Logger: meterStoreRedisLogger, + } + meterService := &meter.Service{ + Counter: writeStoreRedis, + } + tutorialCookie := &httputil.TutorialCookie{ + Cookies: cookieManager, + } + internalAuthflowV2SignupLoginHandler := authflowv2.InternalAuthflowV2SignupLoginHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, AuthflowViewModel: authflowViewModeler, Renderer: responseRenderer, + MeterService: meterService, + TutorialCookie: tutorialCookie, Endpoints: endpointsEndpoints, } - return authflowPromoteHandler + authflowV2SignupHandler := &authflowv2.AuthflowV2SignupHandler{ + SignupLoginHandler: internalAuthflowV2SignupLoginHandler, + AuthenticationConfig: authenticationConfig, + UIConfig: uiConfig, + } + return authflowV2SignupHandler } -func newWebAppAuthflowV2PromoteHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowPromoteHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -85837,7 +85755,7 @@ func newWebAppAuthflowV2PromoteHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -85857,7 +85775,7 @@ func newWebAppAuthflowV2PromoteHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -85897,17 +85815,17 @@ func newWebAppAuthflowV2PromoteHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2PromoteHandler := &authflowv2.AuthflowV2PromoteHandler{ + authflowPromoteHandler := &webapp.AuthflowPromoteHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, AuthflowViewModel: authflowViewModeler, Renderer: responseRenderer, Endpoints: endpointsEndpoints, } - return authflowV2PromoteHandler + return authflowPromoteHandler } -func newWebAppAuthflowEnterPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2PromoteHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -86864,7 +86782,7 @@ func newWebAppAuthflowEnterPasswordHandler(p *deps.RequestProvider) http.Handler Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -86884,7 +86802,7 @@ func newWebAppAuthflowEnterPasswordHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -86916,18 +86834,25 @@ func newWebAppAuthflowEnterPasswordHandler(p *deps.RequestProvider) http.Handler OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } + authflowViewModeler := &viewmodels.AuthflowViewModeler{ + Authentication: authenticationConfig, + LoginID: loginIDConfig, + Identity: identityConfig, + } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowEnterPasswordHandler := &webapp.AuthflowEnterPasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2PromoteHandler := &authflowv2.AuthflowV2PromoteHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + AuthflowViewModel: authflowViewModeler, + Renderer: responseRenderer, + Endpoints: endpointsEndpoints, } - return authflowEnterPasswordHandler + return authflowV2PromoteHandler } -func newWebAppAuthflowV2EnterPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowEnterPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -87884,7 +87809,7 @@ func newWebAppAuthflowV2EnterPasswordHandler(p *deps.RequestProvider) http.Handl Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -87904,7 +87829,7 @@ func newWebAppAuthflowV2EnterPasswordHandler(p *deps.RequestProvider) http.Handl UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -87939,19 +87864,15 @@ func newWebAppAuthflowV2EnterPasswordHandler(p *deps.RequestProvider) http.Handl responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ - AppConfig: appConfig, - } - authflowV2EnterPasswordHandler := &authflowv2.AuthflowV2EnterPasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, + authflowEnterPasswordHandler := &webapp.AuthflowEnterPasswordHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return authflowV2EnterPasswordHandler + return authflowEnterPasswordHandler } -func newWebAppAuthflowEnterOOBOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2EnterPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -88908,7 +88829,7 @@ func newWebAppAuthflowEnterOOBOTPHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -88928,7 +88849,7 @@ func newWebAppAuthflowEnterOOBOTPHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -88963,17 +88884,19 @@ func newWebAppAuthflowEnterOOBOTPHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowEnterOOBOTPHandler := &webapp.AuthflowEnterOOBOTPHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - FlashMessage: flashMessage, - Clock: clockClock, + inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ + AppConfig: appConfig, } - return authflowEnterOOBOTPHandler + authflowV2EnterPasswordHandler := &authflowv2.AuthflowV2EnterPasswordHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, + } + return authflowV2EnterPasswordHandler } -func newWebAppAuthflowV2EnterOOBOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowEnterOOBOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -89930,7 +89853,7 @@ func newWebAppAuthflowV2EnterOOBOTPHandler(p *deps.RequestProvider) http.Handler Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -89950,7 +89873,7 @@ func newWebAppAuthflowV2EnterOOBOTPHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -89982,26 +89905,20 @@ func newWebAppAuthflowV2EnterOOBOTPHandler(p *deps.RequestProvider) http.Handler OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } - inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ - AppConfig: appConfig, - } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2EnterOOBOTPHandler := &authflowv2.AuthflowV2EnterOOBOTPHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, - Renderer: responseRenderer, - FlashMessage: flashMessage, - Clock: clockClock, - AuthenticatorConfig: authenticatorConfig, - IdentityConfig: identityConfig, + authflowEnterOOBOTPHandler := &webapp.AuthflowEnterOOBOTPHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + FlashMessage: flashMessage, + Clock: clockClock, } - return authflowV2EnterOOBOTPHandler + return authflowEnterOOBOTPHandler } -func newWebAppAuthflowCreatePasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2EnterOOBOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -90958,7 +90875,7 @@ func newWebAppAuthflowCreatePasswordHandler(p *deps.RequestProvider) http.Handle Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -90978,7 +90895,7 @@ func newWebAppAuthflowCreatePasswordHandler(p *deps.RequestProvider) http.Handle UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -91010,18 +90927,26 @@ func newWebAppAuthflowCreatePasswordHandler(p *deps.RequestProvider) http.Handle OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } + inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ + AppConfig: appConfig, + } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowCreatePasswordHandler := &webapp.AuthflowCreatePasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2EnterOOBOTPHandler := &authflowv2.AuthflowV2EnterOOBOTPHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, + Renderer: responseRenderer, + FlashMessage: flashMessage, + Clock: clockClock, + AuthenticatorConfig: authenticatorConfig, + IdentityConfig: identityConfig, } - return authflowCreatePasswordHandler + return authflowV2EnterOOBOTPHandler } -func newWebAppAuthflowV2CreatePasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowCreatePasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -91978,7 +91903,7 @@ func newWebAppAuthflowV2CreatePasswordHandler(p *deps.RequestProvider) http.Hand Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -91998,7 +91923,7 @@ func newWebAppAuthflowV2CreatePasswordHandler(p *deps.RequestProvider) http.Hand UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -92030,24 +91955,18 @@ func newWebAppAuthflowV2CreatePasswordHandler(p *deps.RequestProvider) http.Hand OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } - inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ - AppConfig: appConfig, - } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2CreatePasswordHandler := &authflowv2.AuthflowV2CreatePasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, - Renderer: responseRenderer, - FeatureConfig: featureConfig, - AuthenticatorConfig: authenticatorConfig, + authflowCreatePasswordHandler := &webapp.AuthflowCreatePasswordHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return authflowV2CreatePasswordHandler + return authflowCreatePasswordHandler } -func newWebAppAuthflowEnterTOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2CreatePasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -93004,7 +92923,7 @@ func newWebAppAuthflowEnterTOTPHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -93024,7 +92943,7 @@ func newWebAppAuthflowEnterTOTPHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -93056,18 +92975,24 @@ func newWebAppAuthflowEnterTOTPHandler(p *deps.RequestProvider) http.Handler { OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } + inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ + AppConfig: appConfig, + } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowEnterTOTPHandler := &webapp.AuthflowEnterTOTPHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2CreatePasswordHandler := &authflowv2.AuthflowV2CreatePasswordHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, + Renderer: responseRenderer, + FeatureConfig: featureConfig, + AuthenticatorConfig: authenticatorConfig, } - return authflowEnterTOTPHandler + return authflowV2CreatePasswordHandler } -func newWebAppAuthflowV2EnterTOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowEnterTOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -94024,7 +93949,7 @@ func newWebAppAuthflowV2EnterTOTPHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -94044,7 +93969,7 @@ func newWebAppAuthflowV2EnterTOTPHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -94076,22 +94001,18 @@ func newWebAppAuthflowV2EnterTOTPHandler(p *deps.RequestProvider) http.Handler { OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } - inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ - AppConfig: appConfig, - } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2EnterTOTPHandler := &authflowv2.AuthflowV2EnterTOTPHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, - Renderer: responseRenderer, + authflowEnterTOTPHandler := &webapp.AuthflowEnterTOTPHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return authflowV2EnterTOTPHandler + return authflowEnterTOTPHandler } -func newWebAppAuthflowSetupTOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2EnterTOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -95048,7 +94969,7 @@ func newWebAppAuthflowSetupTOTPHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -95068,7 +94989,7 @@ func newWebAppAuthflowSetupTOTPHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -95100,18 +95021,22 @@ func newWebAppAuthflowSetupTOTPHandler(p *deps.RequestProvider) http.Handler { OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } + inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ + AppConfig: appConfig, + } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowSetupTOTPHandler := &webapp.AuthflowSetupTOTPHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2EnterTOTPHandler := &authflowv2.AuthflowV2EnterTOTPHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, + Renderer: responseRenderer, } - return authflowSetupTOTPHandler + return authflowV2EnterTOTPHandler } -func newWebAppAuthflowV2SetupTOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowSetupTOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -96068,7 +95993,7 @@ func newWebAppAuthflowV2SetupTOTPHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -96088,7 +96013,7 @@ func newWebAppAuthflowV2SetupTOTPHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -96123,15 +96048,15 @@ func newWebAppAuthflowV2SetupTOTPHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2SetupTOTPHandler := &authflowv2.AuthflowV2SetupTOTPHandler{ + authflowSetupTOTPHandler := &webapp.AuthflowSetupTOTPHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2SetupTOTPHandler + return authflowSetupTOTPHandler } -func newWebAppAuthflowViewRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2SetupTOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -97088,7 +97013,7 @@ func newWebAppAuthflowViewRecoveryCodeHandler(p *deps.RequestProvider) http.Hand Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -97108,7 +97033,7 @@ func newWebAppAuthflowViewRecoveryCodeHandler(p *deps.RequestProvider) http.Hand UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -97143,15 +97068,15 @@ func newWebAppAuthflowViewRecoveryCodeHandler(p *deps.RequestProvider) http.Hand responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowViewRecoveryCodeHandler := &webapp.AuthflowViewRecoveryCodeHandler{ + authflowV2SetupTOTPHandler := &authflowv2.AuthflowV2SetupTOTPHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowViewRecoveryCodeHandler + return authflowV2SetupTOTPHandler } -func newWebAppAuthflowV2ViewRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowViewRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -98108,7 +98033,7 @@ func newWebAppAuthflowV2ViewRecoveryCodeHandler(p *deps.RequestProvider) http.Ha Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -98128,7 +98053,7 @@ func newWebAppAuthflowV2ViewRecoveryCodeHandler(p *deps.RequestProvider) http.Ha UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -98163,15 +98088,15 @@ func newWebAppAuthflowV2ViewRecoveryCodeHandler(p *deps.RequestProvider) http.Ha responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ViewRecoveryCodeHandler := &authflowv2.AuthflowV2ViewRecoveryCodeHandler{ + authflowViewRecoveryCodeHandler := &webapp.AuthflowViewRecoveryCodeHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2ViewRecoveryCodeHandler + return authflowViewRecoveryCodeHandler } -func newWebAppAuthflowWhatsappOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ViewRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -99128,7 +99053,7 @@ func newWebAppAuthflowWhatsappOTPHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -99148,7 +99073,7 @@ func newWebAppAuthflowWhatsappOTPHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -99183,17 +99108,15 @@ func newWebAppAuthflowWhatsappOTPHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowWhatsappOTPHandler := &webapp.AuthflowWhatsappOTPHandler{ + authflowV2ViewRecoveryCodeHandler := &authflowv2.AuthflowV2ViewRecoveryCodeHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, - FlashMessage: flashMessage, - Clock: clockClock, } - return authflowWhatsappOTPHandler + return authflowV2ViewRecoveryCodeHandler } -func newWebAppAuthflowOOBOTPLinkHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowWhatsappOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -100205,17 +100128,17 @@ func newWebAppAuthflowOOBOTPLinkHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowOOBOTPLinkHandler := &webapp.AuthflowOOBOTPLinkHandler{ + authflowWhatsappOTPHandler := &webapp.AuthflowWhatsappOTPHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, FlashMessage: flashMessage, Clock: clockClock, } - return authflowOOBOTPLinkHandler + return authflowWhatsappOTPHandler } -func newWebAppAuthflowV2OOBOTPLinkHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowOOBOTPLinkHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -101172,7 +101095,7 @@ func newWebAppAuthflowV2OOBOTPLinkHandler(p *deps.RequestProvider) http.Handler Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -101192,7 +101115,7 @@ func newWebAppAuthflowV2OOBOTPLinkHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -101224,23 +101147,20 @@ func newWebAppAuthflowV2OOBOTPLinkHandler(p *deps.RequestProvider) http.Handler OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } - inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ - AppConfig: appConfig, - } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2OOBOTPLinkHandler := &authflowv2.AuthflowV2OOBOTPLinkHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, - Renderer: responseRenderer, - Clock: clockClock, + authflowOOBOTPLinkHandler := &webapp.AuthflowOOBOTPLinkHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + FlashMessage: flashMessage, + Clock: clockClock, } - return authflowV2OOBOTPLinkHandler + return authflowOOBOTPLinkHandler } -func newWebAppAuthflowChangePasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2OOBOTPLinkHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -102197,7 +102117,7 @@ func newWebAppAuthflowChangePasswordHandler(p *deps.RequestProvider) http.Handle Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -102217,7 +102137,7 @@ func newWebAppAuthflowChangePasswordHandler(p *deps.RequestProvider) http.Handle UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -102249,23 +102169,23 @@ func newWebAppAuthflowChangePasswordHandler(p *deps.RequestProvider) http.Handle OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } - changePasswordViewModeler := &viewmodels.ChangePasswordViewModeler{ - Authentication: authenticationConfig, - LoginID: loginIDConfig, + inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ + AppConfig: appConfig, } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowChangePasswordHandler := &webapp.AuthflowChangePasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - ChangePasswordViewModel: changePasswordViewModeler, - Renderer: responseRenderer, + authflowV2OOBOTPLinkHandler := &authflowv2.AuthflowV2OOBOTPLinkHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, + Renderer: responseRenderer, + Clock: clockClock, } - return authflowChangePasswordHandler + return authflowV2OOBOTPLinkHandler } -func newWebAppAuthflowV2ChangePasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowChangePasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -103222,7 +103142,7 @@ func newWebAppAuthflowV2ChangePasswordHandler(p *deps.RequestProvider) http.Hand Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -103242,7 +103162,7 @@ func newWebAppAuthflowV2ChangePasswordHandler(p *deps.RequestProvider) http.Hand UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -103281,17 +103201,16 @@ func newWebAppAuthflowV2ChangePasswordHandler(p *deps.RequestProvider) http.Hand responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ChangePasswordHandler := &authflowv2.AuthflowV2ChangePasswordHandler{ + authflowChangePasswordHandler := &webapp.AuthflowChangePasswordHandler{ Controller: authflowController, - Navigator: authflowV2Navigator, BaseViewModel: baseViewModeler, ChangePasswordViewModel: changePasswordViewModeler, Renderer: responseRenderer, } - return authflowV2ChangePasswordHandler + return authflowChangePasswordHandler } -func newWebAppAuthflowV2ChangePasswordSuccessHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ChangePasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -104300,18 +104219,24 @@ func newWebAppAuthflowV2ChangePasswordSuccessHandler(p *deps.RequestProvider) ht OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } + changePasswordViewModeler := &viewmodels.ChangePasswordViewModeler{ + Authentication: authenticationConfig, + LoginID: loginIDConfig, + } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ChangePasswordSuccessHandler := &authflowv2.AuthflowV2ChangePasswordSuccessHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2ChangePasswordHandler := &authflowv2.AuthflowV2ChangePasswordHandler{ + Controller: authflowController, + Navigator: authflowV2Navigator, + BaseViewModel: baseViewModeler, + ChangePasswordViewModel: changePasswordViewModeler, + Renderer: responseRenderer, } - return authflowV2ChangePasswordSuccessHandler + return authflowV2ChangePasswordHandler } -func newWebAppAuthflowUsePasskeyHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ChangePasswordSuccessHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -105268,7 +105193,7 @@ func newWebAppAuthflowUsePasskeyHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -105288,7 +105213,7 @@ func newWebAppAuthflowUsePasskeyHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -105323,15 +105248,15 @@ func newWebAppAuthflowUsePasskeyHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowUsePasskeyHandler := &webapp.AuthflowUsePasskeyHandler{ + authflowV2ChangePasswordSuccessHandler := &authflowv2.AuthflowV2ChangePasswordSuccessHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowUsePasskeyHandler + return authflowV2ChangePasswordSuccessHandler } -func newWebAppAuthflowV2UsePasskeyHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowUsePasskeyHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -106288,7 +106213,7 @@ func newWebAppAuthflowV2UsePasskeyHandler(p *deps.RequestProvider) http.Handler Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -106308,7 +106233,7 @@ func newWebAppAuthflowV2UsePasskeyHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -106340,22 +106265,18 @@ func newWebAppAuthflowV2UsePasskeyHandler(p *deps.RequestProvider) http.Handler OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } - inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ - AppConfig: appConfig, - } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2UsePasskeyHandler := &authflowv2.AuthflowV2UsePasskeyHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, - Renderer: responseRenderer, + authflowUsePasskeyHandler := &webapp.AuthflowUsePasskeyHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return authflowV2UsePasskeyHandler + return authflowUsePasskeyHandler } -func newWebAppAuthflowPromptCreatePasskeyHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2UsePasskeyHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -107312,7 +107233,7 @@ func newWebAppAuthflowPromptCreatePasskeyHandler(p *deps.RequestProvider) http.H Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -107332,7 +107253,7 @@ func newWebAppAuthflowPromptCreatePasskeyHandler(p *deps.RequestProvider) http.H UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -107364,18 +107285,22 @@ func newWebAppAuthflowPromptCreatePasskeyHandler(p *deps.RequestProvider) http.H OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } + inlinePreviewAuthflowBranchViewModeler := &viewmodels.InlinePreviewAuthflowBranchViewModeler{ + AppConfig: appConfig, + } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowPromptCreatePasskeyHandler := &webapp.AuthflowPromptCreatePasskeyHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2UsePasskeyHandler := &authflowv2.AuthflowV2UsePasskeyHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + InlinePreviewAuthflowBranchViewModeler: inlinePreviewAuthflowBranchViewModeler, + Renderer: responseRenderer, } - return authflowPromptCreatePasskeyHandler + return authflowV2UsePasskeyHandler } -func newWebAppAuthflowV2PromptCreatePasskeyHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowPromptCreatePasskeyHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -108332,7 +108257,7 @@ func newWebAppAuthflowV2PromptCreatePasskeyHandler(p *deps.RequestProvider) http Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -108352,7 +108277,7 @@ func newWebAppAuthflowV2PromptCreatePasskeyHandler(p *deps.RequestProvider) http UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -108387,15 +108312,15 @@ func newWebAppAuthflowV2PromptCreatePasskeyHandler(p *deps.RequestProvider) http responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2PromptCreatePasskeyHandler := &authflowv2.AuthflowV2PromptCreatePasskeyHandler{ + authflowPromptCreatePasskeyHandler := &webapp.AuthflowPromptCreatePasskeyHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2PromptCreatePasskeyHandler + return authflowPromptCreatePasskeyHandler } -func newWebAppAuthflowEnterRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2PromptCreatePasskeyHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -109352,7 +109277,7 @@ func newWebAppAuthflowEnterRecoveryCodeHandler(p *deps.RequestProvider) http.Han Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -109372,7 +109297,7 @@ func newWebAppAuthflowEnterRecoveryCodeHandler(p *deps.RequestProvider) http.Han UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -109407,15 +109332,15 @@ func newWebAppAuthflowEnterRecoveryCodeHandler(p *deps.RequestProvider) http.Han responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowEnterRecoveryCodeHandler := &webapp.AuthflowEnterRecoveryCodeHandler{ + authflowV2PromptCreatePasskeyHandler := &authflowv2.AuthflowV2PromptCreatePasskeyHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowEnterRecoveryCodeHandler + return authflowV2PromptCreatePasskeyHandler } -func newWebAppAuthflowV2EnterRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowEnterRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -110372,7 +110297,7 @@ func newWebAppAuthflowV2EnterRecoveryCodeHandler(p *deps.RequestProvider) http.H Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -110392,7 +110317,7 @@ func newWebAppAuthflowV2EnterRecoveryCodeHandler(p *deps.RequestProvider) http.H UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -110427,15 +110352,15 @@ func newWebAppAuthflowV2EnterRecoveryCodeHandler(p *deps.RequestProvider) http.H responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2EnterRecoveryCodeHandler := &authflowv2.AuthflowV2EnterRecoveryCodeHandler{ + authflowEnterRecoveryCodeHandler := &webapp.AuthflowEnterRecoveryCodeHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2EnterRecoveryCodeHandler + return authflowEnterRecoveryCodeHandler } -func newWebAppAuthflowSetupOOBOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2EnterRecoveryCodeHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -111392,7 +111317,7 @@ func newWebAppAuthflowSetupOOBOTPHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -111412,7 +111337,7 @@ func newWebAppAuthflowSetupOOBOTPHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -111447,15 +111372,15 @@ func newWebAppAuthflowSetupOOBOTPHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowSetupOOBOTPHandler := &webapp.AuthflowSetupOOBOTPHandler{ + authflowV2EnterRecoveryCodeHandler := &authflowv2.AuthflowV2EnterRecoveryCodeHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowSetupOOBOTPHandler + return authflowV2EnterRecoveryCodeHandler } -func newWebAppAuthflowV2SetupOOBOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowSetupOOBOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -112412,7 +112337,7 @@ func newWebAppAuthflowV2SetupOOBOTPHandler(p *deps.RequestProvider) http.Handler Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -112432,7 +112357,7 @@ func newWebAppAuthflowV2SetupOOBOTPHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -112467,15 +112392,15 @@ func newWebAppAuthflowV2SetupOOBOTPHandler(p *deps.RequestProvider) http.Handler responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2SetupOOBOTPHandler := &authflowv2.AuthflowV2SetupOOBOTPHandler{ + authflowSetupOOBOTPHandler := &webapp.AuthflowSetupOOBOTPHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2SetupOOBOTPHandler + return authflowSetupOOBOTPHandler } -func newWebAppAuthflowTerminateOtherSessionsHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2SetupOOBOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -113432,7 +113357,7 @@ func newWebAppAuthflowTerminateOtherSessionsHandler(p *deps.RequestProvider) htt Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -113452,7 +113377,7 @@ func newWebAppAuthflowTerminateOtherSessionsHandler(p *deps.RequestProvider) htt UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -113487,15 +113412,15 @@ func newWebAppAuthflowTerminateOtherSessionsHandler(p *deps.RequestProvider) htt responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowTerminateOtherSessionsHandler := &webapp.AuthflowTerminateOtherSessionsHandler{ + authflowV2SetupOOBOTPHandler := &authflowv2.AuthflowV2SetupOOBOTPHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowTerminateOtherSessionsHandler + return authflowV2SetupOOBOTPHandler } -func newWebAppAuthflowV2TerminateOtherSessionsHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowTerminateOtherSessionsHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -114452,7 +114377,7 @@ func newWebAppAuthflowV2TerminateOtherSessionsHandler(p *deps.RequestProvider) h Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -114472,7 +114397,7 @@ func newWebAppAuthflowV2TerminateOtherSessionsHandler(p *deps.RequestProvider) h UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -114507,15 +114432,15 @@ func newWebAppAuthflowV2TerminateOtherSessionsHandler(p *deps.RequestProvider) h responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2TerminateOtherSessionsHandler := &authflowv2.AuthflowV2TerminateOtherSessionsHandler{ + authflowTerminateOtherSessionsHandler := &webapp.AuthflowTerminateOtherSessionsHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2TerminateOtherSessionsHandler + return authflowTerminateOtherSessionsHandler } -func newWebAppAuthflowWechatHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2TerminateOtherSessionsHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -115472,7 +115397,7 @@ func newWebAppAuthflowWechatHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -115492,7 +115417,7 @@ func newWebAppAuthflowWechatHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -115527,16 +115452,15 @@ func newWebAppAuthflowWechatHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowWechatHandler := &webapp.AuthflowWechatHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - OAuthStateStore: webappoauthStore, + authflowV2TerminateOtherSessionsHandler := &authflowv2.AuthflowV2TerminateOtherSessionsHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return authflowWechatHandler + return authflowV2TerminateOtherSessionsHandler } -func newWebAppAuthflowForgotPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowWechatHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -116548,15 +116472,16 @@ func newWebAppAuthflowForgotPasswordHandler(p *deps.RequestProvider) http.Handle responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowForgotPasswordHandler := &webapp.AuthflowForgotPasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowWechatHandler := &webapp.AuthflowWechatHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + OAuthStateStore: webappoauthStore, } - return authflowForgotPasswordHandler + return authflowWechatHandler } -func newWebAppAuthflowV2ForgotPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowForgotPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -117513,7 +117438,7 @@ func newWebAppAuthflowV2ForgotPasswordHandler(p *deps.RequestProvider) http.Hand Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -117533,7 +117458,7 @@ func newWebAppAuthflowV2ForgotPasswordHandler(p *deps.RequestProvider) http.Hand UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -117565,24 +117490,18 @@ func newWebAppAuthflowV2ForgotPasswordHandler(p *deps.RequestProvider) http.Hand OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } - authflowViewModeler := &viewmodels.AuthflowViewModeler{ - Authentication: authenticationConfig, - LoginID: loginIDConfig, - Identity: identityConfig, - } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ForgotPasswordHandler := &authflowv2.AuthflowV2ForgotPasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - AuthflowViewModel: authflowViewModeler, - Renderer: responseRenderer, + authflowForgotPasswordHandler := &webapp.AuthflowForgotPasswordHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, } - return authflowV2ForgotPasswordHandler + return authflowForgotPasswordHandler } -func newWebAppAuthflowForgotPasswordOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ForgotPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -118539,7 +118458,7 @@ func newWebAppAuthflowForgotPasswordOTPHandler(p *deps.RequestProvider) http.Han Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -118559,7 +118478,7 @@ func newWebAppAuthflowForgotPasswordOTPHandler(p *deps.RequestProvider) http.Han UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -118591,20 +118510,24 @@ func newWebAppAuthflowForgotPasswordOTPHandler(p *deps.RequestProvider) http.Han OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } + authflowViewModeler := &viewmodels.AuthflowViewModeler{ + Authentication: authenticationConfig, + LoginID: loginIDConfig, + Identity: identityConfig, + } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowForgotPasswordOTPHandler := &webapp.AuthflowForgotPasswordOTPHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - FlashMessage: flashMessage, - Clock: clockClock, + authflowV2ForgotPasswordHandler := &authflowv2.AuthflowV2ForgotPasswordHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + AuthflowViewModel: authflowViewModeler, + Renderer: responseRenderer, } - return authflowForgotPasswordOTPHandler + return authflowV2ForgotPasswordHandler } -func newWebAppAuthflowV2ForgotPasswordOTPHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowForgotPasswordOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -119561,7 +119484,7 @@ func newWebAppAuthflowV2ForgotPasswordOTPHandler(p *deps.RequestProvider) http.H Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -119581,7 +119504,7 @@ func newWebAppAuthflowV2ForgotPasswordOTPHandler(p *deps.RequestProvider) http.H UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -119616,17 +119539,17 @@ func newWebAppAuthflowV2ForgotPasswordOTPHandler(p *deps.RequestProvider) http.H responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ForgotPasswordOTPHandler := &authflowv2.AuthflowV2ForgotPasswordOTPHandler{ + authflowForgotPasswordOTPHandler := &webapp.AuthflowForgotPasswordOTPHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, FlashMessage: flashMessage, Clock: clockClock, } - return authflowV2ForgotPasswordOTPHandler + return authflowForgotPasswordOTPHandler } -func newWebAppAuthflowForgotPasswordSuccessHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ForgotPasswordOTPHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -120583,7 +120506,7 @@ func newWebAppAuthflowForgotPasswordSuccessHandler(p *deps.RequestProvider) http Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -120603,7 +120526,7 @@ func newWebAppAuthflowForgotPasswordSuccessHandler(p *deps.RequestProvider) http UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -120638,15 +120561,17 @@ func newWebAppAuthflowForgotPasswordSuccessHandler(p *deps.RequestProvider) http responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowForgotPasswordSuccessHandler := &webapp.AuthflowForgotPasswordSuccessHandler{ + authflowV2ForgotPasswordOTPHandler := &authflowv2.AuthflowV2ForgotPasswordOTPHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, + FlashMessage: flashMessage, + Clock: clockClock, } - return authflowForgotPasswordSuccessHandler + return authflowV2ForgotPasswordOTPHandler } -func newWebAppAuthflowV2ForgotPasswordLinkSentHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowForgotPasswordSuccessHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -121603,7 +121528,7 @@ func newWebAppAuthflowV2ForgotPasswordLinkSentHandler(p *deps.RequestProvider) h Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -121623,7 +121548,7 @@ func newWebAppAuthflowV2ForgotPasswordLinkSentHandler(p *deps.RequestProvider) h UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -121658,50 +121583,28 @@ func newWebAppAuthflowV2ForgotPasswordLinkSentHandler(p *deps.RequestProvider) h responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ForgotPasswordLinkSentHandler := &authflowv2.AuthflowV2ForgotPasswordLinkSentHandler{ + authflowForgotPasswordSuccessHandler := &webapp.AuthflowForgotPasswordSuccessHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, - Clock: clockClock, } - return authflowV2ForgotPasswordLinkSentHandler + return authflowForgotPasswordSuccessHandler } -func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ForgotPasswordLinkSentHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory - handle := appProvider.AppDatabase - appredisHandle := appProvider.Redis - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - appID := appConfig.ID - serviceLogger := webapp2.NewServiceLogger(factory) + authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) request := p.Request - sessionStoreRedis := &webapp2.SessionStoreRedis{ - AppID: appID, - Redis: appredisHandle, - } - sessionCookieDef := webapp2.NewSessionCookieDef() - signedUpCookieDef := webapp2.NewSignedUpCookieDef() - authenticationConfig := appConfig.Authentication - cookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig trustProxy := environmentConfig.TrustProxy - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: appredisHandle, - Cookies: cookieManager, - } - oAuthConfig := appConfig.OAuth - uiConfig := appConfig.UI httpHost := deps.ProvideHTTPHost(request, trustProxy) httpProto := deps.ProvideHTTPProto(request, trustProxy) + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + uiConfig := appConfig.UI globalUIImplementation := environmentConfig.UIImplementation globalUISettingsImplementation := environmentConfig.UISettingsImplementation uiImplementationService := &web.UIImplementationService{ @@ -121714,46 +121617,52 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { HTTPProto: httpProto, UIImplementationService: uiImplementationService, } - uiService := &authenticationinfo.UIService{ - EndpointsProvider: endpointsEndpoints, + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, } - resolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, + clockClock := _wireSystemClockValue + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: handle, } - logger := interaction.NewLogger(factory) - remoteIP := deps.ProvideRemoteIP(request, trustProxy) + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() contextContext := deps.ProvideRequestContext(request) - sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) - clockClock := _wireSystemClockValue featureConfig := config.FeatureConfig - redisLogger := redis.NewLogger(factory) + remoteIP := deps.ProvideRemoteIP(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - store := &redis.Store{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, - Logger: redisLogger, + appdbHandle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) + store := &user.Store{ SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, + AppID: appID, + } + rawCommands := &user.RawCommands{ + Store: store, + Clock: clockClock, + } + rawQueries := &user.RawQueries{ + Store: store, } userAgentString := deps.ProvideUserAgentString(request) - eventLogger := event.NewLogger(factory) + logger := event.NewLogger(factory) localizationConfig := appConfig.Localization sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) - userStore := &user.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, - AppID: appID, - } - rawQueries := &user.RawQueries{ - Store: userStore, - } + authenticationConfig := appConfig.Authentication identityConfig := appConfig.Identity identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ @@ -121817,20 +121726,19 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { } store2 := &passkey2.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - templateResolver := &template.Resolver{ + resolver := &template.Resolver{ Resources: manager, DefaultLanguageTag: defaultLanguageTag, SupportedLanguageTags: supportedLanguageTags, } engine := &template.Engine{ - Resolver: templateResolver, + Resolver: resolver, } - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -121868,14 +121776,14 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -121990,17 +121898,17 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -122026,7 +121934,7 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -122070,14 +121978,14 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { UserProfileConfig: userProfileConfig, Identities: serviceService, UserQueries: rawQueries, - UserStore: userStore, + UserStore: store, ClaimStore: storePQ, Transformer: pictureTransformer, } customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ Config: userProfileConfig, UserQueries: rawQueries, - UserStore: userStore, + UserStore: store, } nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint web3Service := &web3.Service{ @@ -122094,7 +122002,7 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { } userQueries := &user.Queries{ RawQueries: rawQueries, - Store: userStore, + Store: store, Identities: serviceService, Authenticators: service3, Verification: verificationService, @@ -122167,16 +122075,16 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: handle, + Database: appdbHandle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, Users: userQueries, - UserStore: userStore, + UserStore: store, IdentityService: serviceService, RolesGroups: rolesgroupsStore, TaskQueue: queue, @@ -122185,11 +122093,26 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: handle, + Database: appdbHandle, + } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -122217,7 +122140,7 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: appredisHandle, + Redis: handle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -122232,21 +122155,21 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { FeatureConfig: messagingFeatureConfig, EnvConfig: rateLimitsEnvironmentConfig, } - whatsappServiceLogger := whatsapp.NewServiceLogger(factory) + serviceLogger := whatsapp.NewServiceLogger(factory) devMode := environmentConfig.DevMode featureTestModeWhatsappSuppressed := deps.ProvideTestModeWhatsappSuppressed(testModeFeatureConfig) testModeWhatsappConfig := testModeConfig.Whatsapp whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } onPremisesClient := whatsapp.NewWhatsappOnPremisesClient(whatsappConfig, whatsappOnPremisesCredentials, tokenStore) whatsappService := &whatsapp.Service{ Context: contextContext, - Logger: whatsappServiceLogger, + Logger: serviceLogger, DevMode: devMode, FeatureTestModeWhatsappSuppressed: featureTestModeWhatsappSuppressed, TestModeWhatsappConfig: testModeWhatsappConfig, @@ -122268,27 +122191,12 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { Sender: sender, Translation: translationService, } - rawCommands := &user.RawCommands{ - Store: userStore, - Clock: clockClock, - } - userCommands := &user.Commands{ - RawCommands: rawCommands, - RawQueries: rawQueries, - Events: eventService, - Verification: verificationService, - UserProfileConfig: userProfileConfig, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, - } stdattrsService := &stdattrs2.Service{ UserProfileConfig: userProfileConfig, ServiceNoEvent: serviceNoEvent, Identities: serviceService, UserQueries: rawQueries, - UserStore: userStore, + UserStore: store, Events: eventService, } authorizationStore := &pq.AuthorizationStore{ @@ -122297,21 +122205,32 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, } sessionConfig := appConfig.Session - cookieDef2 := session.NewSessionCookieDef(sessionConfig) + cookieDef := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, Config: sessionConfig, Cookies: cookieManager, - CookieDef: cookieDef2, + CookieDef: cookieDef, + } + redisLogger := redis.NewLogger(factory) + redisStore := &redis.Store{ + Context: contextContext, + Redis: handle, + AppID: appID, + Logger: redisLogger, + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, } + oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -122323,7 +122242,7 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: appredisHandle, + Redis: handle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -122331,15 +122250,19 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, Random: idpsessionRand, } + oauthclientResolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } offlineGrantService := oauth2.OfflineGrantService{ OAuthConfig: oAuthConfig, Clock: clockClock, IDPSessions: idpsessionProvider, - ClientResolver: resolver, - OfflineGrants: store, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, } sessionManager := &oauth2.SessionManager{ - Store: store, + Store: redisStore, Config: oAuthConfig, Service: offlineGrantService, } @@ -122378,43 +122301,31 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { identityFacade := facade.IdentityFacade{ Coordinator: coordinator, } - authenticatorFacade := facade.AuthenticatorFacade{ - Coordinator: coordinator, - } anonymousStoreRedis := &anonymous.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } + authenticatorFacade := facade.AuthenticatorFacade{ + Coordinator: coordinator, + } + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, + } + customattrsService := &customattrs.Service{ + Config: userProfileConfig, + ServiceNoEvent: customattrsServiceNoEvent, + Events: eventService, + } messageSender := &otp.MessageSender{ Translation: translationService, Endpoints: endpointsEndpoints, Sender: sender, WhatsappService: whatsappService, } - oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) - oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) - simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ - Context: contextContext, - AppID: appID, - Redis: appredisHandle, - } - oAuthProviderFactory := &sso.OAuthProviderFactory{ - IdentityConfig: identityConfig, - Credentials: oAuthSSOProviderCredentials, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, - HTTPClient: oAuthHTTPClient, - SimpleStoreRedisFactory: simpleStoreRedisFactory, - } - webappoauthStore := &webappoauth.Store{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, - } - mfaFacade := &facade.MFAFacade{ - Coordinator: coordinator, + workflowVerificationFacade := facade.WorkflowVerificationFacade{ + Verification: verificationService, } forgotpasswordLogger := forgotpassword.NewLogger(factory) sender2 := forgotpassword.Sender{ @@ -122433,104 +122344,235 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { OTPSender: messageSender, PasswordSender: sender2, } - responseWriter := p.ResponseWriter - nonceService := &nonce.Service{ - Cookies: cookieManager, - Request: request, - ResponseWriter: responseWriter, + accountMigrationConfig := appConfig.AccountMigration + accountMigrationHookConfig := accountMigrationConfig.Hook + hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) + denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) + accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ + DenoHook: denoHook, + Client: hookDenoClient, + Logger: denoMiddlewareLogger, + } + hookWebHookImpl := &hook.WebHookImpl{ + Logger: webHookLogger, + Secret: webhookKeyMaterials, + } + hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) + webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) + accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ + WebHook: hookWebHookImpl, + Client: hookHTTPClient, + Logger: webhookMiddlewareLogger, + } + accountmigrationService := &accountmigration.Service{ + Config: accountMigrationHookConfig, + DenoHook: accountMigrationDenoHook, + WebHook: accountMigrationWebHook, } challengeProvider := &challenge.Provider{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } - userProvider := &user.Provider{ - Commands: userCommands, - Queries: userQueries, + captchaConfig := appConfig.Captcha + providerLogger := captcha.NewProviderLogger(factory) + deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) + cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) + captchaProvider := &captcha.Provider{ + RemoteIP: remoteIP, + Config: captchaConfig, + Logger: providerLogger, + CloudflareClient: cloudflareClient, } - authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + botProtectionConfig := appConfig.BotProtection + botprotectionProviderLogger := botprotection.NewProviderLogger(factory) + botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) + botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) + recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) + botprotectionProvider := &botprotection.Provider{ + RemoteIP: remoteIP, + Config: botProtectionConfig, + Logger: botprotectionProviderLogger, + CloudflareClient: botprotectionCloudflareClient, + RecaptchaV2Client: recaptchaV2Client, + Events: eventService, + } + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ Context: contextContext, - Redis: appredisHandle, AppID: appID, + Redis: handle, + } + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + requestOptionsService := &passkey2.RequestOptionsService{ + ConfigService: configService, + IdentityService: serviceService, + Store: store2, + } + creationOptionsService := &passkey2.CreationOptionsService{ + ConfigService: configService, + UserService: userQueries, + IdentityService: serviceService, + Store: store2, + } + ldapConfig := identityConfig.LDAP + ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) + clientFactory := &ldap2.ClientFactory{ + Config: ldapConfig, + SecretConfig: ldapServerUserCredentials, } manager2 := &session.Manager{ IDPSessions: idpsessionManager, AccessTokenSessions: sessionManager, Events: eventService, } - oauthsessionStoreRedis := &oauthsession.StoreRedis{ + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } - interactionContext := &interaction.Context{ - Request: request, - RemoteIP: remoteIP, - Database: sqlExecutor, - Clock: clockClock, + mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + idTokenIssuer := &oidc.IDTokenIssuer{ + Secrets: oAuthKeyMaterials, + BaseURL: endpointsEndpoints, + Users: userQueries, + RolesAndGroups: queries, + Clock: clockClock, + } + dependencies := &authenticationflow.Dependencies{ Config: appConfig, FeatureConfig: featureConfig, - OAuthClientResolver: resolver, - OfflineGrants: store, + Clock: clockClock, + RemoteIP: remoteIP, + HTTPOrigin: httpOrigin, + HTTPRequest: request, + Users: userProvider, Identities: identityFacade, - Authenticators: authenticatorFacade, AnonymousIdentities: anonymousProvider, AnonymousUserPromotionCodeStore: anonymousStoreRedis, - BiometricIdentities: biometricProvider, - OTPCodeService: otpService, - OTPSender: messageSender, - OAuthProviderFactory: oAuthProviderFactory, - OAuthRedirectURIBuilder: endpointsEndpoints, - OAuthStateStore: webappoauthStore, + Authenticators: authenticatorFacade, MFA: mfaFacade, + StdAttrsService: stdattrsService, + CustomAttrsService: customattrsService, + OTPCodes: otpService, + OTPSender: messageSender, + Verification: workflowVerificationFacade, ForgotPassword: forgotpasswordService, ResetPassword: forgotpasswordService, - Passkey: passkeyService, - Verification: verificationService, - RateLimiter: limiter, - PasswordGenerator: generator, - Nonces: nonceService, + AccountMigrations: accountmigrationService, Challenges: challengeProvider, - Users: userProvider, - StdAttrsService: stdattrsService, + Captcha: captchaProvider, + BotProtection: botprotectionProvider, + OAuthProviderFactory: oAuthProviderFactory, + PasskeyRequestOptionsService: requestOptionsService, + PasskeyCreationOptionsService: creationOptionsService, + PasskeyService: passkeyService, + LoginIDs: provider, + LDAP: ldapProvider, + LDAPClientFactory: clientFactory, + IDPSessions: idpsessionProvider, + Sessions: manager2, + AuthenticationInfos: authenticationinfoStoreRedis, + SessionCookie: cookieDef, + MFADeviceTokenCookie: mfaCookieDef, + Cookies: cookieManager, Events: eventService, - CookieManager: cookieManager, - AuthenticationInfoService: authenticationinfoStoreRedis, - Sessions: idpsessionProvider, - SessionManager: manager2, - SessionCookie: cookieDef2, - OAuthSessions: oauthsessionStoreRedis, - MFADeviceTokenCookie: cookieDef, + RateLimiter: limiter, + OfflineGrants: redisStore, + IDTokens: idTokenIssuer, } - interactionStoreRedis := &interaction.StoreRedis{ - Redis: appredisHandle, - AppID: appID, + authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) + authenticationflowStoreImpl := &authenticationflow.StoreImpl{ + Redis: handle, + AppID: appID, + Context: contextContext, } - interactionService := &interaction.Service{ - Logger: logger, - Context: interactionContext, - Store: interactionStoreRedis, + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, } - webappService2 := &webapp2.Service2{ - Logger: serviceLogger, - Request: request, - Sessions: sessionStoreRedis, - SessionCookie: sessionCookieDef, - SignedUpCookie: signedUpCookieDef, - MFADeviceTokenCookie: cookieDef, - ErrorService: errorService, - Cookies: cookieManager, - OAuthConfig: oAuthConfig, - UIConfig: uiConfig, - TrustProxy: trustProxy, - UIInfoResolver: uiService, - OAuthClientResolver: resolver, - Graph: interactionService, + authenticationflowService := &authenticationflow.Service{ + ContextDoNotUseDirectly: contextContext, + Deps: dependencies, + Logger: authenticationflowServiceLogger, + Store: authenticationflowStoreImpl, + Database: appdbHandle, + UIConfig: uiConfig, + UIInfoResolver: uiService, + OAuthClientResolver: oauthclientResolver, + } + oauthsessionStoreRedis := &oauthsession.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + samlsessionStoreRedis := &samlsession.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + promptResolver := &oauth2.PromptResolver{ + Clock: clockClock, + } + oauthOfflineGrantService := &oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, + } + idTokenHintResolver := &oidc.IDTokenHintResolver{ + Issuer: idTokenIssuer, + Sessions: idpsessionProvider, + OfflineGrantService: oauthOfflineGrantService, + } + uiInfoResolver := &oidc.UIInfoResolver{ + Config: oAuthConfig, + EndpointsProvider: endpointsEndpoints, + PromptResolver: promptResolver, + IDTokenHintResolver: idTokenHintResolver, + Clock: clockClock, + Cookies: cookieManager, + ClientResolver: oauthclientResolver, + } + webappoauthStore := &webappoauth.Store{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + Endpoints: endpointsEndpoints, + OAuthStateStore: webappoauthStore, + } + authflowController := &webapp.AuthflowController{ + Logger: authflowControllerLogger, + TesterEndpointsProvider: endpointsEndpoints, + ErrorService: errorService, + TrustProxy: trustProxy, + Clock: clockClock, + Cookies: cookieManager, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, + SignedUpCookie: signedUpCookieDef, + Authflows: authenticationflowService, + OAuthSessions: oauthsessionStoreRedis, + SAMLSessions: samlsessionStoreRedis, + UIInfoResolver: uiInfoResolver, + UIConfig: uiConfig, + OAuthClientResolver: oauthclientResolver, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword googleTagManagerConfig := appConfig.GoogleTagManager - botProtectionConfig := appConfig.BotProtection flashMessage := &httputil.FlashMessage{ Cookies: cookieManager, } @@ -122555,51 +122597,56 @@ func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { SupportedLanguageTags: supportedLanguageTags, AuthUISentryDSN: authUISentryDSN, AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: resolver, + OAuthClientResolver: oauthclientResolver, Logger: baseLogger, } responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - publisher := webapp.NewPublisher(appID, appredisHandle) - controllerDeps := webapp.ControllerDeps{ - Database: handle, - RedisHandle: appredisHandle, - AppID: appID, - Page: webappService2, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - Publisher: publisher, - Clock: clockClock, - UIConfig: uiConfig, - ErrorService: errorService, - TesterEndpointsProvider: endpointsEndpoints, - TrustProxy: trustProxy, - } - controllerFactory := webapp.ControllerFactory{ - LoggerFactory: factory, - ControllerDeps: controllerDeps, - } - reauthHandler := &webapp.ReauthHandler{ - ControllerFactory: controllerFactory, + authflowV2ForgotPasswordLinkSentHandler := &authflowv2.AuthflowV2ForgotPasswordLinkSentHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Clock: clockClock, } - return reauthHandler + return authflowV2ForgotPasswordLinkSentHandler } -func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { +func newWebAppReauthHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory - authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) + handle := appProvider.AppDatabase + appredisHandle := appProvider.Redis + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + appID := appConfig.ID + serviceLogger := webapp2.NewServiceLogger(factory) request := p.Request + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: appredisHandle, + } + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() + authenticationConfig := appConfig.Authentication + cookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig trustProxy := environmentConfig.TrustProxy + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: appredisHandle, + Cookies: cookieManager, + } + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI httpHost := deps.ProvideHTTPHost(request, trustProxy) httpProto := deps.ProvideHTTPProto(request, trustProxy) - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - uiConfig := appConfig.UI globalUIImplementation := environmentConfig.UIImplementation globalUISettingsImplementation := environmentConfig.UISettingsImplementation uiImplementationService := &web.UIImplementationService{ @@ -122612,52 +122659,46 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { HTTPProto: httpProto, UIImplementationService: uiImplementationService, } - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, } - clockClock := _wireSystemClockValue - sessionStoreRedis := &webapp2.SessionStoreRedis{ - AppID: appID, - Redis: handle, + resolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, } - sessionCookieDef := webapp2.NewSessionCookieDef() - signedUpCookieDef := webapp2.NewSignedUpCookieDef() + logger := interaction.NewLogger(factory) + remoteIP := deps.ProvideRemoteIP(request, trustProxy) contextContext := deps.ProvideRequestContext(request) + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + clockClock := _wireSystemClockValue featureConfig := config.FeatureConfig - remoteIP := deps.ProvideRemoteIP(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + redisLogger := redis.NewLogger(factory) secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - appdbHandle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) - store := &user.Store{ + store := &redis.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Logger: redisLogger, SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, - AppID: appID, - } - rawCommands := &user.RawCommands{ - Store: store, - Clock: clockClock, - } - rawQueries := &user.RawQueries{ - Store: store, } userAgentString := deps.ProvideUserAgentString(request) - logger := event.NewLogger(factory) + eventLogger := event.NewLogger(factory) localizationConfig := appConfig.Localization sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) - authenticationConfig := appConfig.Authentication + userStore := &user.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + AppID: appID, + } + rawQueries := &user.RawQueries{ + Store: userStore, + } identityConfig := appConfig.Identity identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ @@ -122721,19 +122762,20 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { } store2 := &passkey2.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ + templateResolver := &template.Resolver{ Resources: manager, DefaultLanguageTag: defaultLanguageTag, SupportedLanguageTags: supportedLanguageTags, } engine := &template.Engine{ - Resolver: resolver, + Resolver: templateResolver, } + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -122771,14 +122813,14 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -122893,17 +122935,17 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -122929,7 +122971,7 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -122973,14 +123015,14 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { UserProfileConfig: userProfileConfig, Identities: serviceService, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, ClaimStore: storePQ, Transformer: pictureTransformer, } customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ Config: userProfileConfig, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, } nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint web3Service := &web3.Service{ @@ -122997,7 +123039,7 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { } userQueries := &user.Queries{ RawQueries: rawQueries, - Store: store, + Store: userStore, Identities: serviceService, Authenticators: service3, Verification: verificationService, @@ -123070,16 +123112,16 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) client := elasticsearch.NewClient(elasticsearchCredentials) queue := appProvider.TaskQueue - userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) + userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) elasticsearchService := elasticsearch.Service{ Clock: clockClock, Context: contextContext, - Database: appdbHandle, + Database: handle, Logger: elasticsearchServiceLogger, AppID: appID, Client: client, Users: userQueries, - UserStore: store, + UserStore: userStore, IdentityService: serviceService, RolesGroups: rolesgroupsStore, TaskQueue: queue, @@ -123088,26 +123130,11 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { elasticsearchSink := &elasticsearch.Sink{ Logger: elasticsearchLogger, Service: elasticsearchService, - Database: appdbHandle, - } - eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) - userCommands := &user.Commands{ - RawCommands: rawCommands, - RawQueries: rawQueries, - Events: eventService, - Verification: verificationService, - UserProfileConfig: userProfileConfig, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, - } - userProvider := &user.Provider{ - Commands: userCommands, - Queries: userQueries, + Database: handle, } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -123135,7 +123162,7 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { Logger: usageLogger, Clock: clockClock, AppID: appID, - Redis: handle, + Redis: appredisHandle, } messagingConfig := appConfig.Messaging messagingRateLimitsConfig := messagingConfig.RateLimits @@ -123150,21 +123177,21 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { FeatureConfig: messagingFeatureConfig, EnvConfig: rateLimitsEnvironmentConfig, } - serviceLogger := whatsapp.NewServiceLogger(factory) + whatsappServiceLogger := whatsapp.NewServiceLogger(factory) devMode := environmentConfig.DevMode featureTestModeWhatsappSuppressed := deps.ProvideTestModeWhatsappSuppressed(testModeFeatureConfig) testModeWhatsappConfig := testModeConfig.Whatsapp whatsappConfig := messagingConfig.Whatsapp whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) tokenStore := &whatsapp.TokenStore{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } onPremisesClient := whatsapp.NewWhatsappOnPremisesClient(whatsappConfig, whatsappOnPremisesCredentials, tokenStore) whatsappService := &whatsapp.Service{ Context: contextContext, - Logger: serviceLogger, + Logger: whatsappServiceLogger, DevMode: devMode, FeatureTestModeWhatsappSuppressed: featureTestModeWhatsappSuppressed, TestModeWhatsappConfig: testModeWhatsappConfig, @@ -123186,12 +123213,27 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { Sender: sender, Translation: translationService, } + rawCommands := &user.RawCommands{ + Store: userStore, + Clock: clockClock, + } + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } stdattrsService := &stdattrs2.Service{ UserProfileConfig: userProfileConfig, ServiceNoEvent: serviceNoEvent, Identities: serviceService, UserQueries: rawQueries, - UserStore: store, + UserStore: userStore, Events: eventService, } authorizationStore := &pq.AuthorizationStore{ @@ -123200,32 +123242,21 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { } storeRedisLogger := idpsession.NewStoreRedisLogger(factory) idpsessionStoreRedis := &idpsession.StoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, Logger: storeRedisLogger, } sessionConfig := appConfig.Session - cookieDef := session.NewSessionCookieDef(sessionConfig) + cookieDef2 := session.NewSessionCookieDef(sessionConfig) idpsessionManager := &idpsession.Manager{ Store: idpsessionStoreRedis, Config: sessionConfig, Cookies: cookieManager, - CookieDef: cookieDef, - } - redisLogger := redis.NewLogger(factory) - redisStore := &redis.Store{ - Context: contextContext, - Redis: handle, - AppID: appID, - Logger: redisLogger, - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, + CookieDef: cookieDef2, } - oAuthConfig := appConfig.OAuth eventStoreRedis := &access.EventStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, } eventProvider := &access.EventProvider{ @@ -123237,7 +123268,7 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { RemoteIP: remoteIP, UserAgentString: userAgentString, AppID: appID, - Redis: handle, + Redis: appredisHandle, Store: idpsessionStoreRedis, AccessEvents: eventProvider, TrustProxy: trustProxy, @@ -123245,19 +123276,15 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { Clock: clockClock, Random: idpsessionRand, } - oauthclientResolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, - } offlineGrantService := oauth2.OfflineGrantService{ OAuthConfig: oAuthConfig, Clock: clockClock, IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, + ClientResolver: resolver, + OfflineGrants: store, } sessionManager := &oauth2.SessionManager{ - Store: redisStore, + Store: store, Config: oAuthConfig, Service: offlineGrantService, } @@ -123296,31 +123323,43 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { identityFacade := facade.IdentityFacade{ Coordinator: coordinator, } + authenticatorFacade := facade.AuthenticatorFacade{ + Coordinator: coordinator, + } anonymousStoreRedis := &anonymous.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } - authenticatorFacade := facade.AuthenticatorFacade{ - Coordinator: coordinator, - } - mfaFacade := &facade.MFAFacade{ - Coordinator: coordinator, - } - customattrsService := &customattrs.Service{ - Config: userProfileConfig, - ServiceNoEvent: customattrsServiceNoEvent, - Events: eventService, - } messageSender := &otp.MessageSender{ Translation: translationService, Endpoints: endpointsEndpoints, Sender: sender, WhatsappService: whatsappService, } - workflowVerificationFacade := facade.WorkflowVerificationFacade{ - Verification: verificationService, + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + Context: contextContext, + AppID: appID, + Redis: appredisHandle, + } + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + webappoauthStore := &webappoauth.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, } forgotpasswordLogger := forgotpassword.NewLogger(factory) sender2 := forgotpassword.Sender{ @@ -123339,240 +123378,160 @@ func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { OTPSender: messageSender, PasswordSender: sender2, } - accountMigrationConfig := appConfig.AccountMigration - accountMigrationHookConfig := accountMigrationConfig.Hook - hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) - denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) - accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ - DenoHook: denoHook, - Client: hookDenoClient, - Logger: denoMiddlewareLogger, - } - hookWebHookImpl := &hook.WebHookImpl{ - Logger: webHookLogger, - Secret: webhookKeyMaterials, - } - hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) - webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) - accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ - WebHook: hookWebHookImpl, - Client: hookHTTPClient, - Logger: webhookMiddlewareLogger, - } - accountmigrationService := &accountmigration.Service{ - Config: accountMigrationHookConfig, - DenoHook: accountMigrationDenoHook, - WebHook: accountMigrationWebHook, + responseWriter := p.ResponseWriter + nonceService := &nonce.Service{ + Cookies: cookieManager, + Request: request, + ResponseWriter: responseWriter, } challengeProvider := &challenge.Provider{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } - captchaConfig := appConfig.Captcha - providerLogger := captcha.NewProviderLogger(factory) - deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) - cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) - captchaProvider := &captcha.Provider{ - RemoteIP: remoteIP, - Config: captchaConfig, - Logger: providerLogger, - CloudflareClient: cloudflareClient, - } - botProtectionConfig := appConfig.BotProtection - botprotectionProviderLogger := botprotection.NewProviderLogger(factory) - botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) - botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) - recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) - botprotectionProvider := &botprotection.Provider{ - RemoteIP: remoteIP, - Config: botProtectionConfig, - Logger: botprotectionProviderLogger, - CloudflareClient: botprotectionCloudflareClient, - RecaptchaV2Client: recaptchaV2Client, - Events: eventService, + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, } - oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) - oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) - simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ Context: contextContext, + Redis: appredisHandle, AppID: appID, - Redis: handle, - } - oAuthProviderFactory := &sso.OAuthProviderFactory{ - IdentityConfig: identityConfig, - Credentials: oAuthSSOProviderCredentials, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, - HTTPClient: oAuthHTTPClient, - SimpleStoreRedisFactory: simpleStoreRedisFactory, - } - requestOptionsService := &passkey2.RequestOptionsService{ - ConfigService: configService, - IdentityService: serviceService, - Store: store2, - } - creationOptionsService := &passkey2.CreationOptionsService{ - ConfigService: configService, - UserService: userQueries, - IdentityService: serviceService, - Store: store2, - } - ldapConfig := identityConfig.LDAP - ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) - clientFactory := &ldap2.ClientFactory{ - Config: ldapConfig, - SecretConfig: ldapServerUserCredentials, } manager2 := &session.Manager{ IDPSessions: idpsessionManager, AccessTokenSessions: sessionManager, Events: eventService, } - authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + oauthsessionStoreRedis := &oauthsession.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } - mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) - idTokenIssuer := &oidc.IDTokenIssuer{ - Secrets: oAuthKeyMaterials, - BaseURL: endpointsEndpoints, - Users: userQueries, - RolesAndGroups: queries, - Clock: clockClock, - } - dependencies := &authenticationflow.Dependencies{ + interactionContext := &interaction.Context{ + Request: request, + RemoteIP: remoteIP, + Database: sqlExecutor, + Clock: clockClock, Config: appConfig, FeatureConfig: featureConfig, - Clock: clockClock, - RemoteIP: remoteIP, - HTTPOrigin: httpOrigin, - HTTPRequest: request, - Users: userProvider, + OAuthClientResolver: resolver, + OfflineGrants: store, Identities: identityFacade, + Authenticators: authenticatorFacade, AnonymousIdentities: anonymousProvider, AnonymousUserPromotionCodeStore: anonymousStoreRedis, - Authenticators: authenticatorFacade, - MFA: mfaFacade, - StdAttrsService: stdattrsService, - CustomAttrsService: customattrsService, - OTPCodes: otpService, + BiometricIdentities: biometricProvider, + OTPCodeService: otpService, OTPSender: messageSender, - Verification: workflowVerificationFacade, + OAuthProviderFactory: oAuthProviderFactory, + OAuthRedirectURIBuilder: endpointsEndpoints, + OAuthStateStore: webappoauthStore, + MFA: mfaFacade, ForgotPassword: forgotpasswordService, ResetPassword: forgotpasswordService, - AccountMigrations: accountmigrationService, + Passkey: passkeyService, + Verification: verificationService, + RateLimiter: limiter, + PasswordGenerator: generator, + Nonces: nonceService, Challenges: challengeProvider, - Captcha: captchaProvider, - BotProtection: botprotectionProvider, - OAuthProviderFactory: oAuthProviderFactory, - PasskeyRequestOptionsService: requestOptionsService, - PasskeyCreationOptionsService: creationOptionsService, - PasskeyService: passkeyService, - LoginIDs: provider, - LDAP: ldapProvider, - LDAPClientFactory: clientFactory, - IDPSessions: idpsessionProvider, - Sessions: manager2, - AuthenticationInfos: authenticationinfoStoreRedis, - SessionCookie: cookieDef, - MFADeviceTokenCookie: mfaCookieDef, - Cookies: cookieManager, + Users: userProvider, + StdAttrsService: stdattrsService, Events: eventService, - RateLimiter: limiter, - OfflineGrants: redisStore, - IDTokens: idTokenIssuer, - } - authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) - authenticationflowStoreImpl := &authenticationflow.StoreImpl{ - Redis: handle, - AppID: appID, - Context: contextContext, - } - uiService := &authenticationinfo.UIService{ - EndpointsProvider: endpointsEndpoints, - } - authenticationflowService := &authenticationflow.Service{ - ContextDoNotUseDirectly: contextContext, - Deps: dependencies, - Logger: authenticationflowServiceLogger, - Store: authenticationflowStoreImpl, - Database: appdbHandle, - UIConfig: uiConfig, - UIInfoResolver: uiService, - OAuthClientResolver: oauthclientResolver, - } - oauthsessionStoreRedis := &oauthsession.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - samlsessionStoreRedis := &samlsession.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, + CookieManager: cookieManager, + AuthenticationInfoService: authenticationinfoStoreRedis, + Sessions: idpsessionProvider, + SessionManager: manager2, + SessionCookie: cookieDef2, + OAuthSessions: oauthsessionStoreRedis, + MFADeviceTokenCookie: cookieDef, } - promptResolver := &oauth2.PromptResolver{ - Clock: clockClock, + interactionStoreRedis := &interaction.StoreRedis{ + Redis: appredisHandle, + AppID: appID, } - oauthOfflineGrantService := &oauth2.OfflineGrantService{ - OAuthConfig: oAuthConfig, - Clock: clockClock, - IDPSessions: idpsessionProvider, - ClientResolver: oauthclientResolver, - OfflineGrants: redisStore, + interactionService := &interaction.Service{ + Logger: logger, + Context: interactionContext, + Store: interactionStoreRedis, } - idTokenHintResolver := &oidc.IDTokenHintResolver{ - Issuer: idTokenIssuer, - Sessions: idpsessionProvider, - OfflineGrantService: oauthOfflineGrantService, + webappService2 := &webapp2.Service2{ + Logger: serviceLogger, + Request: request, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, + SignedUpCookie: signedUpCookieDef, + MFADeviceTokenCookie: cookieDef, + ErrorService: errorService, + Cookies: cookieManager, + OAuthConfig: oAuthConfig, + UIConfig: uiConfig, + TrustProxy: trustProxy, + UIInfoResolver: uiService, + OAuthClientResolver: resolver, + Graph: interactionService, } - uiInfoResolver := &oidc.UIInfoResolver{ - Config: oAuthConfig, - EndpointsProvider: endpointsEndpoints, - PromptResolver: promptResolver, - IDTokenHintResolver: idTokenHintResolver, - Clock: clockClock, - Cookies: cookieManager, - ClientResolver: oauthclientResolver, + uiFeatureConfig := featureConfig.UI + forgotPasswordConfig := appConfig.ForgotPassword + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, } - webappoauthStore := &webappoauth.Store{ - Context: contextContext, - Redis: handle, - AppID: appID, + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: resolver, + Logger: baseLogger, } - authflowNavigator := &webapp2.AuthflowNavigator{ - Endpoints: endpointsEndpoints, - OAuthStateStore: webappoauthStore, + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, } - authflowController := &webapp.AuthflowController{ - Logger: authflowControllerLogger, - TesterEndpointsProvider: endpointsEndpoints, - ErrorService: errorService, - TrustProxy: trustProxy, + publisher := webapp.NewPublisher(appID, appredisHandle) + controllerDeps := webapp.ControllerDeps{ + Database: handle, + RedisHandle: appredisHandle, + AppID: appID, + Page: webappService2, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Publisher: publisher, Clock: clockClock, - Cookies: cookieManager, - Sessions: sessionStoreRedis, - SessionCookie: sessionCookieDef, - SignedUpCookie: signedUpCookieDef, - Authflows: authenticationflowService, - OAuthSessions: oauthsessionStoreRedis, - SAMLSessions: samlsessionStoreRedis, - UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, - OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + ErrorService: errorService, + TesterEndpointsProvider: endpointsEndpoints, + TrustProxy: trustProxy, } - authflowReauthHandler := &webapp.AuthflowReauthHandler{ - Controller: authflowController, - AuthflowNavigator: authflowNavigator, + controllerFactory := webapp.ControllerFactory{ + LoggerFactory: factory, + ControllerDeps: controllerDeps, } - return authflowReauthHandler + reauthHandler := &webapp.ReauthHandler{ + ControllerFactory: controllerFactory, + } + return reauthHandler } -func newWebAppAuthflowV2ReauthHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowReauthHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -124529,7 +124488,7 @@ func newWebAppAuthflowV2ReauthHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -124549,16 +124508,16 @@ func newWebAppAuthflowV2ReauthHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } - authflowV2ReauthHandler := &authflowv2.AuthflowV2ReauthHandler{ + authflowReauthHandler := &webapp.AuthflowReauthHandler{ Controller: authflowController, - AuthflowNavigator: authflowV2Navigator, + AuthflowNavigator: authflowNavigator, } - return authflowV2ReauthHandler + return authflowReauthHandler } -func newWebAppAuthflowResetPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ReauthHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -125515,7 +125474,7 @@ func newWebAppAuthflowResetPasswordHandler(p *deps.RequestProvider) http.Handler Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -125535,50 +125494,16 @@ func newWebAppAuthflowResetPasswordHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, - } - uiFeatureConfig := featureConfig.UI - forgotPasswordConfig := appConfig.ForgotPassword - googleTagManagerConfig := appConfig.GoogleTagManager - flashMessage := &httputil.FlashMessage{ - Cookies: cookieManager, - } - authUISentryDSN := environmentConfig.AuthUISentryDSN - authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins - baseLogger := viewmodels.NewBaseLogger(factory) - baseViewModeler := &viewmodels.BaseViewModeler{ - TrustProxy: trustProxy, - OAuth: oAuthConfig, - AuthUI: uiConfig, - AuthUIFeatureConfig: uiFeatureConfig, - StaticAssets: staticAssetResolver, - ForgotPassword: forgotPasswordConfig, - Authentication: authenticationConfig, - GoogleTagManager: googleTagManagerConfig, - BotProtection: botProtectionConfig, - ErrorService: errorService, - Translations: translationService, - Clock: clockClock, - FlashMessage: flashMessage, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - AuthUISentryDSN: authUISentryDSN, - AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: oauthclientResolver, - Logger: baseLogger, - } - responseRenderer := &webapp.ResponseRenderer{ - TemplateEngine: engine, + Navigator: authflowV2Navigator, } - authflowResetPasswordHandler := &webapp.AuthflowResetPasswordHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2ReauthHandler := &authflowv2.AuthflowV2ReauthHandler{ + Controller: authflowController, + AuthflowNavigator: authflowV2Navigator, } - return authflowResetPasswordHandler + return authflowV2ReauthHandler } -func newWebAppAuthflowV2ResetPasswordHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowResetPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -126535,7 +126460,7 @@ func newWebAppAuthflowV2ResetPasswordHandler(p *deps.RequestProvider) http.Handl Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -126555,7 +126480,7 @@ func newWebAppAuthflowV2ResetPasswordHandler(p *deps.RequestProvider) http.Handl UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -126590,15 +126515,15 @@ func newWebAppAuthflowV2ResetPasswordHandler(p *deps.RequestProvider) http.Handl responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ResetPasswordHandler := &authflowv2.AuthflowV2ResetPasswordHandler{ + authflowResetPasswordHandler := &webapp.AuthflowResetPasswordHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2ResetPasswordHandler + return authflowResetPasswordHandler } -func newWebAppAuthflowResetPasswordSuccessHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ResetPasswordHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -127555,7 +127480,7 @@ func newWebAppAuthflowResetPasswordSuccessHandler(p *deps.RequestProvider) http. Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -127575,7 +127500,7 @@ func newWebAppAuthflowResetPasswordSuccessHandler(p *deps.RequestProvider) http. UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -127610,15 +127535,15 @@ func newWebAppAuthflowResetPasswordSuccessHandler(p *deps.RequestProvider) http. responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowResetPasswordSuccessHandler := &webapp.AuthflowResetPasswordSuccessHandler{ + authflowV2ResetPasswordHandler := &authflowv2.AuthflowV2ResetPasswordHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowResetPasswordSuccessHandler + return authflowV2ResetPasswordHandler } -func newWebAppAuthflowV2ResetPasswordSuccessHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowResetPasswordSuccessHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -128575,7 +128500,7 @@ func newWebAppAuthflowV2ResetPasswordSuccessHandler(p *deps.RequestProvider) htt Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -128595,7 +128520,7 @@ func newWebAppAuthflowV2ResetPasswordSuccessHandler(p *deps.RequestProvider) htt UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -128630,360 +128555,15 @@ func newWebAppAuthflowV2ResetPasswordSuccessHandler(p *deps.RequestProvider) htt responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2ResetPasswordSuccessHandler := &authflowv2.AuthflowV2ResetPasswordSuccessHandler{ + authflowResetPasswordSuccessHandler := &webapp.AuthflowResetPasswordSuccessHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2ResetPasswordSuccessHandler -} - -func newWebAppAuthflowAccountStatusHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - oAuthConfig := appConfig.OAuth - uiConfig := appConfig.UI - featureConfig := config.FeatureConfig - uiFeatureConfig := featureConfig.UI - request := p.Request - contextContext := deps.ProvideRequestContext(request) - localizationConfig := appConfig.Localization - httpProto := deps.ProvideHTTPProto(request, trustProxy) - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) - webAppCDNHost := environmentConfig.WebAppCDNHost - manager := appContext.Resources - globalEmbeddedResourceManager := rootProvider.EmbeddedResources - staticAssetResolver := &web.StaticAssetResolver{ - Context: contextContext, - Localization: localizationConfig, - HTTPOrigin: httpOrigin, - HTTPProto: httpProto, - WebAppCDNHost: webAppCDNHost, - Resources: manager, - EmbeddedResources: globalEmbeddedResourceManager, - } - forgotPasswordConfig := appConfig.ForgotPassword - authenticationConfig := appConfig.Authentication - googleTagManagerConfig := appConfig.GoogleTagManager - botProtectionConfig := appConfig.BotProtection - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, - } - defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) - supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ - Resources: manager, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - } - engine := &template.Engine{ - Resolver: resolver, - } - translationService := &translation.Service{ - Context: contextContext, - TemplateEngine: engine, - StaticAssets: staticAssetResolver, - } - clockClock := _wireSystemClockValue - flashMessage := &httputil.FlashMessage{ - Cookies: cookieManager, - } - authUISentryDSN := environmentConfig.AuthUISentryDSN - authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, - } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, - } - oauthclientResolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, - } - factory := appProvider.LoggerFactory - baseLogger := viewmodels.NewBaseLogger(factory) - baseViewModeler := &viewmodels.BaseViewModeler{ - TrustProxy: trustProxy, - OAuth: oAuthConfig, - AuthUI: uiConfig, - AuthUIFeatureConfig: uiFeatureConfig, - StaticAssets: staticAssetResolver, - ForgotPassword: forgotPasswordConfig, - Authentication: authenticationConfig, - GoogleTagManager: googleTagManagerConfig, - BotProtection: botProtectionConfig, - ErrorService: errorService, - Translations: translationService, - Clock: clockClock, - FlashMessage: flashMessage, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - AuthUISentryDSN: authUISentryDSN, - AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: oauthclientResolver, - Logger: baseLogger, - } - responseRenderer := &webapp.ResponseRenderer{ - TemplateEngine: engine, - } - authflowAccountStatusHandler := &webapp.AuthflowAccountStatusHandler{ - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - } - return authflowAccountStatusHandler -} - -func newWebAppAuthflowV2AccountStatusHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - oAuthConfig := appConfig.OAuth - uiConfig := appConfig.UI - featureConfig := config.FeatureConfig - uiFeatureConfig := featureConfig.UI - request := p.Request - contextContext := deps.ProvideRequestContext(request) - localizationConfig := appConfig.Localization - httpProto := deps.ProvideHTTPProto(request, trustProxy) - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) - webAppCDNHost := environmentConfig.WebAppCDNHost - manager := appContext.Resources - globalEmbeddedResourceManager := rootProvider.EmbeddedResources - staticAssetResolver := &web.StaticAssetResolver{ - Context: contextContext, - Localization: localizationConfig, - HTTPOrigin: httpOrigin, - HTTPProto: httpProto, - WebAppCDNHost: webAppCDNHost, - Resources: manager, - EmbeddedResources: globalEmbeddedResourceManager, - } - forgotPasswordConfig := appConfig.ForgotPassword - authenticationConfig := appConfig.Authentication - googleTagManagerConfig := appConfig.GoogleTagManager - botProtectionConfig := appConfig.BotProtection - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, - } - defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) - supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ - Resources: manager, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - } - engine := &template.Engine{ - Resolver: resolver, - } - translationService := &translation.Service{ - Context: contextContext, - TemplateEngine: engine, - StaticAssets: staticAssetResolver, - } - clockClock := _wireSystemClockValue - flashMessage := &httputil.FlashMessage{ - Cookies: cookieManager, - } - authUISentryDSN := environmentConfig.AuthUISentryDSN - authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, - } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, - } - oauthclientResolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, - } - factory := appProvider.LoggerFactory - baseLogger := viewmodels.NewBaseLogger(factory) - baseViewModeler := &viewmodels.BaseViewModeler{ - TrustProxy: trustProxy, - OAuth: oAuthConfig, - AuthUI: uiConfig, - AuthUIFeatureConfig: uiFeatureConfig, - StaticAssets: staticAssetResolver, - ForgotPassword: forgotPasswordConfig, - Authentication: authenticationConfig, - GoogleTagManager: googleTagManagerConfig, - BotProtection: botProtectionConfig, - ErrorService: errorService, - Translations: translationService, - Clock: clockClock, - FlashMessage: flashMessage, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - AuthUISentryDSN: authUISentryDSN, - AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: oauthclientResolver, - Logger: baseLogger, - } - responseRenderer := &webapp.ResponseRenderer{ - TemplateEngine: engine, - } - authflowV2AccountStatusHandler := &authflowv2.AuthflowV2AccountStatusHandler{ - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - } - return authflowV2AccountStatusHandler -} - -func newWebAppAuthflowNoAuthenticatorHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - oAuthConfig := appConfig.OAuth - uiConfig := appConfig.UI - featureConfig := config.FeatureConfig - uiFeatureConfig := featureConfig.UI - request := p.Request - contextContext := deps.ProvideRequestContext(request) - localizationConfig := appConfig.Localization - httpProto := deps.ProvideHTTPProto(request, trustProxy) - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) - webAppCDNHost := environmentConfig.WebAppCDNHost - manager := appContext.Resources - globalEmbeddedResourceManager := rootProvider.EmbeddedResources - staticAssetResolver := &web.StaticAssetResolver{ - Context: contextContext, - Localization: localizationConfig, - HTTPOrigin: httpOrigin, - HTTPProto: httpProto, - WebAppCDNHost: webAppCDNHost, - Resources: manager, - EmbeddedResources: globalEmbeddedResourceManager, - } - forgotPasswordConfig := appConfig.ForgotPassword - authenticationConfig := appConfig.Authentication - googleTagManagerConfig := appConfig.GoogleTagManager - botProtectionConfig := appConfig.BotProtection - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, - } - defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) - supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ - Resources: manager, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - } - engine := &template.Engine{ - Resolver: resolver, - } - translationService := &translation.Service{ - Context: contextContext, - TemplateEngine: engine, - StaticAssets: staticAssetResolver, - } - clockClock := _wireSystemClockValue - flashMessage := &httputil.FlashMessage{ - Cookies: cookieManager, - } - authUISentryDSN := environmentConfig.AuthUISentryDSN - authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, - } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, - } - oauthclientResolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, - } - factory := appProvider.LoggerFactory - baseLogger := viewmodels.NewBaseLogger(factory) - baseViewModeler := &viewmodels.BaseViewModeler{ - TrustProxy: trustProxy, - OAuth: oAuthConfig, - AuthUI: uiConfig, - AuthUIFeatureConfig: uiFeatureConfig, - StaticAssets: staticAssetResolver, - ForgotPassword: forgotPasswordConfig, - Authentication: authenticationConfig, - GoogleTagManager: googleTagManagerConfig, - BotProtection: botProtectionConfig, - ErrorService: errorService, - Translations: translationService, - Clock: clockClock, - FlashMessage: flashMessage, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - AuthUISentryDSN: authUISentryDSN, - AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: oauthclientResolver, - Logger: baseLogger, - } - responseRenderer := &webapp.ResponseRenderer{ - TemplateEngine: engine, - } - authflowNoAuthenticatorHandler := &webapp.AuthflowNoAuthenticatorHandler{ - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - } - return authflowNoAuthenticatorHandler + return authflowResetPasswordSuccessHandler } -func newWebAppAuthflowFinishFlowHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2ResetPasswordSuccessHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -129940,7 +129520,7 @@ func newWebAppAuthflowFinishFlowHandler(p *deps.RequestProvider) http.Handler { Redis: handle, AppID: appID, } - authflowNavigator := &webapp2.AuthflowNavigator{ + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -129960,7 +129540,7 @@ func newWebAppAuthflowFinishFlowHandler(p *deps.RequestProvider) http.Handler { UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowNavigator, + Navigator: authflowV2Navigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -129995,15 +129575,360 @@ func newWebAppAuthflowFinishFlowHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowFinishFlowHandler := &webapp.AuthflowFinishFlowHandler{ + authflowV2ResetPasswordSuccessHandler := &authflowv2.AuthflowV2ResetPasswordSuccessHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowFinishFlowHandler + return authflowV2ResetPasswordSuccessHandler } -func newWebAppAuthflowV2FinishFlowHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowAccountStatusHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI + featureConfig := config.FeatureConfig + uiFeatureConfig := featureConfig.UI + request := p.Request + contextContext := deps.ProvideRequestContext(request) + localizationConfig := appConfig.Localization + httpProto := deps.ProvideHTTPProto(request, trustProxy) + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + webAppCDNHost := environmentConfig.WebAppCDNHost + manager := appContext.Resources + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, + } + forgotPasswordConfig := appConfig.ForgotPassword + authenticationConfig := appConfig.Authentication + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, + } + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + resolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + } + engine := &template.Engine{ + Resolver: resolver, + } + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, + } + clockClock := _wireSystemClockValue + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, + } + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + oauthclientResolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } + factory := appProvider.LoggerFactory + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: oauthclientResolver, + Logger: baseLogger, + } + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, + } + authflowAccountStatusHandler := &webapp.AuthflowAccountStatusHandler{ + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + } + return authflowAccountStatusHandler +} + +func newWebAppAuthflowV2AccountStatusHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI + featureConfig := config.FeatureConfig + uiFeatureConfig := featureConfig.UI + request := p.Request + contextContext := deps.ProvideRequestContext(request) + localizationConfig := appConfig.Localization + httpProto := deps.ProvideHTTPProto(request, trustProxy) + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + webAppCDNHost := environmentConfig.WebAppCDNHost + manager := appContext.Resources + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, + } + forgotPasswordConfig := appConfig.ForgotPassword + authenticationConfig := appConfig.Authentication + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, + } + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + resolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + } + engine := &template.Engine{ + Resolver: resolver, + } + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, + } + clockClock := _wireSystemClockValue + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, + } + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + oauthclientResolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } + factory := appProvider.LoggerFactory + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: oauthclientResolver, + Logger: baseLogger, + } + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, + } + authflowV2AccountStatusHandler := &authflowv2.AuthflowV2AccountStatusHandler{ + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + } + return authflowV2AccountStatusHandler +} + +func newWebAppAuthflowNoAuthenticatorHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI + featureConfig := config.FeatureConfig + uiFeatureConfig := featureConfig.UI + request := p.Request + contextContext := deps.ProvideRequestContext(request) + localizationConfig := appConfig.Localization + httpProto := deps.ProvideHTTPProto(request, trustProxy) + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + webAppCDNHost := environmentConfig.WebAppCDNHost + manager := appContext.Resources + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, + } + forgotPasswordConfig := appConfig.ForgotPassword + authenticationConfig := appConfig.Authentication + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, + } + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + resolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + } + engine := &template.Engine{ + Resolver: resolver, + } + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, + } + clockClock := _wireSystemClockValue + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, + } + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + oauthclientResolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } + factory := appProvider.LoggerFactory + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: oauthclientResolver, + Logger: baseLogger, + } + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, + } + authflowNoAuthenticatorHandler := &webapp.AuthflowNoAuthenticatorHandler{ + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + } + return authflowNoAuthenticatorHandler +} + +func newWebAppAuthflowFinishFlowHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -130960,7 +130885,7 @@ func newWebAppAuthflowV2FinishFlowHandler(p *deps.RequestProvider) http.Handler Redis: handle, AppID: appID, } - authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + authflowNavigator := &webapp2.AuthflowNavigator{ Endpoints: endpointsEndpoints, OAuthStateStore: webappoauthStore, } @@ -130980,7 +130905,7 @@ func newWebAppAuthflowV2FinishFlowHandler(p *deps.RequestProvider) http.Handler UIInfoResolver: uiInfoResolver, UIConfig: uiConfig, OAuthClientResolver: oauthclientResolver, - Navigator: authflowV2Navigator, + Navigator: authflowNavigator, } uiFeatureConfig := featureConfig.UI forgotPasswordConfig := appConfig.ForgotPassword @@ -131015,15 +130940,15 @@ func newWebAppAuthflowV2FinishFlowHandler(p *deps.RequestProvider) http.Handler responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2FinishFlowHandler := &authflowv2.AuthflowV2FinishFlowHandler{ + authflowFinishFlowHandler := &webapp.AuthflowFinishFlowHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, } - return authflowV2FinishFlowHandler + return authflowFinishFlowHandler } -func newWebAppAuthflowV2AccountLinkingHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2FinishFlowHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -132035,131 +131960,15 @@ func newWebAppAuthflowV2AccountLinkingHandler(p *deps.RequestProvider) http.Hand responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2AccountLinkingHandler := &authflowv2.AuthflowV2AccountLinkingHandler{ + authflowV2FinishFlowHandler := &authflowv2.AuthflowV2FinishFlowHandler{ Controller: authflowController, BaseViewModel: baseViewModeler, Renderer: responseRenderer, - Endpoints: endpointsEndpoints, - } - return authflowV2AccountLinkingHandler -} - -func newWebAppAuthflowV2NoAuthenticatorHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - trustProxy := environmentConfig.TrustProxy - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - oAuthConfig := appConfig.OAuth - uiConfig := appConfig.UI - featureConfig := config.FeatureConfig - uiFeatureConfig := featureConfig.UI - request := p.Request - contextContext := deps.ProvideRequestContext(request) - localizationConfig := appConfig.Localization - httpProto := deps.ProvideHTTPProto(request, trustProxy) - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) - webAppCDNHost := environmentConfig.WebAppCDNHost - manager := appContext.Resources - globalEmbeddedResourceManager := rootProvider.EmbeddedResources - staticAssetResolver := &web.StaticAssetResolver{ - Context: contextContext, - Localization: localizationConfig, - HTTPOrigin: httpOrigin, - HTTPProto: httpProto, - WebAppCDNHost: webAppCDNHost, - Resources: manager, - EmbeddedResources: globalEmbeddedResourceManager, } - forgotPasswordConfig := appConfig.ForgotPassword - authenticationConfig := appConfig.Authentication - googleTagManagerConfig := appConfig.GoogleTagManager - botProtectionConfig := appConfig.BotProtection - appID := appConfig.ID - errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() - handle := appProvider.Redis - httpConfig := appConfig.HTTP - cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) - errorService := &webapp2.ErrorService{ - AppID: appID, - Cookie: errorTokenCookieDef, - RedisHandle: handle, - Cookies: cookieManager, - } - defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) - supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ - Resources: manager, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - } - engine := &template.Engine{ - Resolver: resolver, - } - translationService := &translation.Service{ - Context: contextContext, - TemplateEngine: engine, - StaticAssets: staticAssetResolver, - } - clockClock := _wireSystemClockValue - flashMessage := &httputil.FlashMessage{ - Cookies: cookieManager, - } - authUISentryDSN := environmentConfig.AuthUISentryDSN - authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, - } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, - } - oauthclientResolver := &oauthclient.Resolver{ - OAuthConfig: oAuthConfig, - TesterEndpoints: endpointsEndpoints, - } - factory := appProvider.LoggerFactory - baseLogger := viewmodels.NewBaseLogger(factory) - baseViewModeler := &viewmodels.BaseViewModeler{ - TrustProxy: trustProxy, - OAuth: oAuthConfig, - AuthUI: uiConfig, - AuthUIFeatureConfig: uiFeatureConfig, - StaticAssets: staticAssetResolver, - ForgotPassword: forgotPasswordConfig, - Authentication: authenticationConfig, - GoogleTagManager: googleTagManagerConfig, - BotProtection: botProtectionConfig, - ErrorService: errorService, - Translations: translationService, - Clock: clockClock, - FlashMessage: flashMessage, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, - AuthUISentryDSN: authUISentryDSN, - AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, - OAuthClientResolver: oauthclientResolver, - Logger: baseLogger, - } - responseRenderer := &webapp.ResponseRenderer{ - TemplateEngine: engine, - } - authflowV2NoAuthenticatorHandler := &authflowv2.AuthflowV2NoAuthenticatorHandler{ - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - } - return authflowV2NoAuthenticatorHandler + return authflowV2FinishFlowHandler } -func newWebAppAuthflowV2WechatHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2AccountLinkingHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -133171,16 +132980,131 @@ func newWebAppAuthflowV2WechatHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2WechatHandler := &authflowv2.AuthflowV2WechatHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, - OAuthStateStore: webappoauthStore, + authflowV2AccountLinkingHandler := &authflowv2.AuthflowV2AccountLinkingHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Endpoints: endpointsEndpoints, } - return authflowV2WechatHandler + return authflowV2AccountLinkingHandler } -func newWebAppAuthflowV2LDAPLoginHandler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2NoAuthenticatorHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI + featureConfig := config.FeatureConfig + uiFeatureConfig := featureConfig.UI + request := p.Request + contextContext := deps.ProvideRequestContext(request) + localizationConfig := appConfig.Localization + httpProto := deps.ProvideHTTPProto(request, trustProxy) + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + webAppCDNHost := environmentConfig.WebAppCDNHost + manager := appContext.Resources + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, + } + forgotPasswordConfig := appConfig.ForgotPassword + authenticationConfig := appConfig.Authentication + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, + } + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + resolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + } + engine := &template.Engine{ + Resolver: resolver, + } + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, + } + clockClock := _wireSystemClockValue + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, + } + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + oauthclientResolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } + factory := appProvider.LoggerFactory + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: oauthclientResolver, + Logger: baseLogger, + } + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, + } + authflowV2NoAuthenticatorHandler := &authflowv2.AuthflowV2NoAuthenticatorHandler{ + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + } + return authflowV2NoAuthenticatorHandler +} + +func newWebAppAuthflowV2WechatHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider factory := appProvider.LoggerFactory authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) @@ -134192,31 +134116,28 @@ func newWebAppAuthflowV2LDAPLoginHandler(p *deps.RequestProvider) http.Handler { responseRenderer := &webapp.ResponseRenderer{ TemplateEngine: engine, } - authflowV2LDAPLoginHandler := &authflowv2.AuthflowV2LDAPLoginHandler{ - Controller: authflowController, - BaseViewModel: baseViewModeler, - Renderer: responseRenderer, + authflowV2WechatHandler := &authflowv2.AuthflowV2WechatHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + OAuthStateStore: webappoauthStore, } - return authflowV2LDAPLoginHandler + return authflowV2WechatHandler } -func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { - clockClock := _wireSystemClockValue +func newWebAppAuthflowV2LDAPLoginHandler(p *deps.RequestProvider) http.Handler { appProvider := p.AppProvider - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - appID := appConfig.ID + factory := appProvider.LoggerFactory + authflowControllerLogger := webapp.NewAuthflowControllerLogger(factory) + request := p.Request rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig - samlEnvironmentConfig := environmentConfig.SAML - samlConfig := appConfig.SAML - secretConfig := config.SecretConfig - samlIdpSigningMaterials := deps.ProvideSAMLSAMLIdpSigningMaterials(secretConfig) - request := p.Request trustProxy := environmentConfig.TrustProxy httpHost := deps.ProvideHTTPHost(request, trustProxy) httpProto := deps.ProvideHTTPProto(request, trustProxy) + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig uiConfig := appConfig.UI globalUIImplementation := environmentConfig.UIImplementation globalUISettingsImplementation := environmentConfig.UISettingsImplementation @@ -134230,24 +134151,53 @@ func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { HTTPProto: httpProto, UIImplementationService: uiImplementationService, } - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + appID := appConfig.ID + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + handle := appProvider.Redis + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: handle, + Cookies: cookieManager, + } + clockClock := _wireSystemClockValue + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: handle, + } + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() + contextContext := deps.ProvideRequestContext(request) + featureConfig := config.FeatureConfig + remoteIP := deps.ProvideRemoteIP(request, trustProxy) + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + secretConfig := config.SecretConfig databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - contextContext := deps.ProvideRequestContext(request) - handle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + appdbHandle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) store := &user.Store{ SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, AppID: appID, } + rawCommands := &user.RawCommands{ + Store: store, + Clock: clockClock, + } rawQueries := &user.RawQueries{ Store: store, } + userAgentString := deps.ProvideUserAgentString(request) + logger := event.NewLogger(factory) + localizationConfig := appConfig.Localization + sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) + storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) authenticationConfig := appConfig.Authentication identityConfig := appConfig.Identity - featureConfig := config.FeatureConfig identityFeatureConfig := featureConfig.Identity serviceStore := &service.Store{ SQLBuilder: sqlBuilderApp, @@ -134308,10 +134258,9 @@ func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } - appredisHandle := appProvider.Redis store2 := &passkey2.Store{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) @@ -134324,8 +134273,6 @@ func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { engine := &template.Engine{ Resolver: resolver, } - localizationConfig := appConfig.Localization - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) webAppCDNHost := environmentConfig.WebAppCDNHost globalEmbeddedResourceManager := rootProvider.EmbeddedResources staticAssetResolver := &web.StaticAssetResolver{ @@ -134360,23 +134307,21 @@ func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } - remoteIP := deps.ProvideRemoteIP(request, trustProxy) web3Config := appConfig.Web3 storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } - factory := appProvider.LoggerFactory - logger := ratelimit.NewLogger(factory) + ratelimitLogger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ - Logger: logger, + Logger: ratelimitLogger, Storage: storageRedis, Config: rateLimitsFeatureConfig, } @@ -134487,17 +134432,17 @@ func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: appredisHandle, + Redis: handle, AppID: appID, Clock: clockClock, } @@ -134523,7 +134468,7 @@ func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: appredisHandle, + Redis: handle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -134600,429 +134545,436 @@ func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { Web3: web3Service, RolesAndGroups: queries, } - idTokenIssuer := &oidc.IDTokenIssuer{ - Secrets: oAuthKeyMaterials, - BaseURL: endpointsEndpoints, - Users: userQueries, - RolesAndGroups: queries, - Clock: clockClock, - } - samlService := &saml.Service{ - Clock: clockClock, - AppID: appID, - SAMLEnvironmentConfig: samlEnvironmentConfig, - SAMLConfig: samlConfig, - SAMLIdpSigningMaterials: samlIdpSigningMaterials, - Endpoints: endpointsEndpoints, - UserInfoProvider: idTokenIssuer, + resolverImpl := &event.ResolverImpl{ + Users: userQueries, } - metadataHandler := &saml2.MetadataHandler{ - SAMLService: samlService, + hookLogger := hook.NewLogger(factory) + hookConfig := appConfig.Hook + webHookLogger := hook.NewWebHookLogger(factory) + webhookKeyMaterials := deps.ProvideWebhookKeyMaterials(secretConfig) + webHookImpl := hook.WebHookImpl{ + Logger: webHookLogger, + Secret: webhookKeyMaterials, } - return metadataHandler -} - -func newSAMLLoginHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - factory := appProvider.LoggerFactory - loginHandlerLogger := saml2.NewLoginHandlerLogger(factory) - clockClock := _wireSystemClockValue - appContext := appProvider.AppContext - config := appContext.Config - appConfig := config.AppConfig - samlConfig := appConfig.SAML - appID := appConfig.ID - rootProvider := appProvider.RootProvider - environmentConfig := rootProvider.EnvironmentConfig - samlEnvironmentConfig := environmentConfig.SAML - secretConfig := config.SecretConfig - samlIdpSigningMaterials := deps.ProvideSAMLSAMLIdpSigningMaterials(secretConfig) - request := p.Request - trustProxy := environmentConfig.TrustProxy - httpHost := deps.ProvideHTTPHost(request, trustProxy) - httpProto := deps.ProvideHTTPProto(request, trustProxy) - uiConfig := appConfig.UI - globalUIImplementation := environmentConfig.UIImplementation - globalUISettingsImplementation := environmentConfig.UISettingsImplementation - uiImplementationService := &web.UIImplementationService{ - UIConfig: uiConfig, - GlobalUIImplementation: globalUIImplementation, - GlobalUISettingsImplementation: globalUISettingsImplementation, + syncHTTPClient := hook.NewSyncHTTPClient(hookConfig) + asyncHTTPClient := hook.NewAsyncHTTPClient() + eventWebHookImpl := &hook.EventWebHookImpl{ + WebHookImpl: webHookImpl, + SyncHTTP: syncHTTPClient, + AsyncHTTP: asyncHTTPClient, } - endpointsEndpoints := &endpoints.Endpoints{ - HTTPHost: httpHost, - HTTPProto: httpProto, - UIImplementationService: uiImplementationService, + denoHookLogger := hook.NewDenoHookLogger(factory) + denoHook := hook.DenoHook{ + Context: contextContext, + ResourceManager: manager, + Logger: denoHookLogger, } - oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) - databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) - sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - contextContext := deps.ProvideRequestContext(request) - handle := appProvider.AppDatabase - sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) - store := &user.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, - AppID: appID, + denoEndpoint := environmentConfig.DenoEndpoint + syncDenoClient := hook.NewSyncDenoClient(denoEndpoint, hookConfig, hookLogger) + asyncDenoClient := hook.NewAsyncDenoClient(denoEndpoint, hookLogger) + eventDenoHookImpl := &hook.EventDenoHookImpl{ + DenoHook: denoHook, + SyncDenoClient: syncDenoClient, + AsyncDenoClient: asyncDenoClient, } - rawQueries := &user.RawQueries{ - Store: store, + commands := &rolesgroups.Commands{ + Store: rolesgroupsStore, } - authenticationConfig := appConfig.Authentication - identityConfig := appConfig.Identity - featureConfig := config.FeatureConfig - identityFeatureConfig := featureConfig.Identity - serviceStore := &service.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + sink := &hook.Sink{ + Logger: hookLogger, + Config: hookConfig, + Clock: clockClock, + EventWebHook: eventWebHookImpl, + EventDenoHook: eventDenoHookImpl, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + RolesAndGroups: commands, } - loginidStore := &loginid.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + auditLogger := audit.NewLogger(factory) + writeHandle := appProvider.AuditWriteDatabase + auditDatabaseCredentials := deps.ProvideAuditDatabaseCredentials(secretConfig) + auditdbSQLBuilderApp := auditdb.NewSQLBuilderApp(auditDatabaseCredentials, appID) + writeSQLExecutor := auditdb.NewWriteSQLExecutor(contextContext, writeHandle) + writeStore := &audit.WriteStore{ + SQLBuilder: auditdbSQLBuilderApp, + SQLExecutor: writeSQLExecutor, } - loginIDConfig := identityConfig.LoginID - manager := appContext.Resources - typeCheckerFactory := &loginid.TypeCheckerFactory{ - UIConfig: uiConfig, - LoginIDConfig: loginIDConfig, - Resources: manager, + auditSink := &audit.Sink{ + Logger: auditLogger, + Database: writeHandle, + Store: writeStore, } - checker := &loginid.Checker{ - Config: loginIDConfig, - TypeCheckerFactory: typeCheckerFactory, + elasticsearchLogger := elasticsearch.NewLogger(factory) + elasticsearchServiceLogger := elasticsearch.NewElasticsearchServiceLogger(factory) + elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) + client := elasticsearch.NewClient(elasticsearchCredentials) + queue := appProvider.TaskQueue + userReindexProducer := redisqueue.NewUserReindexProducer(handle, clockClock) + elasticsearchService := elasticsearch.Service{ + Clock: clockClock, + Context: contextContext, + Database: appdbHandle, + Logger: elasticsearchServiceLogger, + AppID: appID, + Client: client, + Users: userQueries, + UserStore: store, + IdentityService: serviceService, + RolesGroups: rolesgroupsStore, + TaskQueue: queue, + Producer: userReindexProducer, } - normalizerFactory := &loginid.NormalizerFactory{ - Config: loginIDConfig, + elasticsearchSink := &elasticsearch.Sink{ + Logger: elasticsearchLogger, + Service: elasticsearchService, + Database: appdbHandle, } - provider := &loginid.Provider{ - Store: loginidStore, - Config: loginIDConfig, - Checker: checker, - NormalizerFactory: normalizerFactory, - Clock: clockClock, + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, logger, appdbHandle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, } - oauthStore := &oauth3.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - IdentityConfig: identityConfig, + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, } - oauthProvider := &oauth3.Provider{ - Store: oauthStore, - Clock: clockClock, - IdentityConfig: identityConfig, + storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ + Redis: handle, + AppID: appID, + Clock: clockClock, } - anonymousStore := &anonymous.Store{ + storeRecoveryCodePQ := &mfa.StoreRecoveryCodePQ{ SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } - anonymousProvider := &anonymous.Provider{ - Store: anonymousStore, - Clock: clockClock, + mfaLockout := mfa.Lockout{ + Config: authenticationLockoutConfig, + RemoteIP: remoteIP, + Provider: lockoutService, } - biometricStore := &biometric.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + mfaService := &mfa.Service{ + IP: remoteIP, + DeviceTokens: storeDeviceTokenRedis, + RecoveryCodes: storeRecoveryCodePQ, + Clock: clockClock, + Config: authenticationConfig, + RateLimiter: limiter, + Lockout: mfaLockout, } - biometricProvider := &biometric.Provider{ - Store: biometricStore, - Clock: clockClock, + messagingLogger := messaging.NewLogger(factory) + usageLogger := usage.NewLogger(factory) + usageLimiter := &usage.Limiter{ + Logger: usageLogger, + Clock: clockClock, + AppID: appID, + Redis: handle, } - passkeyStore := &passkey.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + messagingConfig := appConfig.Messaging + messagingRateLimitsConfig := messagingConfig.RateLimits + messagingFeatureConfig := featureConfig.Messaging + rateLimitsEnvironmentConfig := &environmentConfig.RateLimits + limits := messaging.Limits{ + Logger: messagingLogger, + RateLimiter: limiter, + UsageLimiter: usageLimiter, + RemoteIP: remoteIP, + Config: messagingRateLimitsConfig, + FeatureConfig: messagingFeatureConfig, + EnvConfig: rateLimitsEnvironmentConfig, } - appredisHandle := appProvider.Redis - store2 := &passkey2.Store{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, + serviceLogger := whatsapp.NewServiceLogger(factory) + devMode := environmentConfig.DevMode + featureTestModeWhatsappSuppressed := deps.ProvideTestModeWhatsappSuppressed(testModeFeatureConfig) + testModeWhatsappConfig := testModeConfig.Whatsapp + whatsappConfig := messagingConfig.Whatsapp + whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) + tokenStore := &whatsapp.TokenStore{ + Redis: handle, + AppID: appID, + Clock: clockClock, } - defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) - supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) - resolver := &template.Resolver{ - Resources: manager, - DefaultLanguageTag: defaultLanguageTag, - SupportedLanguageTags: supportedLanguageTags, + onPremisesClient := whatsapp.NewWhatsappOnPremisesClient(whatsappConfig, whatsappOnPremisesCredentials, tokenStore) + whatsappService := &whatsapp.Service{ + Context: contextContext, + Logger: serviceLogger, + DevMode: devMode, + FeatureTestModeWhatsappSuppressed: featureTestModeWhatsappSuppressed, + TestModeWhatsappConfig: testModeWhatsappConfig, + WhatsappConfig: whatsappConfig, + LocalizationConfig: localizationConfig, + OnPremisesClient: onPremisesClient, + TokenStore: tokenStore, } - engine := &template.Engine{ - Resolver: resolver, + sender := &messaging.Sender{ + Limits: limits, + TaskQueue: queue, + Events: eventService, + Whatsapp: whatsappService, + MessagingFeatureConfig: messagingFeatureConfig, } - localizationConfig := appConfig.Localization - httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) - webAppCDNHost := environmentConfig.WebAppCDNHost - globalEmbeddedResourceManager := rootProvider.EmbeddedResources - staticAssetResolver := &web.StaticAssetResolver{ - Context: contextContext, - Localization: localizationConfig, - HTTPOrigin: httpOrigin, - HTTPProto: httpProto, - WebAppCDNHost: webAppCDNHost, - Resources: manager, - EmbeddedResources: globalEmbeddedResourceManager, + forgotpasswordSender := &forgotpassword.Sender{ + AppConfg: appConfig, + Identities: serviceService, + Sender: sender, + Translation: translationService, } - translationService := &translation.Service{ - Context: contextContext, - TemplateEngine: engine, - StaticAssets: staticAssetResolver, + stdattrsService := &stdattrs2.Service{ + UserProfileConfig: userProfileConfig, + ServiceNoEvent: serviceNoEvent, + Identities: serviceService, + UserQueries: rawQueries, + UserStore: store, + Events: eventService, } - configService := &passkey2.ConfigService{ - Request: request, - TrustProxy: trustProxy, - TranslationService: translationService, + authorizationStore := &pq.AuthorizationStore{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, } - passkeyService := &passkey2.Service{ - Store: store2, - ConfigService: configService, + storeRedisLogger := idpsession.NewStoreRedisLogger(factory) + idpsessionStoreRedis := &idpsession.StoreRedis{ + Redis: handle, + AppID: appID, + Clock: clockClock, + Logger: storeRedisLogger, } - passkeyProvider := &passkey.Provider{ - Store: passkeyStore, - Clock: clockClock, - Passkey: passkeyService, + sessionConfig := appConfig.Session + cookieDef := session.NewSessionCookieDef(sessionConfig) + idpsessionManager := &idpsession.Manager{ + Store: idpsessionStoreRedis, + Config: sessionConfig, + Cookies: cookieManager, + CookieDef: cookieDef, } - siweStore := &siwe.Store{ + redisLogger := redis.NewLogger(factory) + redisStore := &redis.Store{ + Context: contextContext, + Redis: handle, + AppID: appID, + Logger: redisLogger, SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, + Clock: clockClock, } - remoteIP := deps.ProvideRemoteIP(request, trustProxy) - web3Config := appConfig.Web3 - storeRedis := &siwe2.StoreRedis{ - Context: contextContext, - Redis: appredisHandle, - AppID: appID, - Clock: clockClock, - } - logger := ratelimit.NewLogger(factory) - storageRedis := &ratelimit.StorageRedis{ + oAuthConfig := appConfig.OAuth + eventStoreRedis := &access.EventStoreRedis{ + Redis: handle, AppID: appID, - Redis: appredisHandle, } - rateLimitsFeatureConfig := featureConfig.RateLimits - limiter := &ratelimit.Limiter{ - Logger: logger, - Storage: storageRedis, - Config: rateLimitsFeatureConfig, + eventProvider := &access.EventProvider{ + Store: eventStoreRedis, } - siweLogger := siwe2.NewLogger(factory) - siweService := &siwe2.Service{ - RemoteIP: remoteIP, - HTTPOrigin: httpOrigin, - Web3Config: web3Config, - AuthenticationConfig: authenticationConfig, - Clock: clockClock, - NonceStore: storeRedis, - RateLimiter: limiter, - Logger: siweLogger, + idpsessionRand := _wireRandValue + idpsessionProvider := &idpsession.Provider{ + Context: contextContext, + RemoteIP: remoteIP, + UserAgentString: userAgentString, + AppID: appID, + Redis: handle, + Store: idpsessionStoreRedis, + AccessEvents: eventProvider, + TrustProxy: trustProxy, + Config: sessionConfig, + Clock: clockClock, + Random: idpsessionRand, } - siweProvider := &siwe.Provider{ - Store: siweStore, - Clock: clockClock, - SIWE: siweService, + oauthclientResolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, } - ldapStore := &ldap.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + offlineGrantService := oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, } - normalizer := &stdattrs.Normalizer{ - LoginIDNormalizerFactory: normalizerFactory, + sessionManager := &oauth2.SessionManager{ + Store: redisStore, + Config: oAuthConfig, + Service: offlineGrantService, } - ldapProvider := &ldap.Provider{ - Store: ldapStore, - Clock: clockClock, - StandardAttributesNormalizer: normalizer, + accountDeletionConfig := appConfig.AccountDeletion + accountAnonymizationConfig := appConfig.AccountAnonymization + maxTrials := _wireMaxTrialsValue + passwordRand := password.NewRandSource() + generator := &password.Generator{ + MaxTrials: maxTrials, + Checker: passwordChecker, + Rand: passwordRand, + PasswordConfig: authenticatorPasswordConfig, } - serviceService := &service.Service{ - Authentication: authenticationConfig, - Identity: identityConfig, - IdentityFeatureConfig: identityFeatureConfig, - Store: serviceStore, - LoginID: provider, - OAuth: oauthProvider, - Anonymous: anonymousProvider, - Biometric: biometricProvider, - Passkey: passkeyProvider, - SIWE: siweProvider, - LDAP: ldapProvider, + coordinator := &facade.Coordinator{ + Events: eventService, + Identities: serviceService, + Authenticators: service3, + Verification: verificationService, + MFA: mfaService, + SendPassword: forgotpasswordSender, + UserCommands: userCommands, + UserQueries: userQueries, + RolesGroupsCommands: commands, + StdAttrsService: stdattrsService, + PasswordHistory: historyStore, + OAuth: authorizationStore, + IDPSessions: idpsessionManager, + OAuthSessions: sessionManager, + IdentityConfig: identityConfig, + AccountDeletionConfig: accountDeletionConfig, + AccountAnonymizationConfig: accountAnonymizationConfig, + AuthenticationConfig: authenticationConfig, + Clock: clockClock, + PasswordGenerator: generator, } - store3 := &service2.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + identityFacade := facade.IdentityFacade{ + Coordinator: coordinator, } - passwordStore := &password.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + anonymousStoreRedis := &anonymous.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + Clock: clockClock, } - authenticatorConfig := appConfig.Authenticator - authenticatorPasswordConfig := authenticatorConfig.Password - passwordLogger := password.NewLogger(factory) - historyStore := &password.HistoryStore{ - Clock: clockClock, - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + authenticatorFacade := facade.AuthenticatorFacade{ + Coordinator: coordinator, } - authenticatorFeatureConfig := featureConfig.Authenticator - passwordChecker := password.ProvideChecker(authenticatorPasswordConfig, authenticatorFeatureConfig, historyStore) - expiry := password.ProvideExpiry(authenticatorPasswordConfig, clockClock) - housekeeperLogger := password.NewHousekeeperLogger(factory) - housekeeper := &password.Housekeeper{ - Store: historyStore, - Logger: housekeeperLogger, - Config: authenticatorPasswordConfig, + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, } - passwordProvider := &password.Provider{ - Store: passwordStore, - Config: authenticatorPasswordConfig, - Clock: clockClock, - Logger: passwordLogger, - PasswordHistory: historyStore, - PasswordChecker: passwordChecker, - Expiry: expiry, - Housekeeper: housekeeper, + customattrsService := &customattrs.Service{ + Config: userProfileConfig, + ServiceNoEvent: customattrsServiceNoEvent, + Events: eventService, } - store4 := &passkey3.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + messageSender := &otp.MessageSender{ + Translation: translationService, + Endpoints: endpointsEndpoints, + Sender: sender, + WhatsappService: whatsappService, } - provider2 := &passkey3.Provider{ - Store: store4, - Clock: clockClock, - Passkey: passkeyService, + workflowVerificationFacade := facade.WorkflowVerificationFacade{ + Verification: verificationService, } - totpStore := &totp.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + forgotpasswordLogger := forgotpassword.NewLogger(factory) + sender2 := forgotpassword.Sender{ + AppConfg: appConfig, + Identities: serviceService, + Sender: sender, + Translation: translationService, } - authenticatorTOTPConfig := authenticatorConfig.TOTP - totpProvider := &totp.Provider{ - Store: totpStore, - Config: authenticatorTOTPConfig, - Clock: clockClock, + forgotpasswordService := &forgotpassword.Service{ + Logger: forgotpasswordLogger, + Config: appConfig, + FeatureConfig: featureConfig, + Identities: serviceService, + Authenticators: authenticatorFacade, + OTPCodes: otpService, + OTPSender: messageSender, + PasswordSender: sender2, } - oobStore := &oob.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + accountMigrationConfig := appConfig.AccountMigration + accountMigrationHookConfig := accountMigrationConfig.Hook + hookDenoClient := accountmigration.NewHookDenoClient(denoEndpoint, hookLogger, accountMigrationHookConfig) + denoMiddlewareLogger := accountmigration.NewDenoMiddlewareLogger(factory) + accountMigrationDenoHook := &accountmigration.AccountMigrationDenoHook{ + DenoHook: denoHook, + Client: hookDenoClient, + Logger: denoMiddlewareLogger, } - oobProvider := &oob.Provider{ - Store: oobStore, - LoginIDNormalizerFactory: normalizerFactory, - Clock: clockClock, + hookWebHookImpl := &hook.WebHookImpl{ + Logger: webHookLogger, + Secret: webhookKeyMaterials, } - testModeConfig := appConfig.TestMode - testModeFeatureConfig := featureConfig.TestMode - codeStoreRedis := &otp.CodeStoreRedis{ - Redis: appredisHandle, - AppID: appID, - Clock: clockClock, + hookHTTPClient := accountmigration.NewHookHTTPClient(accountMigrationHookConfig) + webhookMiddlewareLogger := accountmigration.NewWebhookMiddlewareLogger(factory) + accountMigrationWebHook := &accountmigration.AccountMigrationWebHook{ + WebHook: hookWebHookImpl, + Client: hookHTTPClient, + Logger: webhookMiddlewareLogger, } - lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: appredisHandle, - AppID: appID, - Clock: clockClock, + accountmigrationService := &accountmigration.Service{ + Config: accountMigrationHookConfig, + DenoHook: accountMigrationDenoHook, + WebHook: accountMigrationWebHook, } - attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: appredisHandle, + challengeProvider := &challenge.Provider{ + Redis: handle, AppID: appID, Clock: clockClock, } - otpLogger := otp.NewLogger(factory) - otpService := &otp.Service{ - Clock: clockClock, - AppID: appID, - TestModeConfig: testModeConfig, - TestModeFeatureConfig: testModeFeatureConfig, - RemoteIP: remoteIP, - CodeStore: codeStoreRedis, - LookupStore: lookupStoreRedis, - AttemptTracker: attemptTrackerRedis, - Logger: otpLogger, - RateLimiter: limiter, - } - rateLimits := service2.RateLimits{ - IP: remoteIP, - Config: authenticationConfig, - RateLimiter: limiter, - } - authenticationLockoutConfig := authenticationConfig.Lockout - lockoutLogger := lockout.NewLogger(factory) - lockoutStorageRedis := &lockout.StorageRedis{ - AppID: appID, - Redis: appredisHandle, - } - lockoutService := &lockout.Service{ - Logger: lockoutLogger, - Storage: lockoutStorageRedis, - } - serviceLockout := service2.Lockout{ - Config: authenticationLockoutConfig, - RemoteIP: remoteIP, - Provider: lockoutService, - } - service3 := &service2.Service{ - Store: store3, - Config: appConfig, - Password: passwordProvider, - Passkey: provider2, - TOTP: totpProvider, - OOBOTP: oobProvider, - OTPCodeService: otpService, - RateLimits: rateLimits, - Lockout: serviceLockout, - } - verificationConfig := appConfig.Verification - userProfileConfig := appConfig.UserProfile - storePQ := &verification.StorePQ{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, + captchaConfig := appConfig.Captcha + providerLogger := captcha.NewProviderLogger(factory) + deprecated_CaptchaCloudflareCredentials := deps.ProvideCaptchaCloudflareCredentials(secretConfig) + cloudflareClient := captcha2.NewCloudflareClient(deprecated_CaptchaCloudflareCredentials) + captchaProvider := &captcha.Provider{ + RemoteIP: remoteIP, + Config: captchaConfig, + Logger: providerLogger, + CloudflareClient: cloudflareClient, } - verificationService := &verification.Service{ - Config: verificationConfig, - UserProfileConfig: userProfileConfig, - Clock: clockClock, - ClaimStore: storePQ, + botProtectionConfig := appConfig.BotProtection + botprotectionProviderLogger := botprotection.NewProviderLogger(factory) + botProtectionProviderCredentials := deps.ProvideBotProtectionProvidersCredentials(secretConfig) + botprotectionCloudflareClient := botprotection.NewCloudflareClient(botProtectionProviderCredentials, environmentConfig) + recaptchaV2Client := botprotection.NewRecaptchaV2Client(botProtectionProviderCredentials, environmentConfig) + botprotectionProvider := &botprotection.Provider{ + RemoteIP: remoteIP, + Config: botProtectionConfig, + Logger: botprotectionProviderLogger, + CloudflareClient: botprotectionCloudflareClient, + RecaptchaV2Client: recaptchaV2Client, + Events: eventService, } - imagesCDNHost := environmentConfig.ImagesCDNHost - pictureTransformer := &stdattrs2.PictureTransformer{ - HTTPProto: httpProto, - HTTPHost: httpHost, - ImagesCDNHost: imagesCDNHost, + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + Context: contextContext, + AppID: appID, + Redis: handle, } - serviceNoEvent := &stdattrs2.ServiceNoEvent{ - UserProfileConfig: userProfileConfig, - Identities: serviceService, - UserQueries: rawQueries, - UserStore: store, - ClaimStore: storePQ, - Transformer: pictureTransformer, + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, } - customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ - Config: userProfileConfig, - UserQueries: rawQueries, - UserStore: store, + requestOptionsService := &passkey2.RequestOptionsService{ + ConfigService: configService, + IdentityService: serviceService, + Store: store2, } - nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint - web3Service := &web3.Service{ - APIEndpoint: nftIndexerAPIEndpoint, - Web3Config: web3Config, + creationOptionsService := &passkey2.CreationOptionsService{ + ConfigService: configService, + UserService: userQueries, + IdentityService: serviceService, + Store: store2, } - rolesgroupsStore := &rolesgroups.Store{ - SQLBuilder: sqlBuilderApp, - SQLExecutor: sqlExecutor, - Clock: clockClock, + ldapConfig := identityConfig.LDAP + ldapServerUserCredentials := deps.ProvideLDAPServerUserCredentials(secretConfig) + clientFactory := &ldap2.ClientFactory{ + Config: ldapConfig, + SecretConfig: ldapServerUserCredentials, } - queries := &rolesgroups.Queries{ - Store: rolesgroupsStore, + manager2 := &session.Manager{ + IDPSessions: idpsessionManager, + AccessTokenSessions: sessionManager, + Events: eventService, } - userQueries := &user.Queries{ - RawQueries: rawQueries, - Store: store, - Identities: serviceService, - Authenticators: service3, - Verification: verificationService, - StandardAttributes: serviceNoEvent, - CustomAttributes: customattrsServiceNoEvent, - Web3: web3Service, - RolesAndGroups: queries, + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, } + mfaCookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) idTokenIssuer := &oidc.IDTokenIssuer{ Secrets: oAuthKeyMaterials, BaseURL: endpointsEndpoints, @@ -135030,59 +134982,183 @@ func newSAMLLoginHandler(p *deps.RequestProvider) http.Handler { RolesAndGroups: queries, Clock: clockClock, } - samlService := &saml.Service{ - Clock: clockClock, - AppID: appID, - SAMLEnvironmentConfig: samlEnvironmentConfig, - SAMLConfig: samlConfig, - SAMLIdpSigningMaterials: samlIdpSigningMaterials, - Endpoints: endpointsEndpoints, - UserInfoProvider: idTokenIssuer, + dependencies := &authenticationflow.Dependencies{ + Config: appConfig, + FeatureConfig: featureConfig, + Clock: clockClock, + RemoteIP: remoteIP, + HTTPOrigin: httpOrigin, + HTTPRequest: request, + Users: userProvider, + Identities: identityFacade, + AnonymousIdentities: anonymousProvider, + AnonymousUserPromotionCodeStore: anonymousStoreRedis, + Authenticators: authenticatorFacade, + MFA: mfaFacade, + StdAttrsService: stdattrsService, + CustomAttrsService: customattrsService, + OTPCodes: otpService, + OTPSender: messageSender, + Verification: workflowVerificationFacade, + ForgotPassword: forgotpasswordService, + ResetPassword: forgotpasswordService, + AccountMigrations: accountmigrationService, + Challenges: challengeProvider, + Captcha: captchaProvider, + BotProtection: botprotectionProvider, + OAuthProviderFactory: oAuthProviderFactory, + PasskeyRequestOptionsService: requestOptionsService, + PasskeyCreationOptionsService: creationOptionsService, + PasskeyService: passkeyService, + LoginIDs: provider, + LDAP: ldapProvider, + LDAPClientFactory: clientFactory, + IDPSessions: idpsessionProvider, + Sessions: manager2, + AuthenticationInfos: authenticationinfoStoreRedis, + SessionCookie: cookieDef, + MFADeviceTokenCookie: mfaCookieDef, + Cookies: cookieManager, + Events: eventService, + RateLimiter: limiter, + OfflineGrants: redisStore, + IDTokens: idTokenIssuer, + } + authenticationflowServiceLogger := authenticationflow.NewServiceLogger(factory) + authenticationflowStoreImpl := &authenticationflow.StoreImpl{ + Redis: handle, + AppID: appID, + Context: contextContext, + } + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, + } + authenticationflowService := &authenticationflow.Service{ + ContextDoNotUseDirectly: contextContext, + Deps: dependencies, + Logger: authenticationflowServiceLogger, + Store: authenticationflowStoreImpl, + Database: appdbHandle, + UIConfig: uiConfig, + UIInfoResolver: uiService, + OAuthClientResolver: oauthclientResolver, + } + oauthsessionStoreRedis := &oauthsession.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, } samlsessionStoreRedis := &samlsession.StoreRedis{ Context: contextContext, - Redis: appredisHandle, + Redis: handle, AppID: appID, } - uiService := &samlsession.UIService{ - Endpoints: endpointsEndpoints, + promptResolver := &oauth2.PromptResolver{ + Clock: clockClock, } - loginResultHandler := saml2.LoginResultHandler{ - Clock: clockClock, - Database: handle, - SAMLService: samlService, + oauthOfflineGrantService := &oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: oauthclientResolver, + OfflineGrants: redisStore, } - loginHandler := &saml2.LoginHandler{ - Logger: loginHandlerLogger, - Clock: clockClock, - SAMLConfig: samlConfig, - SAMLService: samlService, - SAMLSessionService: samlsessionStoreRedis, - SAMLUIService: uiService, - LoginResultHandler: loginResultHandler, + idTokenHintResolver := &oidc.IDTokenHintResolver{ + Issuer: idTokenIssuer, + Sessions: idpsessionProvider, + OfflineGrantService: oauthOfflineGrantService, } - return loginHandler + uiInfoResolver := &oidc.UIInfoResolver{ + Config: oAuthConfig, + EndpointsProvider: endpointsEndpoints, + PromptResolver: promptResolver, + IDTokenHintResolver: idTokenHintResolver, + Clock: clockClock, + Cookies: cookieManager, + ClientResolver: oauthclientResolver, + } + webappoauthStore := &webappoauth.Store{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + authflowV2Navigator := &authflowv2.AuthflowV2Navigator{ + Endpoints: endpointsEndpoints, + OAuthStateStore: webappoauthStore, + } + authflowController := &webapp.AuthflowController{ + Logger: authflowControllerLogger, + TesterEndpointsProvider: endpointsEndpoints, + ErrorService: errorService, + TrustProxy: trustProxy, + Clock: clockClock, + Cookies: cookieManager, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, + SignedUpCookie: signedUpCookieDef, + Authflows: authenticationflowService, + OAuthSessions: oauthsessionStoreRedis, + SAMLSessions: samlsessionStoreRedis, + UIInfoResolver: uiInfoResolver, + UIConfig: uiConfig, + OAuthClientResolver: oauthclientResolver, + Navigator: authflowV2Navigator, + } + uiFeatureConfig := featureConfig.UI + forgotPasswordConfig := appConfig.ForgotPassword + googleTagManagerConfig := appConfig.GoogleTagManager + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, + } + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: oauthclientResolver, + Logger: baseLogger, + } + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, + } + authflowV2LDAPLoginHandler := &authflowv2.AuthflowV2LDAPLoginHandler{ + Controller: authflowController, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + } + return authflowV2LDAPLoginHandler } -func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { - appProvider := p.AppProvider - factory := appProvider.LoggerFactory - loginFinishHandlerLogger := saml2.NewLoginFinishHandlerLogger(factory) +func newSAMLMetadataHandler(p *deps.RequestProvider) http.Handler { clockClock := _wireSystemClockValue - request := p.Request - contextContext := deps.ProvideRequestContext(request) - handle := appProvider.Redis + appProvider := p.AppProvider appContext := appProvider.AppContext config := appContext.Config appConfig := config.AppConfig appID := appConfig.ID - storeRedis := &samlsession.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - } rootProvider := appProvider.RootProvider environmentConfig := rootProvider.EnvironmentConfig + samlEnvironmentConfig := environmentConfig.SAML + samlConfig := appConfig.SAML + secretConfig := config.SecretConfig + samlIdpSigningMaterials := deps.ProvideSAMLSAMLIdpSigningMaterials(secretConfig) + request := p.Request trustProxy := environmentConfig.TrustProxy httpHost := deps.ProvideHTTPHost(request, trustProxy) httpProto := deps.ProvideHTTPProto(request, trustProxy) @@ -135099,25 +135175,14 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { HTTPProto: httpProto, UIImplementationService: uiImplementationService, } - uiService := &authenticationinfo.UIService{ - EndpointsProvider: endpointsEndpoints, - } - authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ - Context: contextContext, - Redis: handle, - AppID: appID, - } - appdbHandle := appProvider.AppDatabase - samlEnvironmentConfig := environmentConfig.SAML - samlConfig := appConfig.SAML - secretConfig := config.SecretConfig - samlIdpSigningMaterials := deps.ProvideSAMLSAMLIdpSigningMaterials(secretConfig) oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) - sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) - store := &user.Store{ - SQLBuilder: sqlBuilderApp, + contextContext := deps.ProvideRequestContext(request) + handle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + store := &user.Store{ + SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, Clock: clockClock, AppID: appID, @@ -135188,9 +135253,10 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { SQLBuilder: sqlBuilderApp, SQLExecutor: sqlExecutor, } + appredisHandle := appProvider.Redis store2 := &passkey2.Store{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, } defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) @@ -135241,16 +135307,17 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { } remoteIP := deps.ProvideRemoteIP(request, trustProxy) web3Config := appConfig.Web3 - siweStoreRedis := &siwe2.StoreRedis{ + storeRedis := &siwe2.StoreRedis{ Context: contextContext, - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } + factory := appProvider.LoggerFactory logger := ratelimit.NewLogger(factory) storageRedis := &ratelimit.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, } rateLimitsFeatureConfig := featureConfig.RateLimits limiter := &ratelimit.Limiter{ @@ -135265,7 +135332,7 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { Web3Config: web3Config, AuthenticationConfig: authenticationConfig, Clock: clockClock, - NonceStore: siweStoreRedis, + NonceStore: storeRedis, RateLimiter: limiter, Logger: siweLogger, } @@ -135365,17 +135432,17 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { testModeConfig := appConfig.TestMode testModeFeatureConfig := featureConfig.TestMode codeStoreRedis := &otp.CodeStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } lookupStoreRedis := &otp.LookupStoreRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } attemptTrackerRedis := &otp.AttemptTrackerRedis{ - Redis: handle, + Redis: appredisHandle, AppID: appID, Clock: clockClock, } @@ -135401,7 +135468,430 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { lockoutLogger := lockout.NewLogger(factory) lockoutStorageRedis := &lockout.StorageRedis{ AppID: appID, - Redis: handle, + Redis: appredisHandle, + } + lockoutService := &lockout.Service{ + Logger: lockoutLogger, + Storage: lockoutStorageRedis, + } + serviceLockout := service2.Lockout{ + Config: authenticationLockoutConfig, + RemoteIP: remoteIP, + Provider: lockoutService, + } + service3 := &service2.Service{ + Store: store3, + Config: appConfig, + Password: passwordProvider, + Passkey: provider2, + TOTP: totpProvider, + OOBOTP: oobProvider, + OTPCodeService: otpService, + RateLimits: rateLimits, + Lockout: serviceLockout, + } + verificationConfig := appConfig.Verification + userProfileConfig := appConfig.UserProfile + storePQ := &verification.StorePQ{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + verificationService := &verification.Service{ + Config: verificationConfig, + UserProfileConfig: userProfileConfig, + Clock: clockClock, + ClaimStore: storePQ, + } + imagesCDNHost := environmentConfig.ImagesCDNHost + pictureTransformer := &stdattrs2.PictureTransformer{ + HTTPProto: httpProto, + HTTPHost: httpHost, + ImagesCDNHost: imagesCDNHost, + } + serviceNoEvent := &stdattrs2.ServiceNoEvent{ + UserProfileConfig: userProfileConfig, + Identities: serviceService, + UserQueries: rawQueries, + UserStore: store, + ClaimStore: storePQ, + Transformer: pictureTransformer, + } + customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ + Config: userProfileConfig, + UserQueries: rawQueries, + UserStore: store, + } + nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint + web3Service := &web3.Service{ + APIEndpoint: nftIndexerAPIEndpoint, + Web3Config: web3Config, + } + rolesgroupsStore := &rolesgroups.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + } + queries := &rolesgroups.Queries{ + Store: rolesgroupsStore, + } + userQueries := &user.Queries{ + RawQueries: rawQueries, + Store: store, + Identities: serviceService, + Authenticators: service3, + Verification: verificationService, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } + idTokenIssuer := &oidc.IDTokenIssuer{ + Secrets: oAuthKeyMaterials, + BaseURL: endpointsEndpoints, + Users: userQueries, + RolesAndGroups: queries, + Clock: clockClock, + } + samlService := &saml.Service{ + Clock: clockClock, + AppID: appID, + SAMLEnvironmentConfig: samlEnvironmentConfig, + SAMLConfig: samlConfig, + SAMLIdpSigningMaterials: samlIdpSigningMaterials, + Endpoints: endpointsEndpoints, + UserInfoProvider: idTokenIssuer, + } + metadataHandler := &saml2.MetadataHandler{ + SAMLService: samlService, + } + return metadataHandler +} + +func newSAMLLoginHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + factory := appProvider.LoggerFactory + loginHandlerLogger := saml2.NewLoginHandlerLogger(factory) + clockClock := _wireSystemClockValue + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + samlConfig := appConfig.SAML + appID := appConfig.ID + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + samlEnvironmentConfig := environmentConfig.SAML + secretConfig := config.SecretConfig + samlIdpSigningMaterials := deps.ProvideSAMLSAMLIdpSigningMaterials(secretConfig) + request := p.Request + trustProxy := environmentConfig.TrustProxy + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpProto := deps.ProvideHTTPProto(request, trustProxy) + uiConfig := appConfig.UI + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) + sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) + contextContext := deps.ProvideRequestContext(request) + handle := appProvider.AppDatabase + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + store := &user.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + AppID: appID, + } + rawQueries := &user.RawQueries{ + Store: store, + } + authenticationConfig := appConfig.Authentication + identityConfig := appConfig.Identity + featureConfig := config.FeatureConfig + identityFeatureConfig := featureConfig.Identity + serviceStore := &service.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + loginidStore := &loginid.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + loginIDConfig := identityConfig.LoginID + manager := appContext.Resources + typeCheckerFactory := &loginid.TypeCheckerFactory{ + UIConfig: uiConfig, + LoginIDConfig: loginIDConfig, + Resources: manager, + } + checker := &loginid.Checker{ + Config: loginIDConfig, + TypeCheckerFactory: typeCheckerFactory, + } + normalizerFactory := &loginid.NormalizerFactory{ + Config: loginIDConfig, + } + provider := &loginid.Provider{ + Store: loginidStore, + Config: loginIDConfig, + Checker: checker, + NormalizerFactory: normalizerFactory, + Clock: clockClock, + } + oauthStore := &oauth3.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + IdentityConfig: identityConfig, + } + oauthProvider := &oauth3.Provider{ + Store: oauthStore, + Clock: clockClock, + IdentityConfig: identityConfig, + } + anonymousStore := &anonymous.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + anonymousProvider := &anonymous.Provider{ + Store: anonymousStore, + Clock: clockClock, + } + biometricStore := &biometric.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + biometricProvider := &biometric.Provider{ + Store: biometricStore, + Clock: clockClock, + } + passkeyStore := &passkey.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + appredisHandle := appProvider.Redis + store2 := &passkey2.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + resolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + } + engine := &template.Engine{ + Resolver: resolver, + } + localizationConfig := appConfig.Localization + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + webAppCDNHost := environmentConfig.WebAppCDNHost + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, + } + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, + } + configService := &passkey2.ConfigService{ + Request: request, + TrustProxy: trustProxy, + TranslationService: translationService, + } + passkeyService := &passkey2.Service{ + Store: store2, + ConfigService: configService, + } + passkeyProvider := &passkey.Provider{ + Store: passkeyStore, + Clock: clockClock, + Passkey: passkeyService, + } + siweStore := &siwe.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + remoteIP := deps.ProvideRemoteIP(request, trustProxy) + web3Config := appConfig.Web3 + storeRedis := &siwe2.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + logger := ratelimit.NewLogger(factory) + storageRedis := &ratelimit.StorageRedis{ + AppID: appID, + Redis: appredisHandle, + } + rateLimitsFeatureConfig := featureConfig.RateLimits + limiter := &ratelimit.Limiter{ + Logger: logger, + Storage: storageRedis, + Config: rateLimitsFeatureConfig, + } + siweLogger := siwe2.NewLogger(factory) + siweService := &siwe2.Service{ + RemoteIP: remoteIP, + HTTPOrigin: httpOrigin, + Web3Config: web3Config, + AuthenticationConfig: authenticationConfig, + Clock: clockClock, + NonceStore: storeRedis, + RateLimiter: limiter, + Logger: siweLogger, + } + siweProvider := &siwe.Provider{ + Store: siweStore, + Clock: clockClock, + SIWE: siweService, + } + ldapStore := &ldap.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + normalizer := &stdattrs.Normalizer{ + LoginIDNormalizerFactory: normalizerFactory, + } + ldapProvider := &ldap.Provider{ + Store: ldapStore, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + } + serviceService := &service.Service{ + Authentication: authenticationConfig, + Identity: identityConfig, + IdentityFeatureConfig: identityFeatureConfig, + Store: serviceStore, + LoginID: provider, + OAuth: oauthProvider, + Anonymous: anonymousProvider, + Biometric: biometricProvider, + Passkey: passkeyProvider, + SIWE: siweProvider, + LDAP: ldapProvider, + } + store3 := &service2.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + passwordStore := &password.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorConfig := appConfig.Authenticator + authenticatorPasswordConfig := authenticatorConfig.Password + passwordLogger := password.NewLogger(factory) + historyStore := &password.HistoryStore{ + Clock: clockClock, + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorFeatureConfig := featureConfig.Authenticator + passwordChecker := password.ProvideChecker(authenticatorPasswordConfig, authenticatorFeatureConfig, historyStore) + expiry := password.ProvideExpiry(authenticatorPasswordConfig, clockClock) + housekeeperLogger := password.NewHousekeeperLogger(factory) + housekeeper := &password.Housekeeper{ + Store: historyStore, + Logger: housekeeperLogger, + Config: authenticatorPasswordConfig, + } + passwordProvider := &password.Provider{ + Store: passwordStore, + Config: authenticatorPasswordConfig, + Clock: clockClock, + Logger: passwordLogger, + PasswordHistory: historyStore, + PasswordChecker: passwordChecker, + Expiry: expiry, + Housekeeper: housekeeper, + } + store4 := &passkey3.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + provider2 := &passkey3.Provider{ + Store: store4, + Clock: clockClock, + Passkey: passkeyService, + } + totpStore := &totp.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorTOTPConfig := authenticatorConfig.TOTP + totpProvider := &totp.Provider{ + Store: totpStore, + Config: authenticatorTOTPConfig, + Clock: clockClock, + } + oobStore := &oob.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + oobProvider := &oob.Provider{ + Store: oobStore, + LoginIDNormalizerFactory: normalizerFactory, + Clock: clockClock, + } + testModeConfig := appConfig.TestMode + testModeFeatureConfig := featureConfig.TestMode + codeStoreRedis := &otp.CodeStoreRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + lookupStoreRedis := &otp.LookupStoreRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + attemptTrackerRedis := &otp.AttemptTrackerRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + otpLogger := otp.NewLogger(factory) + otpService := &otp.Service{ + Clock: clockClock, + AppID: appID, + TestModeConfig: testModeConfig, + TestModeFeatureConfig: testModeFeatureConfig, + RemoteIP: remoteIP, + CodeStore: codeStoreRedis, + LookupStore: lookupStoreRedis, + AttemptTracker: attemptTrackerRedis, + Logger: otpLogger, + RateLimiter: limiter, + } + rateLimits := service2.RateLimits{ + IP: remoteIP, + Config: authenticationConfig, + RateLimiter: limiter, + } + authenticationLockoutConfig := authenticationConfig.Lockout + lockoutLogger := lockout.NewLogger(factory) + lockoutStorageRedis := &lockout.StorageRedis{ + AppID: appID, + Redis: appredisHandle, } lockoutService := &lockout.Service{ Logger: lockoutLogger, @@ -135494,20 +135984,1407 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { Endpoints: endpointsEndpoints, UserInfoProvider: idTokenIssuer, } + samlsessionStoreRedis := &samlsession.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + uiService := &samlsession.UIService{ + Endpoints: endpointsEndpoints, + } loginResultHandler := saml2.LoginResultHandler{ Clock: clockClock, - Database: appdbHandle, + Database: handle, SAMLService: samlService, } - loginFinishHandler := &saml2.LoginFinishHandler{ - Logger: loginFinishHandlerLogger, - Clock: clockClock, - SAMLSessionService: storeRedis, - AuthenticationInfoResolver: uiService, - AuthenticationInfoService: authenticationinfoStoreRedis, - LoginResultHandler: loginResultHandler, + loginHandler := &saml2.LoginHandler{ + Logger: loginHandlerLogger, + Clock: clockClock, + SAMLConfig: samlConfig, + SAMLService: samlService, + SAMLSessionService: samlsessionStoreRedis, + SAMLUIService: uiService, + LoginResultHandler: loginResultHandler, } - return loginFinishHandler + return loginHandler +} + +func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + factory := appProvider.LoggerFactory + loginFinishHandlerLogger := saml2.NewLoginFinishHandlerLogger(factory) + clockClock := _wireSystemClockValue + request := p.Request + contextContext := deps.ProvideRequestContext(request) + handle := appProvider.Redis + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + appID := appConfig.ID + storeRedis := &samlsession.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpProto := deps.ProvideHTTPProto(request, trustProxy) + uiConfig := appConfig.UI + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, + } + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + appdbHandle := appProvider.AppDatabase + samlEnvironmentConfig := environmentConfig.SAML + samlConfig := appConfig.SAML + secretConfig := config.SecretConfig + samlIdpSigningMaterials := deps.ProvideSAMLSAMLIdpSigningMaterials(secretConfig) + oAuthKeyMaterials := deps.ProvideOAuthKeyMaterials(secretConfig) + databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) + sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) + sqlExecutor := appdb.NewSQLExecutor(contextContext, appdbHandle) + store := &user.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + AppID: appID, + } + rawQueries := &user.RawQueries{ + Store: store, + } + authenticationConfig := appConfig.Authentication + identityConfig := appConfig.Identity + featureConfig := config.FeatureConfig + identityFeatureConfig := featureConfig.Identity + serviceStore := &service.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + loginidStore := &loginid.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + loginIDConfig := identityConfig.LoginID + manager := appContext.Resources + typeCheckerFactory := &loginid.TypeCheckerFactory{ + UIConfig: uiConfig, + LoginIDConfig: loginIDConfig, + Resources: manager, + } + checker := &loginid.Checker{ + Config: loginIDConfig, + TypeCheckerFactory: typeCheckerFactory, + } + normalizerFactory := &loginid.NormalizerFactory{ + Config: loginIDConfig, + } + provider := &loginid.Provider{ + Store: loginidStore, + Config: loginIDConfig, + Checker: checker, + NormalizerFactory: normalizerFactory, + Clock: clockClock, + } + oauthStore := &oauth3.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + IdentityConfig: identityConfig, + } + oauthProvider := &oauth3.Provider{ + Store: oauthStore, + Clock: clockClock, + IdentityConfig: identityConfig, + } + anonymousStore := &anonymous.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + anonymousProvider := &anonymous.Provider{ + Store: anonymousStore, + Clock: clockClock, + } + biometricStore := &biometric.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + biometricProvider := &biometric.Provider{ + Store: biometricStore, + Clock: clockClock, + } + passkeyStore := &passkey.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + store2 := &passkey2.Store{ + Context: contextContext, + Redis: handle, + AppID: appID, + } + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + resolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + } + engine := &template.Engine{ + Resolver: resolver, + } + localizationConfig := appConfig.Localization + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + webAppCDNHost := environmentConfig.WebAppCDNHost + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, + } + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, + } + configService := &passkey2.ConfigService{ + Request: request, + TrustProxy: trustProxy, + TranslationService: translationService, + } + passkeyService := &passkey2.Service{ + Store: store2, + ConfigService: configService, + } + passkeyProvider := &passkey.Provider{ + Store: passkeyStore, + Clock: clockClock, + Passkey: passkeyService, + } + siweStore := &siwe.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + remoteIP := deps.ProvideRemoteIP(request, trustProxy) + web3Config := appConfig.Web3 + siweStoreRedis := &siwe2.StoreRedis{ + Context: contextContext, + Redis: handle, + AppID: appID, + Clock: clockClock, + } + logger := ratelimit.NewLogger(factory) + storageRedis := &ratelimit.StorageRedis{ + AppID: appID, + Redis: handle, + } + rateLimitsFeatureConfig := featureConfig.RateLimits + limiter := &ratelimit.Limiter{ + Logger: logger, + Storage: storageRedis, + Config: rateLimitsFeatureConfig, + } + siweLogger := siwe2.NewLogger(factory) + siweService := &siwe2.Service{ + RemoteIP: remoteIP, + HTTPOrigin: httpOrigin, + Web3Config: web3Config, + AuthenticationConfig: authenticationConfig, + Clock: clockClock, + NonceStore: siweStoreRedis, + RateLimiter: limiter, + Logger: siweLogger, + } + siweProvider := &siwe.Provider{ + Store: siweStore, + Clock: clockClock, + SIWE: siweService, + } + ldapStore := &ldap.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + normalizer := &stdattrs.Normalizer{ + LoginIDNormalizerFactory: normalizerFactory, + } + ldapProvider := &ldap.Provider{ + Store: ldapStore, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + } + serviceService := &service.Service{ + Authentication: authenticationConfig, + Identity: identityConfig, + IdentityFeatureConfig: identityFeatureConfig, + Store: serviceStore, + LoginID: provider, + OAuth: oauthProvider, + Anonymous: anonymousProvider, + Biometric: biometricProvider, + Passkey: passkeyProvider, + SIWE: siweProvider, + LDAP: ldapProvider, + } + store3 := &service2.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + passwordStore := &password.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorConfig := appConfig.Authenticator + authenticatorPasswordConfig := authenticatorConfig.Password + passwordLogger := password.NewLogger(factory) + historyStore := &password.HistoryStore{ + Clock: clockClock, + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorFeatureConfig := featureConfig.Authenticator + passwordChecker := password.ProvideChecker(authenticatorPasswordConfig, authenticatorFeatureConfig, historyStore) + expiry := password.ProvideExpiry(authenticatorPasswordConfig, clockClock) + housekeeperLogger := password.NewHousekeeperLogger(factory) + housekeeper := &password.Housekeeper{ + Store: historyStore, + Logger: housekeeperLogger, + Config: authenticatorPasswordConfig, + } + passwordProvider := &password.Provider{ + Store: passwordStore, + Config: authenticatorPasswordConfig, + Clock: clockClock, + Logger: passwordLogger, + PasswordHistory: historyStore, + PasswordChecker: passwordChecker, + Expiry: expiry, + Housekeeper: housekeeper, + } + store4 := &passkey3.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + provider2 := &passkey3.Provider{ + Store: store4, + Clock: clockClock, + Passkey: passkeyService, + } + totpStore := &totp.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorTOTPConfig := authenticatorConfig.TOTP + totpProvider := &totp.Provider{ + Store: totpStore, + Config: authenticatorTOTPConfig, + Clock: clockClock, + } + oobStore := &oob.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + oobProvider := &oob.Provider{ + Store: oobStore, + LoginIDNormalizerFactory: normalizerFactory, + Clock: clockClock, + } + testModeConfig := appConfig.TestMode + testModeFeatureConfig := featureConfig.TestMode + codeStoreRedis := &otp.CodeStoreRedis{ + Redis: handle, + AppID: appID, + Clock: clockClock, + } + lookupStoreRedis := &otp.LookupStoreRedis{ + Redis: handle, + AppID: appID, + Clock: clockClock, + } + attemptTrackerRedis := &otp.AttemptTrackerRedis{ + Redis: handle, + AppID: appID, + Clock: clockClock, + } + otpLogger := otp.NewLogger(factory) + otpService := &otp.Service{ + Clock: clockClock, + AppID: appID, + TestModeConfig: testModeConfig, + TestModeFeatureConfig: testModeFeatureConfig, + RemoteIP: remoteIP, + CodeStore: codeStoreRedis, + LookupStore: lookupStoreRedis, + AttemptTracker: attemptTrackerRedis, + Logger: otpLogger, + RateLimiter: limiter, + } + rateLimits := service2.RateLimits{ + IP: remoteIP, + Config: authenticationConfig, + RateLimiter: limiter, + } + authenticationLockoutConfig := authenticationConfig.Lockout + lockoutLogger := lockout.NewLogger(factory) + lockoutStorageRedis := &lockout.StorageRedis{ + AppID: appID, + Redis: handle, + } + lockoutService := &lockout.Service{ + Logger: lockoutLogger, + Storage: lockoutStorageRedis, + } + serviceLockout := service2.Lockout{ + Config: authenticationLockoutConfig, + RemoteIP: remoteIP, + Provider: lockoutService, + } + service3 := &service2.Service{ + Store: store3, + Config: appConfig, + Password: passwordProvider, + Passkey: provider2, + TOTP: totpProvider, + OOBOTP: oobProvider, + OTPCodeService: otpService, + RateLimits: rateLimits, + Lockout: serviceLockout, + } + verificationConfig := appConfig.Verification + userProfileConfig := appConfig.UserProfile + storePQ := &verification.StorePQ{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + verificationService := &verification.Service{ + Config: verificationConfig, + UserProfileConfig: userProfileConfig, + Clock: clockClock, + ClaimStore: storePQ, + } + imagesCDNHost := environmentConfig.ImagesCDNHost + pictureTransformer := &stdattrs2.PictureTransformer{ + HTTPProto: httpProto, + HTTPHost: httpHost, + ImagesCDNHost: imagesCDNHost, + } + serviceNoEvent := &stdattrs2.ServiceNoEvent{ + UserProfileConfig: userProfileConfig, + Identities: serviceService, + UserQueries: rawQueries, + UserStore: store, + ClaimStore: storePQ, + Transformer: pictureTransformer, + } + customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ + Config: userProfileConfig, + UserQueries: rawQueries, + UserStore: store, + } + nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint + web3Service := &web3.Service{ + APIEndpoint: nftIndexerAPIEndpoint, + Web3Config: web3Config, + } + rolesgroupsStore := &rolesgroups.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + } + queries := &rolesgroups.Queries{ + Store: rolesgroupsStore, + } + userQueries := &user.Queries{ + RawQueries: rawQueries, + Store: store, + Identities: serviceService, + Authenticators: service3, + Verification: verificationService, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } + idTokenIssuer := &oidc.IDTokenIssuer{ + Secrets: oAuthKeyMaterials, + BaseURL: endpointsEndpoints, + Users: userQueries, + RolesAndGroups: queries, + Clock: clockClock, + } + samlService := &saml.Service{ + Clock: clockClock, + AppID: appID, + SAMLEnvironmentConfig: samlEnvironmentConfig, + SAMLConfig: samlConfig, + SAMLIdpSigningMaterials: samlIdpSigningMaterials, + Endpoints: endpointsEndpoints, + UserInfoProvider: idTokenIssuer, + } + loginResultHandler := saml2.LoginResultHandler{ + Clock: clockClock, + Database: appdbHandle, + SAMLService: samlService, + } + loginFinishHandler := &saml2.LoginFinishHandler{ + Logger: loginFinishHandlerLogger, + Clock: clockClock, + SAMLSessionService: storeRedis, + AuthenticationInfoResolver: uiService, + AuthenticationInfoService: authenticationinfoStoreRedis, + LoginResultHandler: loginResultHandler, + } + return loginFinishHandler +} + +func newWebAppAuthflowV2SettingsProfile(p *deps.RequestProvider) http.Handler { + appProvider := p.AppProvider + factory := appProvider.LoggerFactory + handle := appProvider.AppDatabase + appredisHandle := appProvider.Redis + appContext := appProvider.AppContext + config := appContext.Config + appConfig := config.AppConfig + appID := appConfig.ID + serviceLogger := webapp2.NewServiceLogger(factory) + request := p.Request + sessionStoreRedis := &webapp2.SessionStoreRedis{ + AppID: appID, + Redis: appredisHandle, + } + sessionCookieDef := webapp2.NewSessionCookieDef() + signedUpCookieDef := webapp2.NewSignedUpCookieDef() + authenticationConfig := appConfig.Authentication + cookieDef := mfa.NewDeviceTokenCookieDef(authenticationConfig) + errorTokenCookieDef := webapp2.NewErrorTokenCookieDef() + rootProvider := appProvider.RootProvider + environmentConfig := rootProvider.EnvironmentConfig + trustProxy := environmentConfig.TrustProxy + httpConfig := appConfig.HTTP + cookieManager := deps.NewCookieManager(request, trustProxy, httpConfig) + errorService := &webapp2.ErrorService{ + AppID: appID, + Cookie: errorTokenCookieDef, + RedisHandle: appredisHandle, + Cookies: cookieManager, + } + oAuthConfig := appConfig.OAuth + uiConfig := appConfig.UI + httpHost := deps.ProvideHTTPHost(request, trustProxy) + httpProto := deps.ProvideHTTPProto(request, trustProxy) + globalUIImplementation := environmentConfig.UIImplementation + globalUISettingsImplementation := environmentConfig.UISettingsImplementation + uiImplementationService := &web.UIImplementationService{ + UIConfig: uiConfig, + GlobalUIImplementation: globalUIImplementation, + GlobalUISettingsImplementation: globalUISettingsImplementation, + } + endpointsEndpoints := &endpoints.Endpoints{ + HTTPHost: httpHost, + HTTPProto: httpProto, + UIImplementationService: uiImplementationService, + } + uiService := &authenticationinfo.UIService{ + EndpointsProvider: endpointsEndpoints, + } + resolver := &oauthclient.Resolver{ + OAuthConfig: oAuthConfig, + TesterEndpoints: endpointsEndpoints, + } + logger := interaction.NewLogger(factory) + remoteIP := deps.ProvideRemoteIP(request, trustProxy) + contextContext := deps.ProvideRequestContext(request) + sqlExecutor := appdb.NewSQLExecutor(contextContext, handle) + clockClock := _wireSystemClockValue + featureConfig := config.FeatureConfig + redisLogger := redis.NewLogger(factory) + secretConfig := config.SecretConfig + databaseCredentials := deps.ProvideDatabaseCredentials(secretConfig) + sqlBuilderApp := appdb.NewSQLBuilderApp(databaseCredentials, appID) + store := &redis.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Logger: redisLogger, + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + } + userAgentString := deps.ProvideUserAgentString(request) + eventLogger := event.NewLogger(factory) + localizationConfig := appConfig.Localization + sqlBuilder := appdb.NewSQLBuilder(databaseCredentials) + storeImpl := event.NewStoreImpl(sqlBuilder, sqlExecutor) + userStore := &user.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + AppID: appID, + } + rawQueries := &user.RawQueries{ + Store: userStore, + } + identityConfig := appConfig.Identity + identityFeatureConfig := featureConfig.Identity + serviceStore := &service.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + loginidStore := &loginid.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + loginIDConfig := identityConfig.LoginID + manager := appContext.Resources + typeCheckerFactory := &loginid.TypeCheckerFactory{ + UIConfig: uiConfig, + LoginIDConfig: loginIDConfig, + Resources: manager, + } + checker := &loginid.Checker{ + Config: loginIDConfig, + TypeCheckerFactory: typeCheckerFactory, + } + normalizerFactory := &loginid.NormalizerFactory{ + Config: loginIDConfig, + } + provider := &loginid.Provider{ + Store: loginidStore, + Config: loginIDConfig, + Checker: checker, + NormalizerFactory: normalizerFactory, + Clock: clockClock, + } + oauthStore := &oauth3.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + IdentityConfig: identityConfig, + } + oauthProvider := &oauth3.Provider{ + Store: oauthStore, + Clock: clockClock, + IdentityConfig: identityConfig, + } + anonymousStore := &anonymous.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + anonymousProvider := &anonymous.Provider{ + Store: anonymousStore, + Clock: clockClock, + } + biometricStore := &biometric.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + biometricProvider := &biometric.Provider{ + Store: biometricStore, + Clock: clockClock, + } + passkeyStore := &passkey.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + store2 := &passkey2.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + defaultLanguageTag := deps.ProvideDefaultLanguageTag(config) + supportedLanguageTags := deps.ProvideSupportedLanguageTags(config) + templateResolver := &template.Resolver{ + Resources: manager, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + } + engine := &template.Engine{ + Resolver: templateResolver, + } + httpOrigin := httputil.MakeHTTPOrigin(httpProto, httpHost) + webAppCDNHost := environmentConfig.WebAppCDNHost + globalEmbeddedResourceManager := rootProvider.EmbeddedResources + staticAssetResolver := &web.StaticAssetResolver{ + Context: contextContext, + Localization: localizationConfig, + HTTPOrigin: httpOrigin, + HTTPProto: httpProto, + WebAppCDNHost: webAppCDNHost, + Resources: manager, + EmbeddedResources: globalEmbeddedResourceManager, + } + translationService := &translation.Service{ + Context: contextContext, + TemplateEngine: engine, + StaticAssets: staticAssetResolver, + } + configService := &passkey2.ConfigService{ + Request: request, + TrustProxy: trustProxy, + TranslationService: translationService, + } + passkeyService := &passkey2.Service{ + Store: store2, + ConfigService: configService, + } + passkeyProvider := &passkey.Provider{ + Store: passkeyStore, + Clock: clockClock, + Passkey: passkeyService, + } + siweStore := &siwe.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + web3Config := appConfig.Web3 + storeRedis := &siwe2.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + ratelimitLogger := ratelimit.NewLogger(factory) + storageRedis := &ratelimit.StorageRedis{ + AppID: appID, + Redis: appredisHandle, + } + rateLimitsFeatureConfig := featureConfig.RateLimits + limiter := &ratelimit.Limiter{ + Logger: ratelimitLogger, + Storage: storageRedis, + Config: rateLimitsFeatureConfig, + } + siweLogger := siwe2.NewLogger(factory) + siweService := &siwe2.Service{ + RemoteIP: remoteIP, + HTTPOrigin: httpOrigin, + Web3Config: web3Config, + AuthenticationConfig: authenticationConfig, + Clock: clockClock, + NonceStore: storeRedis, + RateLimiter: limiter, + Logger: siweLogger, + } + siweProvider := &siwe.Provider{ + Store: siweStore, + Clock: clockClock, + SIWE: siweService, + } + ldapStore := &ldap.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + normalizer := &stdattrs.Normalizer{ + LoginIDNormalizerFactory: normalizerFactory, + } + ldapProvider := &ldap.Provider{ + Store: ldapStore, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + } + serviceService := &service.Service{ + Authentication: authenticationConfig, + Identity: identityConfig, + IdentityFeatureConfig: identityFeatureConfig, + Store: serviceStore, + LoginID: provider, + OAuth: oauthProvider, + Anonymous: anonymousProvider, + Biometric: biometricProvider, + Passkey: passkeyProvider, + SIWE: siweProvider, + LDAP: ldapProvider, + } + store3 := &service2.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + passwordStore := &password.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorConfig := appConfig.Authenticator + authenticatorPasswordConfig := authenticatorConfig.Password + passwordLogger := password.NewLogger(factory) + historyStore := &password.HistoryStore{ + Clock: clockClock, + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorFeatureConfig := featureConfig.Authenticator + passwordChecker := password.ProvideChecker(authenticatorPasswordConfig, authenticatorFeatureConfig, historyStore) + expiry := password.ProvideExpiry(authenticatorPasswordConfig, clockClock) + housekeeperLogger := password.NewHousekeeperLogger(factory) + housekeeper := &password.Housekeeper{ + Store: historyStore, + Logger: housekeeperLogger, + Config: authenticatorPasswordConfig, + } + passwordProvider := &password.Provider{ + Store: passwordStore, + Config: authenticatorPasswordConfig, + Clock: clockClock, + Logger: passwordLogger, + PasswordHistory: historyStore, + PasswordChecker: passwordChecker, + Expiry: expiry, + Housekeeper: housekeeper, + } + store4 := &passkey3.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + provider2 := &passkey3.Provider{ + Store: store4, + Clock: clockClock, + Passkey: passkeyService, + } + totpStore := &totp.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + authenticatorTOTPConfig := authenticatorConfig.TOTP + totpProvider := &totp.Provider{ + Store: totpStore, + Config: authenticatorTOTPConfig, + Clock: clockClock, + } + oobStore := &oob.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + oobProvider := &oob.Provider{ + Store: oobStore, + LoginIDNormalizerFactory: normalizerFactory, + Clock: clockClock, + } + testModeConfig := appConfig.TestMode + testModeFeatureConfig := featureConfig.TestMode + codeStoreRedis := &otp.CodeStoreRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + lookupStoreRedis := &otp.LookupStoreRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + attemptTrackerRedis := &otp.AttemptTrackerRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + otpLogger := otp.NewLogger(factory) + otpService := &otp.Service{ + Clock: clockClock, + AppID: appID, + TestModeConfig: testModeConfig, + TestModeFeatureConfig: testModeFeatureConfig, + RemoteIP: remoteIP, + CodeStore: codeStoreRedis, + LookupStore: lookupStoreRedis, + AttemptTracker: attemptTrackerRedis, + Logger: otpLogger, + RateLimiter: limiter, + } + rateLimits := service2.RateLimits{ + IP: remoteIP, + Config: authenticationConfig, + RateLimiter: limiter, + } + authenticationLockoutConfig := authenticationConfig.Lockout + lockoutLogger := lockout.NewLogger(factory) + lockoutStorageRedis := &lockout.StorageRedis{ + AppID: appID, + Redis: appredisHandle, + } + lockoutService := &lockout.Service{ + Logger: lockoutLogger, + Storage: lockoutStorageRedis, + } + serviceLockout := service2.Lockout{ + Config: authenticationLockoutConfig, + RemoteIP: remoteIP, + Provider: lockoutService, + } + service3 := &service2.Service{ + Store: store3, + Config: appConfig, + Password: passwordProvider, + Passkey: provider2, + TOTP: totpProvider, + OOBOTP: oobProvider, + OTPCodeService: otpService, + RateLimits: rateLimits, + Lockout: serviceLockout, + } + verificationConfig := appConfig.Verification + userProfileConfig := appConfig.UserProfile + storePQ := &verification.StorePQ{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + verificationService := &verification.Service{ + Config: verificationConfig, + UserProfileConfig: userProfileConfig, + Clock: clockClock, + ClaimStore: storePQ, + } + imagesCDNHost := environmentConfig.ImagesCDNHost + pictureTransformer := &stdattrs2.PictureTransformer{ + HTTPProto: httpProto, + HTTPHost: httpHost, + ImagesCDNHost: imagesCDNHost, + } + serviceNoEvent := &stdattrs2.ServiceNoEvent{ + UserProfileConfig: userProfileConfig, + Identities: serviceService, + UserQueries: rawQueries, + UserStore: userStore, + ClaimStore: storePQ, + Transformer: pictureTransformer, + } + customattrsServiceNoEvent := &customattrs.ServiceNoEvent{ + Config: userProfileConfig, + UserQueries: rawQueries, + UserStore: userStore, + } + nftIndexerAPIEndpoint := environmentConfig.NFTIndexerAPIEndpoint + web3Service := &web3.Service{ + APIEndpoint: nftIndexerAPIEndpoint, + Web3Config: web3Config, + } + rolesgroupsStore := &rolesgroups.Store{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + Clock: clockClock, + } + queries := &rolesgroups.Queries{ + Store: rolesgroupsStore, + } + userQueries := &user.Queries{ + RawQueries: rawQueries, + Store: userStore, + Identities: serviceService, + Authenticators: service3, + Verification: verificationService, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } + resolverImpl := &event.ResolverImpl{ + Users: userQueries, + } + hookLogger := hook.NewLogger(factory) + hookConfig := appConfig.Hook + webHookLogger := hook.NewWebHookLogger(factory) + webhookKeyMaterials := deps.ProvideWebhookKeyMaterials(secretConfig) + webHookImpl := hook.WebHookImpl{ + Logger: webHookLogger, + Secret: webhookKeyMaterials, + } + syncHTTPClient := hook.NewSyncHTTPClient(hookConfig) + asyncHTTPClient := hook.NewAsyncHTTPClient() + eventWebHookImpl := &hook.EventWebHookImpl{ + WebHookImpl: webHookImpl, + SyncHTTP: syncHTTPClient, + AsyncHTTP: asyncHTTPClient, + } + denoHookLogger := hook.NewDenoHookLogger(factory) + denoHook := hook.DenoHook{ + Context: contextContext, + ResourceManager: manager, + Logger: denoHookLogger, + } + denoEndpoint := environmentConfig.DenoEndpoint + syncDenoClient := hook.NewSyncDenoClient(denoEndpoint, hookConfig, hookLogger) + asyncDenoClient := hook.NewAsyncDenoClient(denoEndpoint, hookLogger) + eventDenoHookImpl := &hook.EventDenoHookImpl{ + DenoHook: denoHook, + SyncDenoClient: syncDenoClient, + AsyncDenoClient: asyncDenoClient, + } + commands := &rolesgroups.Commands{ + Store: rolesgroupsStore, + } + sink := &hook.Sink{ + Logger: hookLogger, + Config: hookConfig, + Clock: clockClock, + EventWebHook: eventWebHookImpl, + EventDenoHook: eventDenoHookImpl, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + RolesAndGroups: commands, + } + auditLogger := audit.NewLogger(factory) + writeHandle := appProvider.AuditWriteDatabase + auditDatabaseCredentials := deps.ProvideAuditDatabaseCredentials(secretConfig) + auditdbSQLBuilderApp := auditdb.NewSQLBuilderApp(auditDatabaseCredentials, appID) + writeSQLExecutor := auditdb.NewWriteSQLExecutor(contextContext, writeHandle) + writeStore := &audit.WriteStore{ + SQLBuilder: auditdbSQLBuilderApp, + SQLExecutor: writeSQLExecutor, + } + auditSink := &audit.Sink{ + Logger: auditLogger, + Database: writeHandle, + Store: writeStore, + } + elasticsearchLogger := elasticsearch.NewLogger(factory) + elasticsearchServiceLogger := elasticsearch.NewElasticsearchServiceLogger(factory) + elasticsearchCredentials := deps.ProvideElasticsearchCredentials(secretConfig) + client := elasticsearch.NewClient(elasticsearchCredentials) + queue := appProvider.TaskQueue + userReindexProducer := redisqueue.NewUserReindexProducer(appredisHandle, clockClock) + elasticsearchService := elasticsearch.Service{ + Clock: clockClock, + Context: contextContext, + Database: handle, + Logger: elasticsearchServiceLogger, + AppID: appID, + Client: client, + Users: userQueries, + UserStore: userStore, + IdentityService: serviceService, + RolesGroups: rolesgroupsStore, + TaskQueue: queue, + Producer: userReindexProducer, + } + elasticsearchSink := &elasticsearch.Sink{ + Logger: elasticsearchLogger, + Service: elasticsearchService, + Database: handle, + } + eventService := event.NewService(contextContext, appID, remoteIP, userAgentString, eventLogger, handle, clockClock, localizationConfig, storeImpl, resolverImpl, sink, auditSink, elasticsearchSink) + storeDeviceTokenRedis := &mfa.StoreDeviceTokenRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + storeRecoveryCodePQ := &mfa.StoreRecoveryCodePQ{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + mfaLockout := mfa.Lockout{ + Config: authenticationLockoutConfig, + RemoteIP: remoteIP, + Provider: lockoutService, + } + mfaService := &mfa.Service{ + IP: remoteIP, + DeviceTokens: storeDeviceTokenRedis, + RecoveryCodes: storeRecoveryCodePQ, + Clock: clockClock, + Config: authenticationConfig, + RateLimiter: limiter, + Lockout: mfaLockout, + } + messagingLogger := messaging.NewLogger(factory) + usageLogger := usage.NewLogger(factory) + usageLimiter := &usage.Limiter{ + Logger: usageLogger, + Clock: clockClock, + AppID: appID, + Redis: appredisHandle, + } + messagingConfig := appConfig.Messaging + messagingRateLimitsConfig := messagingConfig.RateLimits + messagingFeatureConfig := featureConfig.Messaging + rateLimitsEnvironmentConfig := &environmentConfig.RateLimits + limits := messaging.Limits{ + Logger: messagingLogger, + RateLimiter: limiter, + UsageLimiter: usageLimiter, + RemoteIP: remoteIP, + Config: messagingRateLimitsConfig, + FeatureConfig: messagingFeatureConfig, + EnvConfig: rateLimitsEnvironmentConfig, + } + whatsappServiceLogger := whatsapp.NewServiceLogger(factory) + devMode := environmentConfig.DevMode + featureTestModeWhatsappSuppressed := deps.ProvideTestModeWhatsappSuppressed(testModeFeatureConfig) + testModeWhatsappConfig := testModeConfig.Whatsapp + whatsappConfig := messagingConfig.Whatsapp + whatsappOnPremisesCredentials := deps.ProvideWhatsappOnPremisesCredentials(secretConfig) + tokenStore := &whatsapp.TokenStore{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + onPremisesClient := whatsapp.NewWhatsappOnPremisesClient(whatsappConfig, whatsappOnPremisesCredentials, tokenStore) + whatsappService := &whatsapp.Service{ + Context: contextContext, + Logger: whatsappServiceLogger, + DevMode: devMode, + FeatureTestModeWhatsappSuppressed: featureTestModeWhatsappSuppressed, + TestModeWhatsappConfig: testModeWhatsappConfig, + WhatsappConfig: whatsappConfig, + LocalizationConfig: localizationConfig, + OnPremisesClient: onPremisesClient, + TokenStore: tokenStore, + } + sender := &messaging.Sender{ + Limits: limits, + TaskQueue: queue, + Events: eventService, + Whatsapp: whatsappService, + MessagingFeatureConfig: messagingFeatureConfig, + } + forgotpasswordSender := &forgotpassword.Sender{ + AppConfg: appConfig, + Identities: serviceService, + Sender: sender, + Translation: translationService, + } + rawCommands := &user.RawCommands{ + Store: userStore, + Clock: clockClock, + } + userCommands := &user.Commands{ + RawCommands: rawCommands, + RawQueries: rawQueries, + Events: eventService, + Verification: verificationService, + UserProfileConfig: userProfileConfig, + StandardAttributes: serviceNoEvent, + CustomAttributes: customattrsServiceNoEvent, + Web3: web3Service, + RolesAndGroups: queries, + } + stdattrsService := &stdattrs2.Service{ + UserProfileConfig: userProfileConfig, + ServiceNoEvent: serviceNoEvent, + Identities: serviceService, + UserQueries: rawQueries, + UserStore: userStore, + Events: eventService, + } + authorizationStore := &pq.AuthorizationStore{ + SQLBuilder: sqlBuilderApp, + SQLExecutor: sqlExecutor, + } + storeRedisLogger := idpsession.NewStoreRedisLogger(factory) + idpsessionStoreRedis := &idpsession.StoreRedis{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + Logger: storeRedisLogger, + } + sessionConfig := appConfig.Session + cookieDef2 := session.NewSessionCookieDef(sessionConfig) + idpsessionManager := &idpsession.Manager{ + Store: idpsessionStoreRedis, + Config: sessionConfig, + Cookies: cookieManager, + CookieDef: cookieDef2, + } + eventStoreRedis := &access.EventStoreRedis{ + Redis: appredisHandle, + AppID: appID, + } + eventProvider := &access.EventProvider{ + Store: eventStoreRedis, + } + idpsessionRand := _wireRandValue + idpsessionProvider := &idpsession.Provider{ + Context: contextContext, + RemoteIP: remoteIP, + UserAgentString: userAgentString, + AppID: appID, + Redis: appredisHandle, + Store: idpsessionStoreRedis, + AccessEvents: eventProvider, + TrustProxy: trustProxy, + Config: sessionConfig, + Clock: clockClock, + Random: idpsessionRand, + } + offlineGrantService := oauth2.OfflineGrantService{ + OAuthConfig: oAuthConfig, + Clock: clockClock, + IDPSessions: idpsessionProvider, + ClientResolver: resolver, + OfflineGrants: store, + } + sessionManager := &oauth2.SessionManager{ + Store: store, + Config: oAuthConfig, + Service: offlineGrantService, + } + accountDeletionConfig := appConfig.AccountDeletion + accountAnonymizationConfig := appConfig.AccountAnonymization + maxTrials := _wireMaxTrialsValue + passwordRand := password.NewRandSource() + generator := &password.Generator{ + MaxTrials: maxTrials, + Checker: passwordChecker, + Rand: passwordRand, + PasswordConfig: authenticatorPasswordConfig, + } + coordinator := &facade.Coordinator{ + Events: eventService, + Identities: serviceService, + Authenticators: service3, + Verification: verificationService, + MFA: mfaService, + SendPassword: forgotpasswordSender, + UserCommands: userCommands, + UserQueries: userQueries, + RolesGroupsCommands: commands, + StdAttrsService: stdattrsService, + PasswordHistory: historyStore, + OAuth: authorizationStore, + IDPSessions: idpsessionManager, + OAuthSessions: sessionManager, + IdentityConfig: identityConfig, + AccountDeletionConfig: accountDeletionConfig, + AccountAnonymizationConfig: accountAnonymizationConfig, + AuthenticationConfig: authenticationConfig, + Clock: clockClock, + PasswordGenerator: generator, + } + identityFacade := facade.IdentityFacade{ + Coordinator: coordinator, + } + authenticatorFacade := facade.AuthenticatorFacade{ + Coordinator: coordinator, + } + anonymousStoreRedis := &anonymous.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + messageSender := &otp.MessageSender{ + Translation: translationService, + Endpoints: endpointsEndpoints, + Sender: sender, + WhatsappService: whatsappService, + } + oAuthSSOProviderCredentials := deps.ProvideOAuthSSOProviderCredentials(secretConfig) + oAuthHTTPClient := sso.ProvideOAuthHTTPClient(environmentConfig) + simpleStoreRedisFactory := &sso.SimpleStoreRedisFactory{ + Context: contextContext, + AppID: appID, + Redis: appredisHandle, + } + oAuthProviderFactory := &sso.OAuthProviderFactory{ + IdentityConfig: identityConfig, + Credentials: oAuthSSOProviderCredentials, + Clock: clockClock, + StandardAttributesNormalizer: normalizer, + HTTPClient: oAuthHTTPClient, + SimpleStoreRedisFactory: simpleStoreRedisFactory, + } + webappoauthStore := &webappoauth.Store{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + mfaFacade := &facade.MFAFacade{ + Coordinator: coordinator, + } + forgotpasswordLogger := forgotpassword.NewLogger(factory) + sender2 := forgotpassword.Sender{ + AppConfg: appConfig, + Identities: serviceService, + Sender: sender, + Translation: translationService, + } + forgotpasswordService := &forgotpassword.Service{ + Logger: forgotpasswordLogger, + Config: appConfig, + FeatureConfig: featureConfig, + Identities: serviceService, + Authenticators: authenticatorFacade, + OTPCodes: otpService, + OTPSender: messageSender, + PasswordSender: sender2, + } + responseWriter := p.ResponseWriter + nonceService := &nonce.Service{ + Cookies: cookieManager, + Request: request, + ResponseWriter: responseWriter, + } + challengeProvider := &challenge.Provider{ + Redis: appredisHandle, + AppID: appID, + Clock: clockClock, + } + userProvider := &user.Provider{ + Commands: userCommands, + Queries: userQueries, + } + authenticationinfoStoreRedis := &authenticationinfo.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + manager2 := &session.Manager{ + IDPSessions: idpsessionManager, + AccessTokenSessions: sessionManager, + Events: eventService, + } + oauthsessionStoreRedis := &oauthsession.StoreRedis{ + Context: contextContext, + Redis: appredisHandle, + AppID: appID, + } + interactionContext := &interaction.Context{ + Request: request, + RemoteIP: remoteIP, + Database: sqlExecutor, + Clock: clockClock, + Config: appConfig, + FeatureConfig: featureConfig, + OAuthClientResolver: resolver, + OfflineGrants: store, + Identities: identityFacade, + Authenticators: authenticatorFacade, + AnonymousIdentities: anonymousProvider, + AnonymousUserPromotionCodeStore: anonymousStoreRedis, + BiometricIdentities: biometricProvider, + OTPCodeService: otpService, + OTPSender: messageSender, + OAuthProviderFactory: oAuthProviderFactory, + OAuthRedirectURIBuilder: endpointsEndpoints, + OAuthStateStore: webappoauthStore, + MFA: mfaFacade, + ForgotPassword: forgotpasswordService, + ResetPassword: forgotpasswordService, + Passkey: passkeyService, + Verification: verificationService, + RateLimiter: limiter, + PasswordGenerator: generator, + Nonces: nonceService, + Challenges: challengeProvider, + Users: userProvider, + StdAttrsService: stdattrsService, + Events: eventService, + CookieManager: cookieManager, + AuthenticationInfoService: authenticationinfoStoreRedis, + Sessions: idpsessionProvider, + SessionManager: manager2, + SessionCookie: cookieDef2, + OAuthSessions: oauthsessionStoreRedis, + MFADeviceTokenCookie: cookieDef, + } + interactionStoreRedis := &interaction.StoreRedis{ + Redis: appredisHandle, + AppID: appID, + } + interactionService := &interaction.Service{ + Logger: logger, + Context: interactionContext, + Store: interactionStoreRedis, + } + webappService2 := &webapp2.Service2{ + Logger: serviceLogger, + Request: request, + Sessions: sessionStoreRedis, + SessionCookie: sessionCookieDef, + SignedUpCookie: signedUpCookieDef, + MFADeviceTokenCookie: cookieDef, + ErrorService: errorService, + Cookies: cookieManager, + OAuthConfig: oAuthConfig, + UIConfig: uiConfig, + TrustProxy: trustProxy, + UIInfoResolver: uiService, + OAuthClientResolver: resolver, + Graph: interactionService, + } + uiFeatureConfig := featureConfig.UI + forgotPasswordConfig := appConfig.ForgotPassword + googleTagManagerConfig := appConfig.GoogleTagManager + botProtectionConfig := appConfig.BotProtection + flashMessage := &httputil.FlashMessage{ + Cookies: cookieManager, + } + authUISentryDSN := environmentConfig.AuthUISentryDSN + authUIWindowMessageAllowedOrigins := environmentConfig.AuthUIWindowMessageAllowedOrigins + baseLogger := viewmodels.NewBaseLogger(factory) + baseViewModeler := &viewmodels.BaseViewModeler{ + TrustProxy: trustProxy, + OAuth: oAuthConfig, + AuthUI: uiConfig, + AuthUIFeatureConfig: uiFeatureConfig, + StaticAssets: staticAssetResolver, + ForgotPassword: forgotPasswordConfig, + Authentication: authenticationConfig, + GoogleTagManager: googleTagManagerConfig, + BotProtection: botProtectionConfig, + ErrorService: errorService, + Translations: translationService, + Clock: clockClock, + FlashMessage: flashMessage, + DefaultLanguageTag: defaultLanguageTag, + SupportedLanguageTags: supportedLanguageTags, + AuthUISentryDSN: authUISentryDSN, + AuthUIWindowMessageAllowedOrigins: authUIWindowMessageAllowedOrigins, + OAuthClientResolver: resolver, + Logger: baseLogger, + } + responseRenderer := &webapp.ResponseRenderer{ + TemplateEngine: engine, + } + publisher := webapp.NewPublisher(appID, appredisHandle) + controllerDeps := webapp.ControllerDeps{ + Database: handle, + RedisHandle: appredisHandle, + AppID: appID, + Page: webappService2, + BaseViewModel: baseViewModeler, + Renderer: responseRenderer, + Publisher: publisher, + Clock: clockClock, + UIConfig: uiConfig, + ErrorService: errorService, + TesterEndpointsProvider: endpointsEndpoints, + TrustProxy: trustProxy, + } + controllerFactory := webapp.ControllerFactory{ + LoggerFactory: factory, + ControllerDeps: controllerDeps, + } + facadeIdentityFacade := &facade.IdentityFacade{ + Coordinator: coordinator, + } + settingsProfileViewModeler := &viewmodels.SettingsProfileViewModeler{ + Localization: localizationConfig, + UserProfileConfig: userProfileConfig, + Users: userQueries, + Identities: facadeIdentityFacade, + Clock: clockClock, + } + authflowV2SettingsProfileHandler := &authflowv2.AuthflowV2SettingsProfileHandler{ + ControllerFactory: controllerFactory, + BaseViewModel: baseViewModeler, + SettingsProfileViewModel: settingsProfileViewModeler, + Renderer: responseRenderer, + } + return authflowV2SettingsProfileHandler } // Injectors from wire_middleware.go: diff --git a/pkg/auth/wire_handler.go b/pkg/auth/wire_handler.go index 2f21421369..3a40d8afc4 100644 --- a/pkg/auth/wire_handler.go +++ b/pkg/auth/wire_handler.go @@ -419,10 +419,10 @@ func newWebAppSettingsHandler(p *deps.RequestProvider) http.Handler { )) } -func newWebAppSettingsV2Handler(p *deps.RequestProvider) http.Handler { +func newWebAppAuthflowV2SettingsHandler(p *deps.RequestProvider) http.Handler { panic(wire.Build( DependencySet, - wire.Bind(new(http.Handler), new(*handlerwebappauthflowv2.SettingsV2Handler)), + wire.Bind(new(http.Handler), new(*handlerwebappauthflowv2.AuthflowV2SettingsHandler)), )) } @@ -440,6 +440,13 @@ func newWebAppSettingsProfileEditHandler(p *deps.RequestProvider) http.Handler { )) } +func newWebAppAuthflowV2SettingsProfileEditHandler(p *deps.RequestProvider) http.Handler { + panic(wire.Build( + DependencySet, + wire.Bind(new(http.Handler), new(*handlerwebappauthflowv2.AuthflowV2SettingsProfileEditHandler)), + )) +} + func newWebAppSettingsIdentityHandler(p *deps.RequestProvider) http.Handler { panic(wire.Build( DependencySet, @@ -1200,3 +1207,10 @@ func newSAMLLoginFinishHandler(p *deps.RequestProvider) http.Handler { wire.Bind(new(http.Handler), new(*handlersaml.LoginFinishHandler)), )) } + +func newWebAppAuthflowV2SettingsProfile(p *deps.RequestProvider) http.Handler { + panic(wire.Build( + DependencySet, + wire.Bind(new(http.Handler), new(*handlerwebappauthflowv2.AuthflowV2SettingsProfileHandler)), + )) +} diff --git a/pkg/lib/web/html.go b/pkg/lib/web/html.go index 0a9c1de4de..d9570e06e2 100644 --- a/pkg/lib/web/html.go +++ b/pkg/lib/web/html.go @@ -70,10 +70,18 @@ var TemplateWebAuthflowV2TermsOfServiceAndPrivacyPolicyFooterHTML = template.Reg var TemplateWebAuthflowV2WatermarkHTML = template.RegisterHTML("web/authflowv2/__watermark.html") var TemplateWebAuthflowV2CSRFErrorPageLayoutHTML = template.RegisterHTML("web/authflowv2/__csrf_error_page_layout.html") var TemplateWebAuthflowV2SettingsHeaderHTML = template.RegisterHTML("web/authflowv2/__settings_header.html") -var TemplateWebAuthflowV2SettingsItemWithContentHTML = template.RegisterHTML("web/authflowv2/__settings_item.html") +var TemplateWebAuthflowV2SettingsItemHTML = template.RegisterHTML("web/authflowv2/__settings_item.html") +var TemplateWebAuthflowV2SettingsRadioHTML = template.RegisterHTML("web/authflowv2/__settings_radio.html") var TemplateWebSettingsV2PageFrameHTML = template.RegisterHTML("web/authflowv2/__settings_page_frame.html") var TemplateWebAuthflowV2NavBar = template.RegisterHTML("web/authflowv2/__navbar.html") +var TemplateWebAuthflowV2DateInputHTML = template.RegisterHTML("web/authflowv2/__date_input.html") +var TemplateWebAuthflowV2UserProfilePic = template.RegisterHTML("web/authflowv2/__settings_user_profile_pic.html") +var TemplateWebAuthflowV2SettingsTextInput = template.RegisterHTML("web/authflowv2/__settings_text_input.html") +var TemplateWebAuthflowV2LocaleInputHTML = template.RegisterHTML("web/authflowv2/__locale_input.html") +var TemplateWebAuthflowV2TimezoneInput = template.RegisterHTML("web/authflowv2/__timezone_input.html") +var TemplateWebAuthflowV2CountryInput = template.RegisterHTML("web/authflowv2/__country_input.html") +var TemplateWebAuthflowV2SelectInput = template.RegisterHTML("web/authflowv2/__select_input.html") var BaseComponentsHTML = []*template.HTML{ TemplateWebHTMLHeadHTML, @@ -132,8 +140,16 @@ var BaseComponentsHTML = []*template.HTML{ TemplateWebAuthflowV2CSRFErrorPageLayoutHTML, TemplateWebAuthflowV2BrandLogoHTML, TemplateWebAuthflowV2SettingsHeaderHTML, - TemplateWebAuthflowV2SettingsItemWithContentHTML, + TemplateWebAuthflowV2SettingsItemHTML, TemplateWebAuthflowV2NavBar, + TemplateWebAuthflowV2DateInputHTML, + TemplateWebAuthflowV2UserProfilePic, + TemplateWebAuthflowV2SettingsRadioHTML, + TemplateWebAuthflowV2SettingsTextInput, + TemplateWebAuthflowV2LocaleInputHTML, + TemplateWebAuthflowV2TimezoneInput, + TemplateWebAuthflowV2CountryInput, + TemplateWebAuthflowV2SelectInput, } var ComponentsHTML []*template.HTML diff --git a/resources/authgear/templates/de/translation.json b/resources/authgear/templates/de/translation.json index 4727e76ecc..3b38b2e2c4 100644 --- a/resources/authgear/templates/de/translation.json +++ b/resources/authgear/templates/de/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Mit Telefonnummer fortfahren", "v2.component.button.default.label-continue-with-text-login-id": "Weiter mit {variant, select, email {E-Mail} username {Benutzername} other {E-Mail / Benutzername}}", "v2.component.button.default.label-login": "Anmelden", + "v2.component.button.default.label-save": "Speichern", "v2.component.button.default.label-send": "Senden", "v2.component.device-token-checkbox.default.label": "Dieses Gerät merken und nicht erneut fragen", "v2.component.divider.default.or-label": "oder", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Erneut versuchen in %s", "v2.component.lockout.default.subtitle": "Dieses Konto wurde aufgrund zu vieler Versuche gesperrt. Bitte versuchen Sie es später erneut.", "v2.component.lockout.default.title": "Konto nicht verfügbar", + "v2.component.navbar.default.item-back-button-label": "Zurück", "v2.component.new-password-field.default.password-policy-alphabet": "Enthält einen Buchstaben", "v2.component.new-password-field.default.password-policy-digit": "Enthält eine Ziffer", "v2.component.new-password-field.default.password-policy-lowercase": "Enthält einen Kleinbuchstaben", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Passwort anzeigen", "v2.component.phone-input.default.no-results-found": "Keine Ergebnisse gefunden", "v2.component.phone-input.default.search-label": "Suchen", + "v2.component.select-input.default.no-results-found": "Keine Ergebnisse gefunden", + "v2.component.select-input.default.not-provided-label": "Nicht angegeben", + "v2.component.select-input.default.search-label": "Suchen", + "v2.component.select-input.default.unset-label": "Nicht gesetzt", "v2.component.toc-pp-footer.default.label": "Durch die Registrierung stimmen Sie den {variant, select, both{Nutzungsbedingungen und der Datenschutzerklärung} termsOnly{Nutzungsbedingungen} privacyOnly{Datenschutzerklärung} other{}} zu.", "v2.component.verify-bot-protection.default.description": "Du wirst kurz nach Abschluss der Herausforderung weitergeleitet", "v2.component.verify-bot-protection.default.title": "Überprüfung deines Systems...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Sie haben sich mit {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}} angemeldet. Fahren Sie fort, um fortzufahren.", "v2.page.select-account.default.title": "Melden Sie sich bei {AppOrClientName} an", "v2.page.select-account.default.use-another-account": "Verwenden Sie ein anderes Konto", + "v2.page.settings-profile-edit-address.default.country-label": "Land", + "v2.page.settings-profile-edit-address.default.locality-label": "Stadt", + "v2.page.settings-profile-edit-address.default.navbar-title": "Adresse", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Postleitzahl", + "v2.page.settings-profile-edit-address.default.region-label": "Region", + "v2.page.settings-profile-edit-address.default.street-label": "Straßenadresse", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Geburtsdatum", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Benutzerdefiniert", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Weiblich", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Männlich", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Nicht angegeben", + "v2.page.settings-profile-edit-gender.default.title": "Geschlecht", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Sprache", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Nachname", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Vollständiger Name", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Vorname", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Zweiter Vorname", + "v2.page.settings-profile-edit-name.default.navbar-title": "Name", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Spitzname", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Zeitzone", + "v2.page.settings-profile-no-permission.default.content": "Nicht autorisiert", + "v2.page.settings-profile-no-permission.default.title": "Unerwartete Probleme", + "v2.page.settings-profile.default.address-title": "Adresse", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Nicht angegeben", + "v2.page.settings-profile.default.birthdate-title": "Geburtsdatum", + "v2.page.settings-profile.default.button-label-add-picture": "Profilbild hinzufügen", + "v2.page.settings-profile.default.button-label-remove-picture": "Profilbild entfernen", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Neues Bild hochladen", + "v2.page.settings-profile.default.gender-title": "Geschlecht", + "v2.page.settings-profile.default.language-title": "Sprache", + "v2.page.settings-profile.default.name-title": "Name", + "v2.page.settings-profile.default.navbar-title": "Profil", + "v2.page.settings-profile.default.profile-picture-title": "Profilbild", + "v2.page.settings-profile.default.zoneinfo-title": "Zeitzone", "v2.page.settings.default.button-label-advanced-settings": "Erweiterte Einstellungen", - "v2.page.settings.default.button-label-and-more": "und mehr", + "v2.page.settings.default.button-label-and-more": "{item} und mehr", "v2.page.settings.default.button-label-back-to-app": "Zurück zu meiner App", "v2.page.settings.default.button-label-biometric-login": "Biometrische Anmeldung", "v2.page.settings.default.button-label-email": "E-Mail", diff --git a/resources/authgear/templates/el/translation.json b/resources/authgear/templates/el/translation.json index 0756bf4bf8..f66b13f644 100644 --- a/resources/authgear/templates/el/translation.json +++ b/resources/authgear/templates/el/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Συνέχεια με Αριθμό Τηλεφώνου", "v2.component.button.default.label-continue-with-text-login-id": "Συνέχεια με {variant, select, email {Email} username {Όνομα χρήστη} other {Email / Όνομα χρήστη}}", "v2.component.button.default.label-login": "Σύνδεση", + "v2.component.button.default.label-save": "Αποθήκευση", "v2.component.button.default.label-send": "Αποστολή", "v2.component.device-token-checkbox.default.label": "Απομνημονεύστε αυτήν τη συσκευή και μην ρωτάτε ξανά", "v2.component.divider.default.or-label": "ή", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Δοκιμάστε ξανά σε %s", "v2.component.lockout.default.subtitle": "Αυτός ο λογαριασμός έχει κλειδωθεί λόγω πολλών απόπειρων. Παρακαλούμε δοκιμάστε ξανά αργότερα.", "v2.component.lockout.default.title": "Ο Λογαριασμός Δεν Είναι Διαθέσιμος", + "v2.component.navbar.default.item-back-button-label": "Πίσω", "v2.component.new-password-field.default.password-policy-alphabet": "Περιέχει ένα αλφαβητικό χαρακτήρα", "v2.component.new-password-field.default.password-policy-digit": "Περιέχει ένα ψηφίο", "v2.component.new-password-field.default.password-policy-lowercase": "Περιέχει ένα πεζό γράμμα", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Εμφάνιση κωδικού πρόσβασης", "v2.component.phone-input.default.no-results-found": "Δεν βρέθηκαν αποτελέσματα", "v2.component.phone-input.default.search-label": "Αναζήτηση", + "v2.component.select-input.default.no-results-found": "Δεν βρέθηκαν αποτελέσματα", + "v2.component.select-input.default.not-provided-label": "Δεν παρασχέθηκε", + "v2.component.select-input.default.search-label": "Αναζήτηση", + "v2.component.select-input.default.unset-label": "Μη ορισμένο", "v2.component.toc-pp-footer.default.label": "Με την εγγραφή, συμφωνείτε με τους Όρους Παροχής Υπηρεσιών και την Πολιτική Απορρήτου", "v2.component.verify-bot-protection.default.description": "Θα ανακατευθυνθείτε σύντομα αφού ολοκληρώσετε την πρόκληση", "v2.component.verify-bot-protection.default.title": "Έλεγχος του συστήματός σας...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Έχετε συνδεθεί με {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Συνεχίστε για να προχωρήσετε.", "v2.page.select-account.default.title": "Συνδεθείτε στο {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Χρησιμοποιήστε άλλον λογαριασμό", + "v2.page.settings-profile-edit-address.default.country-label": "Χώρα", + "v2.page.settings-profile-edit-address.default.locality-label": "Πόλη", + "v2.page.settings-profile-edit-address.default.navbar-title": "Διεύθυνση", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Ταχυδρομικός κώδικας", + "v2.page.settings-profile-edit-address.default.region-label": "Περιοχή", + "v2.page.settings-profile-edit-address.default.street-label": "Οδός", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Ημερομηνία γέννησης", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Προσαρμοσμένο", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Γυναίκα", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Άνδρας", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Δεν παρασχέθηκε", + "v2.page.settings-profile-edit-gender.default.title": "Φύλο", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Γλώσσα", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Επώνυμο", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Πλήρες όνομα", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Όνομα", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Μεσαίο όνομα", + "v2.page.settings-profile-edit-name.default.navbar-title": "Όνομα", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Παρατσούκλι", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Ζώνη ώρας", + "v2.page.settings-profile-no-permission.default.content": "Μη εξουσιοδοτημένος", + "v2.page.settings-profile-no-permission.default.title": "Απροσδόκητα Προβλήματα", + "v2.page.settings-profile.default.address-title": "Διεύθυνση", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Δεν παρασχέθηκε", + "v2.page.settings-profile.default.birthdate-title": "Ημερομηνία Γέννησης", + "v2.page.settings-profile.default.button-label-add-picture": "Προσθήκη Φωτογραφίας Προφίλ", + "v2.page.settings-profile.default.button-label-remove-picture": "Αφαίρεση Φωτογραφίας Προφίλ", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Ανέβασμα Νέας Φωτογραφίας", + "v2.page.settings-profile.default.gender-title": "Φύλο", + "v2.page.settings-profile.default.language-title": "Γλώσσα", + "v2.page.settings-profile.default.name-title": "Όνομα", + "v2.page.settings-profile.default.navbar-title": "Προφίλ", + "v2.page.settings-profile.default.profile-picture-title": "Εικόνα Προφίλ", + "v2.page.settings-profile.default.zoneinfo-title": "Ζώνη Ώρας", "v2.page.settings.default.button-label-advanced-settings": "Προχωρημένες Ρυθμίσεις", - "v2.page.settings.default.button-label-and-more": "και άλλα", + "v2.page.settings.default.button-label-and-more": "{item} και περισσότερα", "v2.page.settings.default.button-label-back-to-app": "Επιστροφή στην εφαρμογή μου", "v2.page.settings.default.button-label-biometric-login": "Βιομετρική Σύνδεση", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/en/translation.json b/resources/authgear/templates/en/translation.json index eb55875c18..f9255ea753 100644 --- a/resources/authgear/templates/en/translation.json +++ b/resources/authgear/templates/en/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continue with Phone Number", "v2.component.button.default.label-continue-with-text-login-id": "Continue with {variant, select, email {Email} username {Username} other {Email / Username}}", "v2.component.button.default.label-login": "Login", + "v2.component.button.default.label-save": "Save", "v2.component.button.default.label-send": "Send", "v2.component.device-token-checkbox.default.label": "Remember this device, and don’t ask again", "v2.component.divider.default.or-label": "or", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Retry in %s", "v2.component.lockout.default.subtitle": "This account has been locked due to too many attempts. Please try again later.", "v2.component.lockout.default.title": "Account Unavailable", + "v2.component.navbar.default.item-back-button-label": "Back", "v2.component.new-password-field.default.password-policy-alphabet": "Contains an alphabet", "v2.component.new-password-field.default.password-policy-digit": "Contains a digit", "v2.component.new-password-field.default.password-policy-lowercase": "Contains an lowercase letter", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Show password", "v2.component.phone-input.default.no-results-found": "No results found", "v2.component.phone-input.default.search-label": "Search", + "v2.component.select-input.default.no-results-found": "No results found", + "v2.component.select-input.default.not-provided-label": "Not provided", + "v2.component.select-input.default.search-label": "Search", + "v2.component.select-input.default.unset-label": "Unset", "v2.component.toc-pp-footer.default.label": "By registering, you agree to the {variant, select, both{Terms of Service and Privacy Policy} termsOnly{Terms of Service} privacyOnly{Privacy Policy} other{}}", "v2.component.verify-bot-protection.default.description": "You will be redirected shortly after you completed the challenge", "v2.component.verify-bot-protection.default.title": "Checking your system...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "You have logged in with {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Proceed to continue.", "v2.page.select-account.default.title": "Log in to {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Use another account", + "v2.page.settings-profile-edit-address.default.country-label": "Country", + "v2.page.settings-profile-edit-address.default.locality-label": "City", + "v2.page.settings-profile-edit-address.default.navbar-title": "Address", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Postal code", + "v2.page.settings-profile-edit-address.default.region-label": "Region", + "v2.page.settings-profile-edit-address.default.street-label": "Street address", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Birthdate", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Custom", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Female", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Male", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Not provided", + "v2.page.settings-profile-edit-gender.default.title": "Gender", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Language", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Last name", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Full name", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "First name", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Middle name", + "v2.page.settings-profile-edit-name.default.navbar-title": "Name", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Nick name", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Timezone", + "v2.page.settings-profile-no-permission.default.content": "Not authorized", + "v2.page.settings-profile-no-permission.default.title": "Unexpected Issues", + "v2.page.settings-profile.default.address-title": "Address", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Not provided", + "v2.page.settings-profile.default.birthdate-title": "Birthdate", + "v2.page.settings-profile.default.button-label-add-picture": "Add Profile Picture", + "v2.page.settings-profile.default.button-label-remove-picture": "Remove Profile Picture", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Upload New Picture", + "v2.page.settings-profile.default.gender-title": "Gender", + "v2.page.settings-profile.default.language-title": "Language", + "v2.page.settings-profile.default.name-title": "Name", + "v2.page.settings-profile.default.navbar-title": "Profile", + "v2.page.settings-profile.default.profile-picture-title": "Profile Picture", + "v2.page.settings-profile.default.zoneinfo-title": "Timezone", "v2.page.settings.default.button-label-advanced-settings": "Advanced Settings", - "v2.page.settings.default.button-label-and-more": "and more", + "v2.page.settings.default.button-label-and-more": "{item} and more", "v2.page.settings.default.button-label-back-to-app": "Back to my app", "v2.page.settings.default.button-label-biometric-login": "Biometric Login", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html b/resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html index 8fc3d70807..97df2dea0c 100644 --- a/resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html +++ b/resources/authgear/templates/en/web/authflowv2/__bot_protection_dialog.html @@ -1,9 +1,11 @@ -{{ template "authflowv2/__dialog.html" (dict - "Ctx" . - "DialogID" "bot-protection-dialog" - "DialogControllerStr" (include "dialog-controller-str" .) - "DialogContent" (include "dialog-content" .) -) }} +{{ define "authflowv2/__bot_protection_dialog.html" }} + {{ template "authflowv2/__dialog.html" (dict + "Ctx" . + "DialogID" "bot-protection-dialog" + "DialogControllerStr" (include "dialog-controller-str" .) + "DialogContent" (include "dialog-content" .) + ) }} +{{ end }} {{ define "dialog-controller-str" }} bot-protection-dialog {{ template "web/authflowv2/__bot_protection_controller.html" . }} @@ -14,6 +16,7 @@ {{ end }} {{ define "dialog-content" }} + {{ template "dialog-close-btn" (dict "Class" "dialog-close-btn--bot-protection") }}

diff --git a/resources/authgear/templates/en/web/authflowv2/__country_input.html b/resources/authgear/templates/en/web/authflowv2/__country_input.html new file mode 100644 index 0000000000..28c9577aba --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__country_input.html @@ -0,0 +1,25 @@ +{{ define "authflowv2/__country_input.html" }} + +{{ $countryOptions := (list) }} +{{ range $alpha2 := $.Alpha2 }} + {{ $labelKey := (printf "territory-%s" $alpha2 ) }} + {{ $label := (include $labelKey nil) }} + {{ + $countryOptions = append $countryOptions (dict + "value" $alpha2 + "searchLabel" (printf "%s %s" $alpha2 $label) + "label" $label + "triggerLabel" $label + ) + }} +{{ end }} + +{{ template "authflowv2/__select_input.html" + (dict + "Name" $.Name + "Value" $.Value + "Options" $countryOptions + ) +}} + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__date_input.html b/resources/authgear/templates/en/web/authflowv2/__date_input.html new file mode 100644 index 0000000000..9c6a84e900 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__date_input.html @@ -0,0 +1,21 @@ + + +{{ define "authflowv2/__date_input.html" }} + + + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__dialog.html b/resources/authgear/templates/en/web/authflowv2/__dialog.html index d9339475f2..9b29e728b8 100644 --- a/resources/authgear/templates/en/web/authflowv2/__dialog.html +++ b/resources/authgear/templates/en/web/authflowv2/__dialog.html @@ -1,3 +1,21 @@ +{{/* +Example usage: + {{ template "authflowv2/__dialog.html" (dict + "Ctx" . + "ClassName" "h-full" + "DialogID" "bot-protection-dialog" + "DialogControllerStr" "cloudflare-turnstile" + "DialogContent" (include "dialog-content" .) + ) }} + + {{ define "dialog-content" }} +
+ {{ template "dialog-close-btn" (dict "Class" "close-btn") }} + content................ +
+ {{ end }} +*/}} + {{ define "authflowv2/__dialog.html" }}
-
- +
{{ $.DialogContent }}
{{ end }} - +{{ define "dialog-close-btn" }} + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__locale_input.html b/resources/authgear/templates/en/web/authflowv2/__locale_input.html new file mode 100644 index 0000000000..15172a4b55 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__locale_input.html @@ -0,0 +1,25 @@ +{{ define "authflowv2/__locale_input.html" }} + +{{ $languageOptions := (list) }} +{{ range $language := $.Languages }} + {{ $labelKey := (printf "language-%s" $language)}} + {{ $label := (include $labelKey nil) }} + {{ + $languageOptions = append $languageOptions (dict + "value" $language + "searchLabel" (printf "%s %s" $language $label) + "label" $label + "triggerLabel" $label + ) + }} +{{ end }} + +{{ template "authflowv2/__select_input.html" + (dict + "Name" $.Name + "Value" $.Locale + "Options" $languageOptions + ) +}} + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__navbar.html b/resources/authgear/templates/en/web/authflowv2/__navbar.html index 69c94759bb..d6fb9f1496 100644 --- a/resources/authgear/templates/en/web/authflowv2/__navbar.html +++ b/resources/authgear/templates/en/web/authflowv2/__navbar.html @@ -8,10 +8,7 @@

{{ $.Title }}

href="{{ .BackHref }}" data-turbo-action="replace" > - - arrow_back_ios - - {{ .BackTitle }} + {{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__page_frame.html b/resources/authgear/templates/en/web/authflowv2/__page_frame.html index d2fa2213b8..c9fa13a9b9 100644 --- a/resources/authgear/templates/en/web/authflowv2/__page_frame.html +++ b/resources/authgear/templates/en/web/authflowv2/__page_frame.html @@ -12,7 +12,7 @@ {{ template "page-content" . }} {{ template "authflowv2/__lockout.html" . }} {{ template "authflowv2/__watermark.html" . }} - {{ template "web/authflowv2/__bot_protection_dialog.html" . }} + {{ template "authflowv2/__bot_protection_dialog.html" . }}

{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__select_input.html b/resources/authgear/templates/en/web/authflowv2/__select_input.html new file mode 100644 index 0000000000..4230ad9d88 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__select_input.html @@ -0,0 +1,111 @@ +{{ define "authflowv2/__select_input.html" }} + +{{ $options := prepend $.Options (dict + "triggerLabel" (include "v2.component.select-input.default.not-provided-label" nil) + "label" (include "v2.component.select-input.default.unset-label" nil) + "value" "" +)}} + +
+
+ + + + + + +
+
+ + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__settings_item.html b/resources/authgear/templates/en/web/authflowv2/__settings_item.html index 4897ddf978..9064d5b6a6 100644 --- a/resources/authgear/templates/en/web/authflowv2/__settings_item.html +++ b/resources/authgear/templates/en/web/authflowv2/__settings_item.html @@ -6,22 +6,31 @@ "MaterialIconName" `email` "Children" $.Emails ) -}} +}} */}} {{ define "authflowv2/__settings_item.html" }} - - {{ $.MaterialIconName }} - + {{ if $.MaterialIconName }} +
+ + {{ $.MaterialIconName }} + +
+ {{ end }}

{{ $.Label }}

@@ -30,8 +39,12 @@ {{ if $.Children }} {{ $length := len $.Children }}

- {{ index $.Children 0}} - {{ if gt $length 1 }} {{ template "v2.page.settings.default.button-label-and-more" .}} {{ end }} + {{ $item := index $.Children 0}} + {{ if gt $length 1 }} + {{ template "v2.page.settings.default.button-label-and-more" (dict "item" $item ) }} + {{ else }} + {{ $item }} + {{ end }}

{{ end }} - - arrow_forward_ios - +
{{ end}} diff --git a/resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html b/resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html index b516c83e80..0b594b1722 100644 --- a/resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html +++ b/resources/authgear/templates/en/web/authflowv2/__settings_page_frame.html @@ -43,9 +43,10 @@ {{ define "widget" }}
+ {{ block "page-navbar" . }} + {{ end }} {{ template "page-content" . }} {{ template "authflowv2/__lockout.html" . }}
{{ end }} - diff --git a/resources/authgear/templates/en/web/authflowv2/__settings_radio.html b/resources/authgear/templates/en/web/authflowv2/__settings_radio.html new file mode 100644 index 0000000000..81d6587f12 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__settings_radio.html @@ -0,0 +1,39 @@ +{{/* + Example usage: + {{ template "authflowv2/__settings_radio.html" + (dict + "Label" (include "some-key" nil) + "Name" "gender-select" + "Value" "other" + "ExtraContentOnChecked" (include "other_content" .) + "DefaultChecked" true + ) + }} +*/}} + +{{ define "authflowv2/__settings_radio.html" }} + +{{ $inputID := (printf "radio-%s-%s" $.Name $.Value) }} + +
+ + + + + {{ if $.ExtraContentOnChecked }} +
+ {{ $.ExtraContentOnChecked }} +
+ {{ end }} +
+ +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__settings_text_input.html b/resources/authgear/templates/en/web/authflowv2/__settings_text_input.html new file mode 100644 index 0000000000..f59b8ac6a5 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__settings_text_input.html @@ -0,0 +1,15 @@ +{{ define "authflowv2/__settings_text_input.html" }} + + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__settings_user_profile_pic.html b/resources/authgear/templates/en/web/authflowv2/__settings_user_profile_pic.html new file mode 100644 index 0000000000..71df20e5b6 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__settings_user_profile_pic.html @@ -0,0 +1,22 @@ +{{ define "authflowv2/__settings_user_profile_pic.html" }} + +
+
+ + {{ if $.Editable }} + + {{ end }} +
+
+ +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/__timezone_input.html b/resources/authgear/templates/en/web/authflowv2/__timezone_input.html new file mode 100644 index 0000000000..9bc7d006fa --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/__timezone_input.html @@ -0,0 +1,23 @@ +{{ define "authflowv2/__timezone_input.html" }} + +{{ $timezoneOptions := (list) }} +{{ range $timezone := $.Timezones }} + {{ + $timezoneOptions = append $timezoneOptions (dict + "value" $timezone.Name + "searchLabel" (printf "%s %s" $timezone.Name $timezone.DisplayLabel) + "label" $timezone.DisplayLabel + "triggerLabel" $timezone.DisplayLabel + ) + }} +{{ end }} + +{{ template "authflowv2/__select_input.html" + (dict + "Name" $.Name + "Value" $.Value + "Options" $timezoneOptions + ) +}} + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings.html b/resources/authgear/templates/en/web/authflowv2/settings.html index 67fcabef2d..705f8d8dc3 100644 --- a/resources/authgear/templates/en/web/authflowv2/settings.html +++ b/resources/authgear/templates/en/web/authflowv2/settings.html @@ -170,7 +170,7 @@

{{ if and $.ClientURI (not $.IsNativePlatform) }}
diff --git a/resources/authgear/templates/en/web/authflowv2/settings_picture_edit.html b/resources/authgear/templates/en/web/authflowv2/settings_picture_edit.html new file mode 100644 index 0000000000..2ffb233318 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_picture_edit.html @@ -0,0 +1,99 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + + +{{ define "page-navbar" }} + {{ template "authflowv2/__navbar.html" + (dict + "BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil) + "BackHref" (call $.MakeURL "/settings/profile") + "Title" (translate "v2.page.settings-profile.default.profile-picture-title" nil) + ) + }} +{{ end }} + +{{ define "page-content" }} + +
+ + {{/* Normally form does not need action set. */}} + {{/* However, this form is submitted asynchronously. */}} + {{/* By the time this form is submitted, the URL in the address bar could have changed. */}} + {{/* This could result in a weird bug like https://github.com/authgear/authgear-server/issues/1916 */}} + {{/* Back button is clicked after the upload was initiated */}} + {{/* When the upload finishes, this form is submitted to the URL of the previous page */}} + {{/* The previous page does not support POST method, hence we see the error described in the issue */}} + + + + + +
+ +
+ +
+ + + + + + +
+ {{ $.CSRFField }} + + +
+ + + +
+
+{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile.html b/resources/authgear/templates/en/web/authflowv2/settings_profile.html new file mode 100644 index 0000000000..46f3218c95 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile.html @@ -0,0 +1,187 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + +{{ define "page-navbar" }} + {{ template "authflowv2/__navbar.html" + (dict + "BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil) + "BackHref" (call $.MakeURL "/settings") + "Title" (translate "v2.page.settings-profile.default.navbar-title" nil) + ) + }} +{{ end }} + +{{ define "page-content" }} +
+ {{ if (call $.IsReadable "/picture") }} + {{ template "authflowv2/__settings_user_profile_pic.html" + (dict + "Picture" $.Picture + "GeneratedStaticAssetURL" $.GeneratedStaticAssetURL + "Editable" (call $.IsEditable "/picture") + "EditURL" (call $.MakeURL "/settings/profile/picture/edit") + ) + }} + {{ end }} + +
+ {{ $anyReadableName := or (call $.IsReadable "/name") (call $.IsReadable "/given_name") (call $.IsReadable "/family_name") (call $.IsReadable "/middle_name") (call $.IsReadable "/nickname") }} + {{ if $anyReadableName }} + {{ template "__settings_profile_item" + (merge + (dict + "Title" (translate "v2.page.settings-profile.default.name-title" nil) + "Content" $.FormattedNames + "Editable" (or (call $.IsEditable "/name") (call $.IsEditable "/given_name") (call $.IsEditable "/family_name") (call $.IsEditable "/middle_name") (call $.IsEditable "/nickname")) + "EditURL" (call $.MakeURL "/settings/profile/name/edit") + ) + . + ) + }} + {{ end }} + + {{ if (call $.IsReadable "/gender") }} + {{ $content := $.Gender }} + {{ if (eq $.Gender "male") }} + {{ $content = (translate "v2.page.settings-profile-edit-gender.default.gender-label-male" nil) }} + {{ else if (eq $.Gender "female") }} + {{ $content = (translate "v2.page.settings-profile-edit-gender.default.gender-label-female" nil) }} + {{ else if (eq $.Gender "") }} + {{ $content = (translate "v2.page.settings-profile.default.attribute-value-unspecified-label" nil) }} + {{ end }} + {{ template "__settings_profile_item" + (merge + (dict + "Title" (translate "v2.page.settings-profile.default.gender-title" nil) + "Content" $content + "Editable" (call $.IsEditable "/gender") + "EditURL" (call $.MakeURL "/settings/profile/gender/edit") + ) + . + ) + }} + {{ end }} + + + {{ if (call $.IsReadable "/birthdate") }} + {{ $content := "" }} + {{ if $.Birthdate }} + {{ $content = include "__settings_profile_date_item" $.Birthdate }} + {{ end }} + {{ template "__settings_profile_item" + (merge + (dict + "Title" (translate "v2.page.settings-profile.default.birthdate-title" nil) + "Content" $content + "Editable" (call $.IsEditable "/birthdate") + "EditURL" (call $.MakeURL "/settings/profile/birthdate/edit") + ) + . + ) + }} + {{ end }} + + {{ if (call $.IsReadable "/address") }} + {{ $content := "" }} + {{ $anyAddressComponents := (or $.AddressStreetAddress $.AddressLocality $.AddressRegion $.AddressPostalCode $.AddressCountry) }} + {{ if $anyAddressComponents }} + {{ $content = include "__settings_profile_address_item" . }} + {{ end }} + {{ template "__settings_profile_item" + (merge + (dict + "Title" (translate "v2.page.settings-profile.default.address-title" nil) + "Content" $content + "Editable" (call $.IsEditable "/address") + "EditURL" (call $.MakeURL "/settings/profile/address/edit") + ) + . + ) + }} + {{ end }} + + {{ if (call $.IsReadable "/zoneinfo") }} + {{ $content := "" }} + {{ if $.Zoneinfo }} + {{ $content = $.ZoneinfoTimezone.DisplayLabel }} + {{ end }} + {{ template "__settings_profile_item" + (merge + (dict + "Title" (translate "v2.page.settings-profile.default.zoneinfo-title" nil) + "Content" $content + "Editable" (call $.IsEditable "/zoneinfo") + "EditURL" (call $.MakeURL "/settings/profile/zoneinfo/edit") + ) + . + ) + }} + {{ end }} + + {{ if (call $.IsReadable "/locale") }} + {{ $content := "" }} + {{ if $.Locale }} + {{ $content = (include "__settings_profile_locale_item" .) }} + {{ end }} + {{ template "__settings_profile_item" + (merge + (dict + "Title" (translate "v2.page.settings-profile.default.language-title" nil) + "Content" $content + "Editable" (call $.IsEditable "/locale") + "EditURL" (call $.MakeURL "/settings/profile/locale/edit") + ) + . + ) + }} + {{ end }} +
+
+ +{{ end }} + +{{ define "__settings_profile_item" }} +{{ $url := "" }} +{{ if $.Editable }} + {{ $url = $.EditURL }} +{{ end }} + +{{ $content := (translate "v2.page.settings-profile.default.attribute-value-unspecified-label" nil) }} +{{ if $.Content }} + {{ $content = $.Content }} +{{ end }} + +{{ template "authflowv2/__settings_item.html" + (dict + "Label" $.Title + "Href" $url + "Children" (list $content) + ) +}} +{{ end }} + +{{ define "__settings_profile_date_item" }} + + {{ . }} + +{{ end }} + +{{ define "__settings_profile_locale_item" }} +{{ $label := (printf "language-%s" $.Locale) }} + + {{ $.Locale }} - {{ translate $label nil}} + +{{ end }} + + +{{ define "__settings_profile_address_item" }} + +{{- if $.AddressStreetAddress }}{{ $.AddressStreetAddress }}
{{ end }} +{{- if $.AddressLocality }}{{ $.AddressLocality }}
{{ end }} +{{- if $.AddressRegion }}{{ $.AddressRegion }}
{{ end }} +{{- if $.AddressPostalCode }}{{ $.AddressPostalCode }}
{{ end }} +{{- if $.AddressCountry }}{{ translate (printf "territory-%s" $.AddressCountry) nil }}
{{ end }} +
+{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_address.html b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_address.html new file mode 100644 index 0000000000..424c24178a --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_address.html @@ -0,0 +1,76 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + +{{ define "page-navbar" }} +{{ template "authflowv2/__navbar.html" + (dict + "BackHref" (call $.MakeURL "/settings/profile") + "Title" (translate "v2.page.settings-profile-edit-address.default.navbar-title" nil) + ) +}} +{{ end }} + +{{ define "page-content" }} +
+ {{ $.CSRFField }} + +
+
+ + {{ translate "v2.page.settings-profile-edit-address.default.country-label" nil}} + + {{ template "authflowv2/__country_input.html" + (dict + "Alpha2" $.Alpha2 + "Name" "/address/country" + "Value" $.AddressCountry + ) + }} +
+ + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-address.default.region-label" nil) + "Name" "/address/region" + "Value" $.AddressRegion + ) + }} + + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-address.default.postal-code-label" nil) + "Name" "/address/postal_code" + "Value" $.AddressPostalCode + ) + }} + + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-address.default.locality-label" nil) + "Name" "/address/locality" + "Value" $.AddressLocality + ) + }} + + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-address.default.street-label" nil) + "Name" "/address/street_address" + "Value" $.AddressStreetAddress + ) + }} +
+ + +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_birthdate.html b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_birthdate.html new file mode 100644 index 0000000000..67ab8a3f46 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_birthdate.html @@ -0,0 +1,39 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + +{{ define "page-navbar" }} +{{ template "authflowv2/__navbar.html" + (dict + "BackHref" (call $.MakeURL "/settings/profile") + "Title" (translate "v2.page.settings-profile-edit-birthdate.default.navbar-title" nil) + ) +}} +{{ end }} + +{{ define "page-content" }} + + {{ $.CSRFField }} + + {{ template "authflowv2/__date_input.html" + (dict + "Name" "/birthdate" + "Value" .Birthdate + "Max" .Today + ) + }} + + +
+ +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_gender.html b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_gender.html new file mode 100644 index 0000000000..57f97ea8c3 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_gender.html @@ -0,0 +1,89 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + +{{ define "page-navbar" }} + {{ template "authflowv2/__navbar.html" (dict + "Title" (include "v2.page.settings-profile-edit-gender.default.title" nil ) + "BackTitle" (include "v2.component.navbar.default.item-back-button-label" nil ) + "BackHref" (call $.MakeURL "/settings/profile") + ) + }} +{{ end }} + +{{ define "page-content" }} +
+
+ {{ $.CSRFField }} + {{ template "authflowv2/__settings_radio.html" + (dict + "Label" (include "v2.page.settings-profile-edit-gender.default.gender-label-unspecified" nil) + "Name" "gender-select" + "Value" "" + "DefaultChecked" ( not $.Gender ) + ) + }} + {{ template "authflowv2/__settings_radio.html" + (dict + "Label" (include "v2.page.settings-profile-edit-gender.default.gender-label-female" nil) + "Name" "gender-select" + "Value" "female" + "DefaultChecked" ( eq $.Gender "female") + ) + }} + {{ template "authflowv2/__settings_radio.html" + (dict + "Label" (include "v2.page.settings-profile-edit-gender.default.gender-label-male" nil) + "Name" "gender-select" + "Value" "male" + "DefaultChecked" ( eq $.Gender "male") + ) + }} + + {{ $defaultChecked := false}} + {{ if (and (not (eq $.Gender "female")) (not (eq $.Gender "male")) $.Gender) }} + {{ $defaultChecked = true }} + {{ end }} + {{ template "authflowv2/__settings_radio.html" + (dict + "Label" (include "v2.page.settings-profile-edit-gender.default.gender-label-custom" nil) + "Name" "gender-select" + "Value" "other" + "ExtraContentOnChecked" (include "__settings_gender_edit_custom_gender_input" .) + "DefaultChecked" $defaultChecked + ) + }} +
+ + +
+ +{{ end }} + +{{ define "__settings_gender_edit_custom_gender_input" }} +{{ $value := $.Gender }} +{{ if (or (eq $.Gender "male") (eq $.Gender "female")) }} + {{ $value = "" }} +{{ end }} +
+ +
+{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_locale.html b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_locale.html new file mode 100644 index 0000000000..fc86343070 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_locale.html @@ -0,0 +1,44 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + +{{ define "page-navbar" }} + {{ template "authflowv2/__navbar.html" + (dict + "BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil) + "BackHref" (call $.MakeURL "/settings/profile") + "Title" (translate "v2.page.settings-profile-edit-locale.default.navbar-title" nil) + ) + }} +{{ end }} + +{{ define "page-content" }} + +
+ {{ $.CSRFField }} + + {{ if (call $.IsEditable "/locale") }} + {{ template "authflowv2/__locale_input.html" + (dict + "Languages" .Languages + "Locale" .Locale + "Translations" .Translations + "Name" "/locale" + ) + }} + {{ end }} + + +
+ +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_name.html b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_name.html new file mode 100644 index 0000000000..b934640080 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_name.html @@ -0,0 +1,86 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + +{{ define "page-navbar" }} + {{ template "authflowv2/__navbar.html" + (dict + "BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil) + "BackHref" (call $.MakeURL "/settings/profile") + "Title" (translate "v2.page.settings-profile-edit-name.default.navbar-title" nil) + ) + }} +{{ end }} + +{{ define "page-content" }} + +
+ {{ $.CSRFField }} + +
+ {{ if (call $.IsEditable "/name") }} + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-name.default.fullname-input-label" nil) + "Name" "/name" + "Value" $.Name + ) + }} + {{ end }} + + {{ if (call $.IsEditable "/given_name") }} + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-name.default.given-name-input-label" nil) + "Name" "/given_name" + "Value" $.GivenName + ) + }} + {{ end }} + + {{ if (call $.IsEditable "/middle_name") }} + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-name.default.middle-name-input-label" nil) + "Name" "/middle_name" + "Value" $.MiddleName + ) + }} + {{ end }} + + {{ if (call $.IsEditable "/family_name") }} + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-name.default.family-name-input-label" nil) + "Name" "/family_name" + "Value" $.FamilyName + ) + }} + {{ end }} + + {{ if (call $.IsEditable "/nickname") }} + {{ template "authflowv2/__settings_text_input.html" + (dict + "Label" (translate "v2.page.settings-profile-edit-name.default.nickname-input-label" nil) + "Name" "/nickname" + "Value" $.Nickname + ) + }} + {{ end }} +
+ + +
+ +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_zoneinfo.html b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_zoneinfo.html new file mode 100644 index 0000000000..fd9b8dc4a0 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile_edit_zoneinfo.html @@ -0,0 +1,42 @@ +{{ template "authflowv2/__settings_page_frame.html" . }} + +{{ define "page-navbar" }} + {{ template "authflowv2/__navbar.html" + (dict + "BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil) + "BackHref" (call $.MakeURL "/settings/profile") + "Title" (translate "v2.page.settings-profile-edit-zoneinfo.default.navbar-title" nil) + ) + }} +{{ end }} + +{{ define "page-content" }} + +
+ {{ $.CSRFField }} + + {{ template "authflowv2/__timezone_input.html" + (dict + "Timezones" $.Timezones + "Name" "/zoneinfo" + "Value" $.Zoneinfo + ) + }} + + +
+ +{{ end }} diff --git a/resources/authgear/templates/en/web/authflowv2/settings_profile_no_permission.html b/resources/authgear/templates/en/web/authflowv2/settings_profile_no_permission.html new file mode 100644 index 0000000000..2047a885a2 --- /dev/null +++ b/resources/authgear/templates/en/web/authflowv2/settings_profile_no_permission.html @@ -0,0 +1,9 @@ +{{ template "authflowv2/__page_frame.html" . }} +{{ define "page-content" }} + {{ template "authflowv2/__error_page_layout.html" + (dict + "Title" (include "v2.page.settings-profile-no-permission.default.title" nil) + "ErrorMessage" (include "v2.page.settings-profile-no-permission.default.content" nil) + ) + }} +{{ end }} diff --git a/resources/authgear/templates/es-419/translation.json b/resources/authgear/templates/es-419/translation.json index bf9bd716b6..1c34366074 100644 --- a/resources/authgear/templates/es-419/translation.json +++ b/resources/authgear/templates/es-419/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continuar con el número de teléfono", "v2.component.button.default.label-continue-with-text-login-id": "Continuar con {variant, select, email {Correo electrónico} username {Nombre de usuario} other {Correo electrónico / Nombre de usuario}}", "v2.component.button.default.label-login": "Iniciar sesión", + "v2.component.button.default.label-save": "Guardar", "v2.component.button.default.label-send": "Enviar", "v2.component.device-token-checkbox.default.label": "Recordar este dispositivo y no preguntar de nuevo", "v2.component.divider.default.or-label": "o", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Reintentar en %s", "v2.component.lockout.default.subtitle": "Esta cuenta ha sido bloqueada debido a demasiados intentos. Inténtalo de nuevo más tarde.", "v2.component.lockout.default.title": "Cuenta no disponible", + "v2.component.navbar.default.item-back-button-label": "Atrás", "v2.component.new-password-field.default.password-policy-alphabet": "Contiene un alfabeto", "v2.component.new-password-field.default.password-policy-digit": "Contiene un dígito", "v2.component.new-password-field.default.password-policy-lowercase": "Contiene una letra en minúscula", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Mostrar contraseña", "v2.component.phone-input.default.no-results-found": "No se encontraron resultados", "v2.component.phone-input.default.search-label": "Buscar", + "v2.component.select-input.default.no-results-found": "No se encontraron resultados", + "v2.component.select-input.default.not-provided-label": "No proporcionado", + "v2.component.select-input.default.search-label": "Buscar", + "v2.component.select-input.default.unset-label": "Sin establecer", "v2.component.toc-pp-footer.default.label": "Al registrarte, aceptas los {variant, select, both{
Términos de Servicio y Política de Privacidad} termsOnly{Términos de Servicio} privacyOnly{Política de Privacidad} other{}}", "v2.component.verify-bot-protection.default.description": "Serás redirigido poco después de que completes el desafío", "v2.component.verify-bot-protection.default.title": "Verificando tu sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Has iniciado sesión con {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Procede para continuar.", "v2.page.select-account.default.title": "Iniciar sesión en {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Usar otra cuenta", + "v2.page.settings-profile-edit-address.default.country-label": "País", + "v2.page.settings-profile-edit-address.default.locality-label": "Ciudad", + "v2.page.settings-profile-edit-address.default.navbar-title": "Dirección", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Código postal", + "v2.page.settings-profile-edit-address.default.region-label": "Región", + "v2.page.settings-profile-edit-address.default.street-label": "Dirección de calle", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Fecha de nacimiento", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personalizado", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Femenino", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Masculino", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "No proporcionado", + "v2.page.settings-profile-edit-gender.default.title": "Género", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Idioma", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Apellido", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nombre completo", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Nombre", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Segundo nombre", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nombre", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Apodo", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Zona horaria", + "v2.page.settings-profile-no-permission.default.content": "No autorizado", + "v2.page.settings-profile-no-permission.default.title": "Problemas inesperados", + "v2.page.settings-profile.default.address-title": "Dirección", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "No proporcionado", + "v2.page.settings-profile.default.birthdate-title": "Fecha de nacimiento", + "v2.page.settings-profile.default.button-label-add-picture": "Agregar foto de perfil", + "v2.page.settings-profile.default.button-label-remove-picture": "Eliminar foto de perfil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Subir nueva foto", + "v2.page.settings-profile.default.gender-title": "Género", + "v2.page.settings-profile.default.language-title": "Idioma", + "v2.page.settings-profile.default.name-title": "Nombre", + "v2.page.settings-profile.default.navbar-title": "Perfil", + "v2.page.settings-profile.default.profile-picture-title": "Foto de perfil", + "v2.page.settings-profile.default.zoneinfo-title": "Zona horaria", "v2.page.settings.default.button-label-advanced-settings": "Configuración avanzada", - "v2.page.settings.default.button-label-and-more": "y más", + "v2.page.settings.default.button-label-and-more": "{item} y más", "v2.page.settings.default.button-label-back-to-app": "Volver a mi aplicación", "v2.page.settings.default.button-label-biometric-login": "Inicio de sesión biométrico", "v2.page.settings.default.button-label-email": "Correo electrónico", diff --git a/resources/authgear/templates/es-ES/translation.json b/resources/authgear/templates/es-ES/translation.json index 45154fbdfe..48b50ff1fe 100644 --- a/resources/authgear/templates/es-ES/translation.json +++ b/resources/authgear/templates/es-ES/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continuar con el número de teléfono", "v2.component.button.default.label-continue-with-text-login-id": "Continuar con {variant, select, email {Correo electrónico} username {Nombre de usuario} other {Correo electrónico / Nombre de usuario}}", "v2.component.button.default.label-login": "Iniciar sesión", + "v2.component.button.default.label-save": "Guardar", "v2.component.button.default.label-send": "Enviar", "v2.component.device-token-checkbox.default.label": "Recordar este dispositivo y no preguntar de nuevo", "v2.component.divider.default.or-label": "o", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Reintentar en %s", "v2.component.lockout.default.subtitle": "Esta cuenta ha sido bloqueada debido a demasiados intentos. Inténtalo de nuevo más tarde.", "v2.component.lockout.default.title": "Cuenta no disponible", + "v2.component.navbar.default.item-back-button-label": "Atrás", "v2.component.new-password-field.default.password-policy-alphabet": "Contiene un alfabeto", "v2.component.new-password-field.default.password-policy-digit": "Contiene un dígito", "v2.component.new-password-field.default.password-policy-lowercase": "Contiene una letra en minúscula", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Mostrar contraseña", "v2.component.phone-input.default.no-results-found": "No se encontraron resultados", "v2.component.phone-input.default.search-label": "Buscar", + "v2.component.select-input.default.no-results-found": "No se encontraron resultados", + "v2.component.select-input.default.not-provided-label": "No proporcionado", + "v2.component.select-input.default.search-label": "Buscar", + "v2.component.select-input.default.unset-label": "Sin establecer", "v2.component.toc-pp-footer.default.label": "Al registrarse, acepta los {variant, select, both{Términos de servicio y Política de privacidad} termsOnly{Términos de servicio} privacyOnly{Política de privacidad} other{}}", "v2.component.verify-bot-protection.default.description": "Serás redirigido poco después de que hayas completado el desafío", "v2.component.verify-bot-protection.default.title": "Comprobando tu sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Has iniciado sesión con {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Procede para continuar.", "v2.page.select-account.default.title": "Iniciar sesión en {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Usar otra cuenta", + "v2.page.settings-profile-edit-address.default.country-label": "País", + "v2.page.settings-profile-edit-address.default.locality-label": "Ciudad", + "v2.page.settings-profile-edit-address.default.navbar-title": "Dirección", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Código postal", + "v2.page.settings-profile-edit-address.default.region-label": "Región", + "v2.page.settings-profile-edit-address.default.street-label": "Dirección de calle", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Fecha de nacimiento", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personalizado", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Mujer", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Hombre", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "No proporcionado", + "v2.page.settings-profile-edit-gender.default.title": "Género", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Idioma", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Apellido", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nombre completo", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Nombre", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Segundo nombre", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nombre", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Apodo", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Zona horaria", + "v2.page.settings-profile-no-permission.default.content": "No autorizado", + "v2.page.settings-profile-no-permission.default.title": "Problemas inesperados", + "v2.page.settings-profile.default.address-title": "Dirección", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "No proporcionado", + "v2.page.settings-profile.default.birthdate-title": "Fecha de nacimiento", + "v2.page.settings-profile.default.button-label-add-picture": "Añadir foto de perfil", + "v2.page.settings-profile.default.button-label-remove-picture": "Eliminar foto de perfil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Subir nueva foto", + "v2.page.settings-profile.default.gender-title": "Género", + "v2.page.settings-profile.default.language-title": "Idioma", + "v2.page.settings-profile.default.name-title": "Nombre", + "v2.page.settings-profile.default.navbar-title": "Perfil", + "v2.page.settings-profile.default.profile-picture-title": "Foto de perfil", + "v2.page.settings-profile.default.zoneinfo-title": "Zona horaria", "v2.page.settings.default.button-label-advanced-settings": "Configuración avanzada", - "v2.page.settings.default.button-label-and-more": "y más", + "v2.page.settings.default.button-label-and-more": "{item} y más", "v2.page.settings.default.button-label-back-to-app": "Volver a mi aplicación", "v2.page.settings.default.button-label-biometric-login": "Inicio de sesión biométrico", "v2.page.settings.default.button-label-email": "Correo electrónico", diff --git a/resources/authgear/templates/es/translation.json b/resources/authgear/templates/es/translation.json index 6b16370f90..46134bd037 100644 --- a/resources/authgear/templates/es/translation.json +++ b/resources/authgear/templates/es/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continuar con número de teléfono", "v2.component.button.default.label-continue-with-text-login-id": "Continuar con {variant, select, email {Correo electrónico} username {Nombre de usuario} other {Correo electrónico / Nombre de usuario}}", "v2.component.button.default.label-login": "Iniciar Sesión", + "v2.component.button.default.label-save": "Guardar", "v2.component.button.default.label-send": "Enviar", "v2.component.device-token-checkbox.default.label": "Recordar este dispositivo y no preguntar de nuevo", "v2.component.divider.default.or-label": "o", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Reintentar en %s", "v2.component.lockout.default.subtitle": "Esta cuenta ha sido bloqueada debido a demasiados intentos. Por favor, inténtelo de nuevo más tarde.", "v2.component.lockout.default.title": "Cuenta no disponible", + "v2.component.navbar.default.item-back-button-label": "Atrás", "v2.component.new-password-field.default.password-policy-alphabet": "Contiene un alfabeto", "v2.component.new-password-field.default.password-policy-digit": "Contiene un dígito", "v2.component.new-password-field.default.password-policy-lowercase": "Contiene una letra minúscula", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Mostrar contraseña", "v2.component.phone-input.default.no-results-found": "No se encontraron resultados", "v2.component.phone-input.default.search-label": "Buscar", + "v2.component.select-input.default.no-results-found": "No se encontraron resultados", + "v2.component.select-input.default.not-provided-label": "No proporcionado", + "v2.component.select-input.default.search-label": "Buscar", + "v2.component.select-input.default.unset-label": "Sin establecer", "v2.component.toc-pp-footer.default.label": "Al registrarse, acepta los {variant, select, both{Términos de Servicio y la Política de Privacidad} termsOnly{Términos de Servicio} privacyOnly{Política de Privacidad} other{}}", "v2.component.verify-bot-protection.default.description": "Serás redirigido poco después de que hayas completado el desafío", "v2.component.verify-bot-protection.default.title": "Comprobando tu sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Ha iniciado sesión con {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Proceda para continuar.", "v2.page.select-account.default.title": "Iniciar sesión en {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Usar otra cuenta", + "v2.page.settings-profile-edit-address.default.country-label": "País", + "v2.page.settings-profile-edit-address.default.locality-label": "Ciudad", + "v2.page.settings-profile-edit-address.default.navbar-title": "Dirección", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Código postal", + "v2.page.settings-profile-edit-address.default.region-label": "Región", + "v2.page.settings-profile-edit-address.default.street-label": "Dirección de calle", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Fecha de nacimiento", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personalizado", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Femenino", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Masculino", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "No proporcionado", + "v2.page.settings-profile-edit-gender.default.title": "Género", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Idioma", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Apellido", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nombre completo", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Nombre", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Segundo nombre", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nombre", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Apodo", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Zona horaria", + "v2.page.settings-profile-no-permission.default.content": "No autorizado", + "v2.page.settings-profile-no-permission.default.title": "Problemas inesperados", + "v2.page.settings-profile.default.address-title": "Dirección", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "No proporcionado", + "v2.page.settings-profile.default.birthdate-title": "Fecha de nacimiento", + "v2.page.settings-profile.default.button-label-add-picture": "Agregar foto de perfil", + "v2.page.settings-profile.default.button-label-remove-picture": "Eliminar foto de perfil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Subir nueva foto", + "v2.page.settings-profile.default.gender-title": "Género", + "v2.page.settings-profile.default.language-title": "Idioma", + "v2.page.settings-profile.default.name-title": "Nombre", + "v2.page.settings-profile.default.navbar-title": "Perfil", + "v2.page.settings-profile.default.profile-picture-title": "Foto de perfil", + "v2.page.settings-profile.default.zoneinfo-title": "Zona horaria", "v2.page.settings.default.button-label-advanced-settings": "Configuración avanzada", - "v2.page.settings.default.button-label-and-more": "y más", + "v2.page.settings.default.button-label-and-more": "{item} y más", "v2.page.settings.default.button-label-back-to-app": "Volver a mi aplicación", "v2.page.settings.default.button-label-biometric-login": "Inicio de sesión biométrico", "v2.page.settings.default.button-label-email": "Correo electrónico", diff --git a/resources/authgear/templates/fil/translation.json b/resources/authgear/templates/fil/translation.json index e2e22525a3..a04ffdef24 100644 --- a/resources/authgear/templates/fil/translation.json +++ b/resources/authgear/templates/fil/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Magpatuloy gamit ang Numero ng Telepono", "v2.component.button.default.label-continue-with-text-login-id": "Magpatuloy gamit ang {variant, select, email {Email} username {Username} other {Email / Username}}", "v2.component.button.default.label-login": "Mag-log in", + "v2.component.button.default.label-save": "I-save", "v2.component.button.default.label-send": "Ipadala", "v2.component.device-token-checkbox.default.label": "Tandaan ang device na ito, at huwag nang tanungin muli", "v2.component.divider.default.or-label": "o", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Subukan Muli sa %s", "v2.component.lockout.default.subtitle": "Naka-lock ang account na ito dahil sa masyadong maraming pagsubok. Pakisubukang muli mamaya.", "v2.component.lockout.default.title": "Account Hindi Magagamit", + "v2.component.navbar.default.item-back-button-label": "Bumalik", "v2.component.new-password-field.default.password-policy-alphabet": "Naglalaman ng isang alpabeto", "v2.component.new-password-field.default.password-policy-digit": "Naglalaman ng isang numero", "v2.component.new-password-field.default.password-policy-lowercase": "Naglalaman ng isang maliit na titik", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Ipakita ang password", "v2.component.phone-input.default.no-results-found": "Walang nahanap na resulta", "v2.component.phone-input.default.search-label": "Maghanap", + "v2.component.select-input.default.no-results-found": "Walang natagpuang resulta", + "v2.component.select-input.default.not-provided-label": "Hindi ibinigay", + "v2.component.select-input.default.search-label": "Maghanap", + "v2.component.select-input.default.unset-label": "Hindi naka-set", "v2.component.toc-pp-footer.default.label": "Sa pamamagitan ng pagpaparehistro, sumasang-ayon ka sa {variant, select, both{Mga Tuntunin ng Serbisyo at Patakaran sa Pagkapribado} termsOnly{Mga Tuntunin ng Serbisyo} privacyOnly{Patakaran sa Pagkapribado} other{}}", "v2.component.verify-bot-protection.default.description": "Mailalipat ka sa ibang pahina pagkatapos mong makumpleto ang hamon na ito", "v2.component.verify-bot-protection.default.title": "Sinusuri ang iyong sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Nag-log in ka gamit ang {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Magpatuloy upang magpatuloy.", "v2.page.select-account.default.title": "Mag-log in sa {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Gumamit ng ibang account", + "v2.page.settings-profile-edit-address.default.country-label": "Bansa", + "v2.page.settings-profile-edit-address.default.locality-label": "Lungsod", + "v2.page.settings-profile-edit-address.default.navbar-title": "Adres", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Zip code", + "v2.page.settings-profile-edit-address.default.region-label": "Rehiyon", + "v2.page.settings-profile-edit-address.default.street-label": "Kalye", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Petsa ng kapanganakan", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Pasadya", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Babae", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Lalaki", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Hindi ibinigay", + "v2.page.settings-profile-edit-gender.default.title": "Kasarian", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Wika", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Huling pangalan", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Buong pangalan", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Pangalan", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Gitnang pangalan", + "v2.page.settings-profile-edit-name.default.navbar-title": "Pangalan", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Palayaw", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Zona ng oras", + "v2.page.settings-profile-no-permission.default.content": "Hindi awtorisado", + "v2.page.settings-profile-no-permission.default.title": "Di-inaasahang Isyu", + "v2.page.settings-profile.default.address-title": "Adres", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Hindi ibinigay", + "v2.page.settings-profile.default.birthdate-title": "Petsa ng Kapanganakan", + "v2.page.settings-profile.default.button-label-add-picture": "Magdagdag ng Larawan ng Profile", + "v2.page.settings-profile.default.button-label-remove-picture": "Alisin ang Larawan ng Profile", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Mag-upload ng Bagong Larawan", + "v2.page.settings-profile.default.gender-title": "Kasarian", + "v2.page.settings-profile.default.language-title": "Wika", + "v2.page.settings-profile.default.name-title": "Pangalan", + "v2.page.settings-profile.default.navbar-title": "Profile", + "v2.page.settings-profile.default.profile-picture-title": "Larawan ng Profile", + "v2.page.settings-profile.default.zoneinfo-title": "Zona ng Oras", "v2.page.settings.default.button-label-advanced-settings": "Mga Advanced na Setting", - "v2.page.settings.default.button-label-and-more": "at marami pang iba", + "v2.page.settings.default.button-label-and-more": "{item} at higit pa", "v2.page.settings.default.button-label-back-to-app": "Bumalik sa aking app", "v2.page.settings.default.button-label-biometric-login": "Pag-log in gamit ang Biometrics", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/fr/translation.json b/resources/authgear/templates/fr/translation.json index 684a45dcb4..c46f078b75 100644 --- a/resources/authgear/templates/fr/translation.json +++ b/resources/authgear/templates/fr/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continuer avec le numéro de téléphone", "v2.component.button.default.label-continue-with-text-login-id": "Continuer avec {variant, select, email {Email} username {Nom d''utilisateur} other {Email / Nom d''utilisateur}}", "v2.component.button.default.label-login": "Se connecter", + "v2.component.button.default.label-save": "Enregistrer", "v2.component.button.default.label-send": "Envoyer", "v2.component.device-token-checkbox.default.label": "Mémoriser cet appareil et ne plus me le demander", "v2.component.divider.default.or-label": "ou", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Réessayer dans %s", "v2.component.lockout.default.subtitle": "Ce compte a été verrouillé en raison de trop nombreuses tentatives. Veuillez réessayer plus tard.", "v2.component.lockout.default.title": "Compte indisponible", + "v2.component.navbar.default.item-back-button-label": "Retour", "v2.component.new-password-field.default.password-policy-alphabet": "Contient une lettre de l''alphabet", "v2.component.new-password-field.default.password-policy-digit": "Contient un chiffre", "v2.component.new-password-field.default.password-policy-lowercase": "Contient une lettre minuscule", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Afficher le mot de passe", "v2.component.phone-input.default.no-results-found": "Aucun résultat trouvé", "v2.component.phone-input.default.search-label": "Rechercher", + "v2.component.select-input.default.no-results-found": "Aucun résultat trouvé", + "v2.component.select-input.default.not-provided-label": "Non fourni", + "v2.component.select-input.default.search-label": "Rechercher", + "v2.component.select-input.default.unset-label": "Non défini", "v2.component.toc-pp-footer.default.label": "En vous inscrivant, vous acceptez les {variant, select, both{Conditions d''utilisation et Politique de confidentialité} termsOnly{Conditions d''utilisation} privacyOnly{Politique de confidentialité} other{}}", "v2.component.verify-bot-protection.default.description": "Vous serez redirigé peu après avoir terminé le défi", "v2.component.verify-bot-protection.default.title": "Vérification de votre système...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Vous vous êtes connecté avec {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Continuez pour poursuivre.", "v2.page.select-account.default.title": "Connectez-vous à {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Utiliser un autre compte", + "v2.page.settings-profile-edit-address.default.country-label": "Pays", + "v2.page.settings-profile-edit-address.default.locality-label": "Ville", + "v2.page.settings-profile-edit-address.default.navbar-title": "Adresse", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Code postal", + "v2.page.settings-profile-edit-address.default.region-label": "Région", + "v2.page.settings-profile-edit-address.default.street-label": "Adresse de rue", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Date de naissance", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personnalisé", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Femme", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Homme", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Non fourni", + "v2.page.settings-profile-edit-gender.default.title": "Genre", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Langue", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Nom de famille", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nom complet", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Prénom", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Deuxième prénom", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nom", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Surnom", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Fuseau horaire", + "v2.page.settings-profile-no-permission.default.content": "Non autorisé", + "v2.page.settings-profile-no-permission.default.title": "Problèmes inattendus", + "v2.page.settings-profile.default.address-title": "Adresse", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Non fourni", + "v2.page.settings-profile.default.birthdate-title": "Date de naissance", + "v2.page.settings-profile.default.button-label-add-picture": "Ajouter une photo de profil", + "v2.page.settings-profile.default.button-label-remove-picture": "Supprimer la photo de profil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Télécharger une nouvelle photo", + "v2.page.settings-profile.default.gender-title": "Genre", + "v2.page.settings-profile.default.language-title": "Langue", + "v2.page.settings-profile.default.name-title": "Nom", + "v2.page.settings-profile.default.navbar-title": "Profil", + "v2.page.settings-profile.default.profile-picture-title": "Photo de profil", + "v2.page.settings-profile.default.zoneinfo-title": "Fuseau horaire", "v2.page.settings.default.button-label-advanced-settings": "Paramètres avancés", - "v2.page.settings.default.button-label-and-more": "et plus", + "v2.page.settings.default.button-label-and-more": "{item} et plus", "v2.page.settings.default.button-label-back-to-app": "Retour à mon application", "v2.page.settings.default.button-label-biometric-login": "Connexion biométrique", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/id/translation.json b/resources/authgear/templates/id/translation.json index f638879262..e09df02054 100644 --- a/resources/authgear/templates/id/translation.json +++ b/resources/authgear/templates/id/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Lanjutkan dengan Nomor Telepon", "v2.component.button.default.label-continue-with-text-login-id": "Lanjutkan dengan {variant, select, email {Email} username {Nama Pengguna} other {Email / Nama Pengguna}}", "v2.component.button.default.label-login": "Masuk", + "v2.component.button.default.label-save": "Simpan", "v2.component.button.default.label-send": "Kirim", "v2.component.device-token-checkbox.default.label": "Ingat perangkat ini, dan jangan tanya lagi", "v2.component.divider.default.or-label": "atau", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Coba Lagi dalam %s", "v2.component.lockout.default.subtitle": "Akun ini telah dikunci karena terlalu banyak upaya. Silakan coba lagi nanti.", "v2.component.lockout.default.title": "Akun Tidak Tersedia", + "v2.component.navbar.default.item-back-button-label": "Kembali", "v2.component.new-password-field.default.password-policy-alphabet": "Mengandung huruf alfabet", "v2.component.new-password-field.default.password-policy-digit": "Mengandung angka", "v2.component.new-password-field.default.password-policy-lowercase": "Mengandung huruf kecil", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Tampilkan kata sandi", "v2.component.phone-input.default.no-results-found": "Tidak ada hasil yang ditemukan", "v2.component.phone-input.default.search-label": "Cari", + "v2.component.select-input.default.no-results-found": "Tidak ada hasil yang ditemukan", + "v2.component.select-input.default.not-provided-label": "Tidak disediakan", + "v2.component.select-input.default.search-label": "Cari", + "v2.component.select-input.default.unset-label": "Tidak diatur", "v2.component.toc-pp-footer.default.label": "Dengan mendaftar, Anda setuju dengan {variant, select, both{Syarat Layanan dan Kebijakan Privasi} termsOnly{Syarat Layanan} privacyOnly{Kebijakan Privasi} other{}}", "v2.component.verify-bot-protection.default.description": "Anda akan dialihkan setelah Anda menyelesaikan tantangan ini", "v2.component.verify-bot-protection.default.title": "Memeriksa sistem Anda...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Anda telah masuk dengan {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Lanjutkan untuk melanjutkan.", "v2.page.select-account.default.title": "Masuk ke {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Gunakan akun lain", + "v2.page.settings-profile-edit-address.default.country-label": "Negara", + "v2.page.settings-profile-edit-address.default.locality-label": "Kota", + "v2.page.settings-profile-edit-address.default.navbar-title": "Alamat", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Kode pos", + "v2.page.settings-profile-edit-address.default.region-label": "Wilayah", + "v2.page.settings-profile-edit-address.default.street-label": "Alamat jalan", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Tanggal lahir", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Kustom", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Perempuan", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Laki-laki", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Tidak diberikan", + "v2.page.settings-profile-edit-gender.default.title": "Jenis Kelamin", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Bahasa", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Nama keluarga", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nama lengkap", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Nama depan", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Nama tengah", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nama", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Nama panggilan", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Zona waktu", + "v2.page.settings-profile-no-permission.default.content": "Tidak diotorisasi", + "v2.page.settings-profile-no-permission.default.title": "Masalah yang Tidak Terduga", + "v2.page.settings-profile.default.address-title": "Alamat", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Tidak diberikan", + "v2.page.settings-profile.default.birthdate-title": "Tanggal Lahir", + "v2.page.settings-profile.default.button-label-add-picture": "Tambahkan Foto Profil", + "v2.page.settings-profile.default.button-label-remove-picture": "Hapus Foto Profil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Unggah Foto Baru", + "v2.page.settings-profile.default.gender-title": "Jenis Kelamin", + "v2.page.settings-profile.default.language-title": "Bahasa", + "v2.page.settings-profile.default.name-title": "Nama", + "v2.page.settings-profile.default.navbar-title": "Profil", + "v2.page.settings-profile.default.profile-picture-title": "Foto Profil", + "v2.page.settings-profile.default.zoneinfo-title": "Zona Waktu", "v2.page.settings.default.button-label-advanced-settings": "Pengaturan Lanjutan", - "v2.page.settings.default.button-label-and-more": "dan lainnya", + "v2.page.settings.default.button-label-and-more": "{item} dan lainnya", "v2.page.settings.default.button-label-back-to-app": "Kembali ke aplikasi saya", "v2.page.settings.default.button-label-biometric-login": "Login Biometrik", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/it/translation.json b/resources/authgear/templates/it/translation.json index 8c9e77ac48..c152a7a0dc 100644 --- a/resources/authgear/templates/it/translation.json +++ b/resources/authgear/templates/it/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continua con il numero di telefono", "v2.component.button.default.label-continue-with-text-login-id": "Continua con {variant, select, email {Email} username {Nome utente} other {Email / Nome utente}}", "v2.component.button.default.label-login": "Accedi", + "v2.component.button.default.label-save": "Salva", "v2.component.button.default.label-send": "Invia", "v2.component.device-token-checkbox.default.label": "Ricorda questo dispositivo e non chiedere più", "v2.component.divider.default.or-label": "oppure", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Riprova tra %s", "v2.component.lockout.default.subtitle": "Questo account è stato bloccato a causa di troppi tentativi. Per favore riprova più tardi.", "v2.component.lockout.default.title": "Account non disponibile", + "v2.component.navbar.default.item-back-button-label": "Indietro", "v2.component.new-password-field.default.password-policy-alphabet": "Contiene una lettera dell''alfabeto", "v2.component.new-password-field.default.password-policy-digit": "Contiene una cifra", "v2.component.new-password-field.default.password-policy-lowercase": "Contiene una lettera minuscola", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Mostra password", "v2.component.phone-input.default.no-results-found": "Nessun risultato trovato", "v2.component.phone-input.default.search-label": "Cerca", + "v2.component.select-input.default.no-results-found": "Nessun risultato trovato", + "v2.component.select-input.default.not-provided-label": "Non fornito", + "v2.component.select-input.default.search-label": "Cerca", + "v2.component.select-input.default.unset-label": "Non impostato", "v2.component.toc-pp-footer.default.label": "Registrandoti, accetti {variant, select, both{i Termini di servizio e l''Informativa sulla privacy} termsOnly{i Termini di servizio} privacyOnly{l''Informativa sulla privacy} other{}}", "v2.component.verify-bot-protection.default.description": "Verrai reindirizzato a breve dopo aver completato la sfida", "v2.component.verify-bot-protection.default.title": "Verifica del tuo sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Hai effettuato l''accesso con {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Procedi per continuare.", "v2.page.select-account.default.title": "Accedi a {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Usa un altro account", + "v2.page.settings-profile-edit-address.default.country-label": "Paese", + "v2.page.settings-profile-edit-address.default.locality-label": "Città", + "v2.page.settings-profile-edit-address.default.navbar-title": "Indirizzo", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Codice postale", + "v2.page.settings-profile-edit-address.default.region-label": "Regione", + "v2.page.settings-profile-edit-address.default.street-label": "Indirizzo stradale", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Data di nascita", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personalizzato", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Femmina", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Maschio", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Non fornito", + "v2.page.settings-profile-edit-gender.default.title": "Genere", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Lingua", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Cognome", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nome completo", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Nome", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Secondo nome", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nome", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Soprannome", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Fuso orario", + "v2.page.settings-profile-no-permission.default.content": "Non autorizzato", + "v2.page.settings-profile-no-permission.default.title": "Problemi imprevisti", + "v2.page.settings-profile.default.address-title": "Indirizzo", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Non fornito", + "v2.page.settings-profile.default.birthdate-title": "Data di nascita", + "v2.page.settings-profile.default.button-label-add-picture": "Aggiungi immagine del profilo", + "v2.page.settings-profile.default.button-label-remove-picture": "Rimuovi immagine del profilo", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Carica nuova immagine", + "v2.page.settings-profile.default.gender-title": "Genere", + "v2.page.settings-profile.default.language-title": "Lingua", + "v2.page.settings-profile.default.name-title": "Nome", + "v2.page.settings-profile.default.navbar-title": "Profilo", + "v2.page.settings-profile.default.profile-picture-title": "Immagine del profilo", + "v2.page.settings-profile.default.zoneinfo-title": "Fuso orario", "v2.page.settings.default.button-label-advanced-settings": "Impostazioni avanzate", - "v2.page.settings.default.button-label-and-more": "e altro", + "v2.page.settings.default.button-label-and-more": "{item} e altro", "v2.page.settings.default.button-label-back-to-app": "Torna alla mia app", "v2.page.settings.default.button-label-biometric-login": "Accesso biometrico", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/ja/translation.json b/resources/authgear/templates/ja/translation.json index 23bf17cde8..6e05573bca 100644 --- a/resources/authgear/templates/ja/translation.json +++ b/resources/authgear/templates/ja/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "電話番号で続ける", "v2.component.button.default.label-continue-with-text-login-id": "{variant, select, email {メール} username {ユーザー名} other {メール / ユーザー名}}で続ける", "v2.component.button.default.label-login": "ログイン", + "v2.component.button.default.label-save": "保存", "v2.component.button.default.label-send": "送信", "v2.component.device-token-checkbox.default.label": "このデバイスを記憶し、次回以降の確認を省略する", "v2.component.divider.default.or-label": "または", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "%sで再試行", "v2.component.lockout.default.subtitle": "このアカウントは試行回数超過のため、ロックされています。しばらくしてから再試行してください。", "v2.component.lockout.default.title": "アカウントが利用できません", + "v2.component.navbar.default.item-back-button-label": "戻る", "v2.component.new-password-field.default.password-policy-alphabet": "アルファベットを含む", "v2.component.new-password-field.default.password-policy-digit": "数字を含む", "v2.component.new-password-field.default.password-policy-lowercase": "小文字を含む", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "パスワードを表示する", "v2.component.phone-input.default.no-results-found": "結果が見つかりませんでした", "v2.component.phone-input.default.search-label": "検索", + "v2.component.select-input.default.no-results-found": "結果が見つかりません", + "v2.component.select-input.default.not-provided-label": "未提供", + "v2.component.select-input.default.search-label": "検索", + "v2.component.select-input.default.unset-label": "未設定", "v2.component.toc-pp-footer.default.label": "登録することで、{variant, select, both{利用規約プライバシーポリシー}termsOnly{利用規約}privacyOnly{プライバシーポリシー}other{}}に同意したことになります。", "v2.component.verify-bot-protection.default.description": "チャレンジを完了した後、すぐにリダイレクトされます。", "v2.component.verify-bot-protection.default.title": "システムを確認しています...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "{email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}でログインしました。続行するにはこのアカウントを使用してください。", "v2.page.select-account.default.title": "{AppOrClientName}にログイン", "v2.page.select-account.default.use-another-account": "別のアカウントを使用", + "v2.page.settings-profile-edit-address.default.country-label": "国", + "v2.page.settings-profile-edit-address.default.locality-label": "市区町村", + "v2.page.settings-profile-edit-address.default.navbar-title": "住所", + "v2.page.settings-profile-edit-address.default.postal-code-label": "郵便番号", + "v2.page.settings-profile-edit-address.default.region-label": "地域", + "v2.page.settings-profile-edit-address.default.street-label": "住所", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "生年月日", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "カスタム", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "女性", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "男性", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "提供されていません", + "v2.page.settings-profile-edit-gender.default.title": "性別", + "v2.page.settings-profile-edit-locale.default.navbar-title": "言語", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "姓", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "フルネーム", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "名", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "ミドルネーム", + "v2.page.settings-profile-edit-name.default.navbar-title": "名前", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "ニックネーム", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "タイムゾーン", + "v2.page.settings-profile-no-permission.default.content": "権限がありません", + "v2.page.settings-profile-no-permission.default.title": "予期しない問題", + "v2.page.settings-profile.default.address-title": "住所", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "提供されていません", + "v2.page.settings-profile.default.birthdate-title": "生年月日", + "v2.page.settings-profile.default.button-label-add-picture": "プロフィール画像を追加", + "v2.page.settings-profile.default.button-label-remove-picture": "プロフィール画像を削除", + "v2.page.settings-profile.default.button-label-upload-new-picture": "新しい画像をアップロード", + "v2.page.settings-profile.default.gender-title": "性別", + "v2.page.settings-profile.default.language-title": "言語", + "v2.page.settings-profile.default.name-title": "名前", + "v2.page.settings-profile.default.navbar-title": "プロフィール", + "v2.page.settings-profile.default.profile-picture-title": "プロフィール画像", + "v2.page.settings-profile.default.zoneinfo-title": "タイムゾーン", "v2.page.settings.default.button-label-advanced-settings": "高度な設定", - "v2.page.settings.default.button-label-and-more": "その他", + "v2.page.settings.default.button-label-and-more": "{item} 他", "v2.page.settings.default.button-label-back-to-app": "アプリに戻る", "v2.page.settings.default.button-label-biometric-login": "生体認証ログイン", "v2.page.settings.default.button-label-email": "メール", diff --git a/resources/authgear/templates/ko/translation.json b/resources/authgear/templates/ko/translation.json index b0c8b7011f..691889c871 100644 --- a/resources/authgear/templates/ko/translation.json +++ b/resources/authgear/templates/ko/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "전화번호로 계속하기", "v2.component.button.default.label-continue-with-text-login-id": "{variant, select, email {이메일} username {사용자 이름} other {이메일 / 사용자 이름}}로 계속하기", "v2.component.button.default.label-login": "로그인", + "v2.component.button.default.label-save": "저장", "v2.component.button.default.label-send": "보내기", "v2.component.device-token-checkbox.default.label": "이 기기를 기억하고 다시 묻지 않기", "v2.component.divider.default.or-label": "또는", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "%s 후에 다시 시도", "v2.component.lockout.default.subtitle": "이 계정이 너무 많은 시도로 인해 잠겼습니다. 나중에 다시 시도해 주세요.", "v2.component.lockout.default.title": "계정 사용 불가", + "v2.component.navbar.default.item-back-button-label": "뒤로", "v2.component.new-password-field.default.password-policy-alphabet": "영문자 포함", "v2.component.new-password-field.default.password-policy-digit": "숫자 포함", "v2.component.new-password-field.default.password-policy-lowercase": "소문자 포함", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "비밀번호 표시", "v2.component.phone-input.default.no-results-found": "결과가 없습니다", "v2.component.phone-input.default.search-label": "검색", + "v2.component.select-input.default.no-results-found": "결과가 없습니다", + "v2.component.select-input.default.not-provided-label": "제공되지 않음", + "v2.component.select-input.default.search-label": "검색", + "v2.component.select-input.default.unset-label": "설정 해제", "v2.component.toc-pp-footer.default.label": "가입하면 {variant, select, both{서비스 약관개인정보 보호정책} termsOnly{서비스 약관} privacyOnly{개인정보 보호정책} other{}}에 동의하는 것으로 간주됩니다.", "v2.component.verify-bot-protection.default.description": "챌린지를 완료한 후 곧 리디렉션됩니다.", "v2.component.verify-bot-protection.default.title": "시스템 확인 중...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "당신은 {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}로 로그인했습니다. 계속하려면 진행하세요.", "v2.page.select-account.default.title": "{AppOrClientName}에 로그인", "v2.page.select-account.default.use-another-account": "다른 계정 사용", + "v2.page.settings-profile-edit-address.default.country-label": "국가", + "v2.page.settings-profile-edit-address.default.locality-label": "도시", + "v2.page.settings-profile-edit-address.default.navbar-title": "주소", + "v2.page.settings-profile-edit-address.default.postal-code-label": "우편번호", + "v2.page.settings-profile-edit-address.default.region-label": "지역", + "v2.page.settings-profile-edit-address.default.street-label": "거리 주소", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "생년월일", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "사용자 정의", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "여성", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "남성", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "제공되지 않음", + "v2.page.settings-profile-edit-gender.default.title": "성별", + "v2.page.settings-profile-edit-locale.default.navbar-title": "언어", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "성", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "전체 이름", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "이름", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "중간 이름", + "v2.page.settings-profile-edit-name.default.navbar-title": "이름", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "닉네임", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "시간대", + "v2.page.settings-profile-no-permission.default.content": "권한 없음", + "v2.page.settings-profile-no-permission.default.title": "예기치 않은 문제", + "v2.page.settings-profile.default.address-title": "주소", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "제공되지 않음", + "v2.page.settings-profile.default.birthdate-title": "생년월일", + "v2.page.settings-profile.default.button-label-add-picture": "프로필 사진 추가", + "v2.page.settings-profile.default.button-label-remove-picture": "프로필 사진 제거", + "v2.page.settings-profile.default.button-label-upload-new-picture": "새 사진 업로드", + "v2.page.settings-profile.default.gender-title": "성별", + "v2.page.settings-profile.default.language-title": "언어", + "v2.page.settings-profile.default.name-title": "이름", + "v2.page.settings-profile.default.navbar-title": "프로필", + "v2.page.settings-profile.default.profile-picture-title": "프로필 사진", + "v2.page.settings-profile.default.zoneinfo-title": "시간대", "v2.page.settings.default.button-label-advanced-settings": "고급 설정", - "v2.page.settings.default.button-label-and-more": "그리고 더 많은 것들", + "v2.page.settings.default.button-label-and-more": "{item} 및 기타", "v2.page.settings.default.button-label-back-to-app": "앱으로 돌아가기", "v2.page.settings.default.button-label-biometric-login": "생체 인증 로그인", "v2.page.settings.default.button-label-email": "이메일", diff --git a/resources/authgear/templates/ms/translation.json b/resources/authgear/templates/ms/translation.json index ac6470e23d..c186eca926 100644 --- a/resources/authgear/templates/ms/translation.json +++ b/resources/authgear/templates/ms/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Teruskan dengan Nombor Telefon", "v2.component.button.default.label-continue-with-text-login-id": "Teruskan dengan {variant, select, email {Email} username {Nama Pengguna} other {Email / Nama Pengguna}}", "v2.component.button.default.label-login": "Log masuk", + "v2.component.button.default.label-save": "Simpan", "v2.component.button.default.label-send": "Hantar", "v2.component.device-token-checkbox.default.label": "Ingat peranti ini, dan jangan tanya lagi", "v2.component.divider.default.or-label": "atau", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Cuba Lagi dalam %s", "v2.component.lockout.default.subtitle": "Akaun ini telah dikunci kerana terlalu banyak percubaan. Sila cuba lagi nanti.", "v2.component.lockout.default.title": "Akaun Tidak Tersedia", + "v2.component.navbar.default.item-back-button-label": "Undur", "v2.component.new-password-field.default.password-policy-alphabet": "Mengandungi abjad", "v2.component.new-password-field.default.password-policy-digit": "Mengandungi digit", "v2.component.new-password-field.default.password-policy-lowercase": "Mengandungi huruf kecil", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Tunjukkan kata laluan", "v2.component.phone-input.default.no-results-found": "Tiada hasil ditemui", "v2.component.phone-input.default.search-label": "Cari", + "v2.component.select-input.default.no-results-found": "Tiada hasil ditemui", + "v2.component.select-input.default.not-provided-label": "Tidak disediakan", + "v2.component.select-input.default.search-label": "Carian", + "v2.component.select-input.default.unset-label": "Nyahtetap", "v2.component.toc-pp-footer.default.label": "Dengan mendaftar, anda bersetuju dengan {variant, select, both{Terma Perkhidmatan dan Dasar Privasi} termsOnly{Terma Perkhidmatan} privacyOnly{Dasar Privasi} other{}}", "v2.component.verify-bot-protection.default.description": "Anda akan dialihkan tidak lama selepas anda melengkapkan cabaran", "v2.component.verify-bot-protection.default.title": "Menyemak sistem anda...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Anda telah log masuk dengan {IdentityDisplayName}. Teruskan untuk meneruskan.", "v2.page.select-account.default.title": "Log masuk ke {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Gunakan akaun lain", + "v2.page.settings-profile-edit-address.default.country-label": "Negara", + "v2.page.settings-profile-edit-address.default.locality-label": "Bandar", + "v2.page.settings-profile-edit-address.default.navbar-title": "Alamat", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Kod pos", + "v2.page.settings-profile-edit-address.default.region-label": "Wilayah", + "v2.page.settings-profile-edit-address.default.street-label": "Alamat jalan", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Tarikh lahir", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Tersuai", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Perempuan", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Lelaki", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Tidak diberikan", + "v2.page.settings-profile-edit-gender.default.title": "Jantina", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Bahasa", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Nama keluarga", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nama penuh", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Nama pertama", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Nama tengah", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nama", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Nama samaran", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Zon masa", + "v2.page.settings-profile-no-permission.default.content": "Tidak dibenarkan", + "v2.page.settings-profile-no-permission.default.title": "Isu Tidak Dijangka", + "v2.page.settings-profile.default.address-title": "Alamat", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Tidak diberikan", + "v2.page.settings-profile.default.birthdate-title": "Tarikh Lahir", + "v2.page.settings-profile.default.button-label-add-picture": "Tambah Gambar Profil", + "v2.page.settings-profile.default.button-label-remove-picture": "Buang Gambar Profil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Muat Naik Gambar Baru", + "v2.page.settings-profile.default.gender-title": "Jantina", + "v2.page.settings-profile.default.language-title": "Bahasa", + "v2.page.settings-profile.default.name-title": "Nama", + "v2.page.settings-profile.default.navbar-title": "Profil", + "v2.page.settings-profile.default.profile-picture-title": "Gambar Profil", + "v2.page.settings-profile.default.zoneinfo-title": "Zon Masa", "v2.page.settings.default.button-label-advanced-settings": "Tetapan Lanjutan", - "v2.page.settings.default.button-label-and-more": "dan lebih banyak lagi", + "v2.page.settings.default.button-label-and-more": "{item} dan lagi", "v2.page.settings.default.button-label-back-to-app": "Kembali ke aplikasi saya", "v2.page.settings.default.button-label-biometric-login": "Log Masuk Biometrik", "v2.page.settings.default.button-label-email": "E-mel", diff --git a/resources/authgear/templates/nl/translation.json b/resources/authgear/templates/nl/translation.json index d1b4fae08d..02a547af9f 100644 --- a/resources/authgear/templates/nl/translation.json +++ b/resources/authgear/templates/nl/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Doorgaan met telefoonnummer", "v2.component.button.default.label-continue-with-text-login-id": "Ga verder met {variant, select, email {E-mail} username {Gebruikersnaam} other {E-mail / Gebruikersnaam}}", "v2.component.button.default.label-login": "Inloggen", + "v2.component.button.default.label-save": "Opslaan", "v2.component.button.default.label-send": "Verzenden", "v2.component.device-token-checkbox.default.label": "Onthoud dit apparaat, en vraag niet opnieuw", "v2.component.divider.default.or-label": "of", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Opnieuw proberen in %s", "v2.component.lockout.default.subtitle": "Dit account is vergrendeld vanwege te veel pogingen. Probeer het later opnieuw.", "v2.component.lockout.default.title": "Account niet beschikbaar", + "v2.component.navbar.default.item-back-button-label": "Terug", "v2.component.new-password-field.default.password-policy-alphabet": "Bevat een alfabet", "v2.component.new-password-field.default.password-policy-digit": "Bevat een cijfer", "v2.component.new-password-field.default.password-policy-lowercase": "Bevat een kleine letter", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Wachtwoord tonen", "v2.component.phone-input.default.no-results-found": "Geen resultaten gevonden", "v2.component.phone-input.default.search-label": "Zoeken", + "v2.component.select-input.default.no-results-found": "Geen resultaten gevonden", + "v2.component.select-input.default.not-provided-label": "Niet opgegeven", + "v2.component.select-input.default.search-label": "Zoeken", + "v2.component.select-input.default.unset-label": "Niet ingesteld", "v2.component.toc-pp-footer.default.label": "Door je te registreren, ga je akkoord met de {variant, select, both{Servicevoorwaarden en Privacybeleid} termsOnly{Servicevoorwaarden} privacyOnly{Privacybeleid} other{}}", "v2.component.verify-bot-protection.default.description": "U wordt binnenkort doorgestuurd nadat u de uitdaging heeft voltooid", "v2.component.verify-bot-protection.default.title": "Uw systeem controleren...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "U bent ingelogd met {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Ga verder om door te gaan.", "v2.page.select-account.default.title": "Log in op {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Gebruik een ander account", + "v2.page.settings-profile-edit-address.default.country-label": "Land", + "v2.page.settings-profile-edit-address.default.locality-label": "Stad", + "v2.page.settings-profile-edit-address.default.navbar-title": "Adres", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Postcode", + "v2.page.settings-profile-edit-address.default.region-label": "Regio", + "v2.page.settings-profile-edit-address.default.street-label": "Straatnaam", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Geboortedatum", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Aangepast", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Vrouw", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Man", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Niet opgegeven", + "v2.page.settings-profile-edit-gender.default.title": "Geslacht", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Taal", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Achternaam", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Volledige naam", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Voornaam", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Tweede naam", + "v2.page.settings-profile-edit-name.default.navbar-title": "Naam", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Bijnaam", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Tijdzone", + "v2.page.settings-profile-no-permission.default.content": "Niet geautoriseerd", + "v2.page.settings-profile-no-permission.default.title": "Onverwachte problemen", + "v2.page.settings-profile.default.address-title": "Adres", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Niet opgegeven", + "v2.page.settings-profile.default.birthdate-title": "Geboortedatum", + "v2.page.settings-profile.default.button-label-add-picture": "Profielfoto toevoegen", + "v2.page.settings-profile.default.button-label-remove-picture": "Profielfoto verwijderen", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Nieuwe foto uploaden", + "v2.page.settings-profile.default.gender-title": "Geslacht", + "v2.page.settings-profile.default.language-title": "Taal", + "v2.page.settings-profile.default.name-title": "Naam", + "v2.page.settings-profile.default.navbar-title": "Profiel", + "v2.page.settings-profile.default.profile-picture-title": "Profielfoto", + "v2.page.settings-profile.default.zoneinfo-title": "Tijdzone", "v2.page.settings.default.button-label-advanced-settings": "Geavanceerde Instellingen", - "v2.page.settings.default.button-label-and-more": "en meer", + "v2.page.settings.default.button-label-and-more": "{item} en meer", "v2.page.settings.default.button-label-back-to-app": "Terug naar mijn app", "v2.page.settings.default.button-label-biometric-login": "Biometrische Login", "v2.page.settings.default.button-label-email": "E-mail", diff --git a/resources/authgear/templates/pl/translation.json b/resources/authgear/templates/pl/translation.json index 28dbb9409c..7f0dd80429 100644 --- a/resources/authgear/templates/pl/translation.json +++ b/resources/authgear/templates/pl/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Kontynuuj z numerem telefonu", "v2.component.button.default.label-continue-with-text-login-id": "Kontynuuj przez {variant, select, email {Email} username {Nazwę użytkownika} other {Email / Nazwę użytkownika}}", "v2.component.button.default.label-login": "Zaloguj się", + "v2.component.button.default.label-save": "Zapisz", "v2.component.button.default.label-send": "Wyślij", "v2.component.device-token-checkbox.default.label": "Zapamiętaj to urządzenie i nie pytaj ponownie", "v2.component.divider.default.or-label": "lub", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Spróbuj ponownie za %s", "v2.component.lockout.default.subtitle": "To konto zostało zablokowane z powodu zbyt wielu prób. Spróbuj ponownie później.", "v2.component.lockout.default.title": "Konto niedostępne", + "v2.component.navbar.default.item-back-button-label": "Wstecz", "v2.component.new-password-field.default.password-policy-alphabet": "Zawiera literę alfabetu", "v2.component.new-password-field.default.password-policy-digit": "Zawiera cyfrę", "v2.component.new-password-field.default.password-policy-lowercase": "Zawiera małą literę", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Pokaż hasło", "v2.component.phone-input.default.no-results-found": "Nie znaleziono wyników", "v2.component.phone-input.default.search-label": "Szukaj", + "v2.component.select-input.default.no-results-found": "Nie znaleziono wyników", + "v2.component.select-input.default.not-provided-label": "Nie podano", + "v2.component.select-input.default.search-label": "Szukaj", + "v2.component.select-input.default.unset-label": "Niezdefiniowane", "v2.component.toc-pp-footer.default.label": "Rejestrując się, zgadzasz się na {variant, select, both{Warunki Korzystania i Politykę Prywatności} termsOnly{Warunki Korzystania} privacyOnly{Politykę Prywatności} other{}}", "v2.component.verify-bot-protection.default.description": "Zostaniesz przekierowany wkrótce po ukończeniu wyzwania", "v2.component.verify-bot-protection.default.title": "Sprawdzanie Twojego systemu...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Zalogowałeś się za pomocą {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Kontynuuj, aby przejść dalej.", "v2.page.select-account.default.title": "Zaloguj się do {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Użyj innego konta", + "v2.page.settings-profile-edit-address.default.country-label": "Kraj", + "v2.page.settings-profile-edit-address.default.locality-label": "Miasto", + "v2.page.settings-profile-edit-address.default.navbar-title": "Adres", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Kod pocztowy", + "v2.page.settings-profile-edit-address.default.region-label": "Region", + "v2.page.settings-profile-edit-address.default.street-label": "Adres ulicy", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Data urodzenia", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Niestandardowa", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Kobieta", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Mężczyzna", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Nie podano", + "v2.page.settings-profile-edit-gender.default.title": "Płeć", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Język", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Nazwisko", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Pełne imię i nazwisko", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Imię", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Drugie imię", + "v2.page.settings-profile-edit-name.default.navbar-title": "Imię", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Przezwisko", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Strefa czasowa", + "v2.page.settings-profile-no-permission.default.content": "Brak autoryzacji", + "v2.page.settings-profile-no-permission.default.title": "Nieoczekiwane problemy", + "v2.page.settings-profile.default.address-title": "Adres", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Nie podano", + "v2.page.settings-profile.default.birthdate-title": "Data urodzenia", + "v2.page.settings-profile.default.button-label-add-picture": "Dodaj zdjęcie profilowe", + "v2.page.settings-profile.default.button-label-remove-picture": "Usuń zdjęcie profilowe", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Prześlij nowe zdjęcie", + "v2.page.settings-profile.default.gender-title": "Płeć", + "v2.page.settings-profile.default.language-title": "Język", + "v2.page.settings-profile.default.name-title": "Nazwa", + "v2.page.settings-profile.default.navbar-title": "Profil", + "v2.page.settings-profile.default.profile-picture-title": "Zdjęcie profilowe", + "v2.page.settings-profile.default.zoneinfo-title": "Strefa czasowa", "v2.page.settings.default.button-label-advanced-settings": "Zaawansowane ustawienia", - "v2.page.settings.default.button-label-and-more": "i więcej", + "v2.page.settings.default.button-label-and-more": "{item} i więcej", "v2.page.settings.default.button-label-back-to-app": "Powrót do mojej aplikacji", "v2.page.settings.default.button-label-biometric-login": "Logowanie biometryczne", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/pt-BR/translation.json b/resources/authgear/templates/pt-BR/translation.json index 273c6694f6..12dd622b2a 100644 --- a/resources/authgear/templates/pt-BR/translation.json +++ b/resources/authgear/templates/pt-BR/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continuar com o Número de Telefone", "v2.component.button.default.label-continue-with-text-login-id": "Continuar com {variant, select, email {Email} username {Nome de Usuário} other {Email / Nome de Usuário}}", "v2.component.button.default.label-login": "Entrar", + "v2.component.button.default.label-save": "Salvar", "v2.component.button.default.label-send": "Enviar", "v2.component.device-token-checkbox.default.label": "Lembrar este dispositivo e não perguntar novamente", "v2.component.divider.default.or-label": "ou", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Tentar novamente em %s", "v2.component.lockout.default.subtitle": "Esta conta foi bloqueada devido a muitas tentativas. Tente novamente mais tarde.", "v2.component.lockout.default.title": "Conta Indisponível", + "v2.component.navbar.default.item-back-button-label": "Voltar", "v2.component.new-password-field.default.password-policy-alphabet": "Contém um alfabeto", "v2.component.new-password-field.default.password-policy-digit": "Contém um dígito", "v2.component.new-password-field.default.password-policy-lowercase": "Contém uma letra minúscula", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Mostrar senha", "v2.component.phone-input.default.no-results-found": "Nenhum resultado encontrado", "v2.component.phone-input.default.search-label": "Pesquisar", + "v2.component.select-input.default.no-results-found": "Nenhum resultado encontrado", + "v2.component.select-input.default.not-provided-label": "Não fornecido", + "v2.component.select-input.default.search-label": "Pesquisar", + "v2.component.select-input.default.unset-label": "Não definido", "v2.component.toc-pp-footer.default.label": "Ao se registrar, você concorda com os {variant, select, both{Termos de Serviço e Política de Privacidade} termsOnly{Termos de Serviço} privacyOnly{Política de Privacidade} other{}}", "v2.component.verify-bot-protection.default.description": "Você será redirecionado em breve após concluir o desafio", "v2.component.verify-bot-protection.default.title": "Verificando seu sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Você entrou com {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Prossiga para continuar.", "v2.page.select-account.default.title": "Entrar no {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Usar outra conta", + "v2.page.settings-profile-edit-address.default.country-label": "País", + "v2.page.settings-profile-edit-address.default.locality-label": "Cidade", + "v2.page.settings-profile-edit-address.default.navbar-title": "Endereço", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Código postal", + "v2.page.settings-profile-edit-address.default.region-label": "Região", + "v2.page.settings-profile-edit-address.default.street-label": "Endereço residencial", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Data de nascimento", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personalizado", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Feminino", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Masculino", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Não fornecido", + "v2.page.settings-profile-edit-gender.default.title": "Gênero", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Idioma", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Sobrenome", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nome completo", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Primeiro nome", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Nome do meio", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nome", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Apelido", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Fuso horário", + "v2.page.settings-profile-no-permission.default.content": "Não autorizado", + "v2.page.settings-profile-no-permission.default.title": "Problemas Inesperados", + "v2.page.settings-profile.default.address-title": "Endereço", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Não fornecido", + "v2.page.settings-profile.default.birthdate-title": "Data de Nascimento", + "v2.page.settings-profile.default.button-label-add-picture": "Adicionar Foto de Perfil", + "v2.page.settings-profile.default.button-label-remove-picture": "Remover Foto de Perfil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Enviar Nova Foto", + "v2.page.settings-profile.default.gender-title": "Gênero", + "v2.page.settings-profile.default.language-title": "Idioma", + "v2.page.settings-profile.default.name-title": "Nome", + "v2.page.settings-profile.default.navbar-title": "Perfil", + "v2.page.settings-profile.default.profile-picture-title": "Foto de Perfil", + "v2.page.settings-profile.default.zoneinfo-title": "Fuso Horário", "v2.page.settings.default.button-label-advanced-settings": "Configurações Avançadas", - "v2.page.settings.default.button-label-and-more": "e mais", + "v2.page.settings.default.button-label-and-more": "{item} e mais", "v2.page.settings.default.button-label-back-to-app": "Voltar para meu aplicativo", "v2.page.settings.default.button-label-biometric-login": "Login Biométrico", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/pt-PT/translation.json b/resources/authgear/templates/pt-PT/translation.json index 7c0c0518d9..876578e783 100644 --- a/resources/authgear/templates/pt-PT/translation.json +++ b/resources/authgear/templates/pt-PT/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continuar com o Número de Telefone", "v2.component.button.default.label-continue-with-text-login-id": "Continuar com {variant, select, email {Email} username {Nome de utilizador} other {Email / Nome de utilizador}}", "v2.component.button.default.label-login": "Iniciar sessão", + "v2.component.button.default.label-save": "Guardar", "v2.component.button.default.label-send": "Enviar", "v2.component.device-token-checkbox.default.label": "Lembrar este dispositivo e não perguntar novamente", "v2.component.divider.default.or-label": "ou", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Tentar Novamente em %s", "v2.component.lockout.default.subtitle": "Esta conta foi bloqueada devido a demasiadas tentativas. Por favor, tenta novamente mais tarde.", "v2.component.lockout.default.title": "Conta Indisponível", + "v2.component.navbar.default.item-back-button-label": "Voltar", "v2.component.new-password-field.default.password-policy-alphabet": "Contém um alfabeto", "v2.component.new-password-field.default.password-policy-digit": "Contém um dígito", "v2.component.new-password-field.default.password-policy-lowercase": "Contém uma letra minúscula", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Mostrar senha", "v2.component.phone-input.default.no-results-found": "Não foram encontrados resultados", "v2.component.phone-input.default.search-label": "Pesquisar", + "v2.component.select-input.default.no-results-found": "Nenhum resultado encontrado", + "v2.component.select-input.default.not-provided-label": "Não fornecido", + "v2.component.select-input.default.search-label": "Pesquisar", + "v2.component.select-input.default.unset-label": "Não definido", "v2.component.toc-pp-footer.default.label": "Ao se registrar, você concorda com os {variant, select, both{Termos de Serviço e Política de Privacidade} termsOnly{Termos de Serviço} privacyOnly{Política de Privacidade} other{}}", "v2.component.verify-bot-protection.default.description": "Será redirecionado brevemente após concluir o desafio", "v2.component.verify-bot-protection.default.title": "A verificar o seu sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Iniciaste sessão com {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Continua para prosseguir.", "v2.page.select-account.default.title": "Iniciar sessão em {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Usar outra conta", + "v2.page.settings-profile-edit-address.default.country-label": "País", + "v2.page.settings-profile-edit-address.default.locality-label": "Cidade", + "v2.page.settings-profile-edit-address.default.navbar-title": "Endereço", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Código postal", + "v2.page.settings-profile-edit-address.default.region-label": "Região", + "v2.page.settings-profile-edit-address.default.street-label": "Endereço de rua", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Data de nascimento", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personalizado", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Feminino", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Masculino", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Não fornecido", + "v2.page.settings-profile-edit-gender.default.title": "Género", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Língua", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Apelido", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nome completo", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Nome próprio", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Nome do meio", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nome", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Alcunha", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Fuso horário", + "v2.page.settings-profile-no-permission.default.content": "Não autorizado", + "v2.page.settings-profile-no-permission.default.title": "Problemas Inesperados", + "v2.page.settings-profile.default.address-title": "Endereço", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Não fornecido", + "v2.page.settings-profile.default.birthdate-title": "Data de Nascimento", + "v2.page.settings-profile.default.button-label-add-picture": "Adicionar Fotografia de Perfil", + "v2.page.settings-profile.default.button-label-remove-picture": "Remover Fotografia de Perfil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Carregar Nova Fotografia", + "v2.page.settings-profile.default.gender-title": "Género", + "v2.page.settings-profile.default.language-title": "Idioma", + "v2.page.settings-profile.default.name-title": "Nome", + "v2.page.settings-profile.default.navbar-title": "Perfil", + "v2.page.settings-profile.default.profile-picture-title": "Foto de Perfil", + "v2.page.settings-profile.default.zoneinfo-title": "Fuso Horário", "v2.page.settings.default.button-label-advanced-settings": "Definições Avançadas", - "v2.page.settings.default.button-label-and-more": "e mais", + "v2.page.settings.default.button-label-and-more": "{item} e mais", "v2.page.settings.default.button-label-back-to-app": "Voltar à minha aplicação", "v2.page.settings.default.button-label-biometric-login": "Início de Sessão Biométrico", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/pt/translation.json b/resources/authgear/templates/pt/translation.json index 90e07b8e0e..e911539930 100644 --- a/resources/authgear/templates/pt/translation.json +++ b/resources/authgear/templates/pt/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Continuar com Número de Telefone", "v2.component.button.default.label-continue-with-text-login-id": "Continuar com {variant, select, email {Email} username {Nome de Usuário} other {Email / Nome de Usuário}}", "v2.component.button.default.label-login": "Entrar", + "v2.component.button.default.label-save": "Salvar", "v2.component.button.default.label-send": "Enviar", "v2.component.device-token-checkbox.default.label": "Lembrar este dispositivo e não perguntar novamente", "v2.component.divider.default.or-label": "ou", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Tentar Novamente em %s", "v2.component.lockout.default.subtitle": "Esta conta foi bloqueada devido a muitas tentativas. Por favor, tente novamente mais tarde.", "v2.component.lockout.default.title": "Conta Indisponível", + "v2.component.navbar.default.item-back-button-label": "Voltar", "v2.component.new-password-field.default.password-policy-alphabet": "Contém um alfabeto", "v2.component.new-password-field.default.password-policy-digit": "Contém um dígito", "v2.component.new-password-field.default.password-policy-lowercase": "Contém uma letra minúscula", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Mostrar senha", "v2.component.phone-input.default.no-results-found": "Nenhum resultado encontrado", "v2.component.phone-input.default.search-label": "Pesquisar", + "v2.component.select-input.default.no-results-found": "Nenhum resultado encontrado", + "v2.component.select-input.default.not-provided-label": "Não fornecido", + "v2.component.select-input.default.search-label": "Pesquisar", + "v2.component.select-input.default.unset-label": "Não definido", "v2.component.toc-pp-footer.default.label": "Ao se registrar, você concorda com {variant, select, both{Termos de Serviço e Política de Privacidade} termsOnly{Termos de Serviço} privacyOnly{Política de Privacidade} other{}}", "v2.component.verify-bot-protection.default.description": "Você será redirecionado em breve após concluir o desafio 'Passkey'", "v2.component.verify-bot-protection.default.title": "Verificando o seu sistema...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Você fez login com {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Prossiga para continuar.", "v2.page.select-account.default.title": "Faça login em {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Usar outra conta", + "v2.page.settings-profile-edit-address.default.country-label": "País", + "v2.page.settings-profile-edit-address.default.locality-label": "Cidade", + "v2.page.settings-profile-edit-address.default.navbar-title": "Endereço", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Código postal", + "v2.page.settings-profile-edit-address.default.region-label": "Região", + "v2.page.settings-profile-edit-address.default.street-label": "Endereço de rua", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Data de nascimento", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Personalizado", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Feminino", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Masculino", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Não fornecido", + "v2.page.settings-profile-edit-gender.default.title": "Gênero", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Idioma", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Sobrenome", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Nome completo", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Primeiro nome", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Nome do meio", + "v2.page.settings-profile-edit-name.default.navbar-title": "Nome", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Apelido", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Fuso horário", + "v2.page.settings-profile-no-permission.default.content": "Não autorizado", + "v2.page.settings-profile-no-permission.default.title": "Problemas Inesperados", + "v2.page.settings-profile.default.address-title": "Endereço", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Não fornecido", + "v2.page.settings-profile.default.birthdate-title": "Data de Nascimento", + "v2.page.settings-profile.default.button-label-add-picture": "Adicionar Foto de Perfil", + "v2.page.settings-profile.default.button-label-remove-picture": "Remover Foto de Perfil", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Enviar Nova Foto", + "v2.page.settings-profile.default.gender-title": "Gênero", + "v2.page.settings-profile.default.language-title": "Idioma", + "v2.page.settings-profile.default.name-title": "Nome", + "v2.page.settings-profile.default.navbar-title": "Perfil", + "v2.page.settings-profile.default.profile-picture-title": "Foto de Perfil", + "v2.page.settings-profile.default.zoneinfo-title": "Fuso Horário", "v2.page.settings.default.button-label-advanced-settings": "Configurações Avançadas", - "v2.page.settings.default.button-label-and-more": "e mais", + "v2.page.settings.default.button-label-and-more": "{item} e mais", "v2.page.settings.default.button-label-back-to-app": "Voltar para meu aplicativo", "v2.page.settings.default.button-label-biometric-login": "Login Biométrico", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/th/translation.json b/resources/authgear/templates/th/translation.json index c261dbb31a..0922ad490f 100644 --- a/resources/authgear/templates/th/translation.json +++ b/resources/authgear/templates/th/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "ดำเนินการต''อด''วยหมายเลขโทรศัพท''", "v2.component.button.default.label-continue-with-text-login-id": "ดำเนินการต่อด้วย {variant, select, email {อีเมล} username {ชื่อผู้ใช้} other {อีเมล / ชื่อผู้ใช้}}", "v2.component.button.default.label-login": "เข้าสู่ระบบ", + "v2.component.button.default.label-save": "บันทึก", "v2.component.button.default.label-send": "ส่ง", "v2.component.device-token-checkbox.default.label": "จดจำอุปกรณ์นี้ และอย่าถามอีก", "v2.component.divider.default.or-label": "หรือ", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "ลองอีกครั้งใน %s", "v2.component.lockout.default.subtitle": "บัญชีนี้ถูกล็อกเนื่องจากมีการพยายามเข้าสู่ระบบมากเกินไป โปรดลองอีกครั้งในภายหลัง.", "v2.component.lockout.default.title": "บัญชีไม่พร้อมใช้งาน", + "v2.component.navbar.default.item-back-button-label": "กลับ", "v2.component.new-password-field.default.password-policy-alphabet": "มีตัวอักษร", "v2.component.new-password-field.default.password-policy-digit": "มีตัวเลข", "v2.component.new-password-field.default.password-policy-lowercase": "มีตัวอักษรพิมพ์เล็ก", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "แสดงรหัสผ่าน", "v2.component.phone-input.default.no-results-found": "ไม่พบผลลัพธ์", "v2.component.phone-input.default.search-label": "ค้นหา", + "v2.component.select-input.default.no-results-found": "ไม่พบผลลัพธ์", + "v2.component.select-input.default.not-provided-label": "ไม่ได้ระบุ", + "v2.component.select-input.default.search-label": "ค้นหา", + "v2.component.select-input.default.unset-label": "ยกเลิก", "v2.component.toc-pp-footer.default.label": "โดยการลงทะเบียน คุณตกลงกับ {variant, select, both{ข้อกำหนดการให้บริการ และ นโยบายความเป็นส่วนตัว} termsOnly{ข้อกำหนดการให้บริการ} privacyOnly{นโยบายความเป็นส่วนตัว} other{}}", "v2.component.verify-bot-protection.default.description": "คุณจะถูกเปลี่ยนเส้นทางหลังจากที่คุณผ่านการทดสอบแล้ว", "v2.component.verify-bot-protection.default.title": "กำลังตรวจสอบระบบของคุณ...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "คุณได้เข้าสู่ระบบด้วย {IdentityDisplayName} ดำเนินการต่อเพื่อดำเนินการต่อ.", "v2.page.select-account.default.title": "เข้าสู่ระบบ {AppOrClientName}", "v2.page.select-account.default.use-another-account": "ใช้บัญชีอื่น", + "v2.page.settings-profile-edit-address.default.country-label": "ประเทศ", + "v2.page.settings-profile-edit-address.default.locality-label": "เมือง", + "v2.page.settings-profile-edit-address.default.navbar-title": "ที่อยู่", + "v2.page.settings-profile-edit-address.default.postal-code-label": "รหัสไปรษณีย์", + "v2.page.settings-profile-edit-address.default.region-label": "ภูมิภาค", + "v2.page.settings-profile-edit-address.default.street-label": "ที่อยู่ถนน", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "วันเกิด", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "กำหนดเอง", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "หญิง", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "ชาย", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "ไม่ได้ระบุ", + "v2.page.settings-profile-edit-gender.default.title": "เพศ", + "v2.page.settings-profile-edit-locale.default.navbar-title": "ภาษา", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "นามสกุล", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "ชื่อเต็ม", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "ชื่อจริง", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "ชื่อกลาง", + "v2.page.settings-profile-edit-name.default.navbar-title": "ชื่อ", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "ชื่อเล่น", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "เขตเวลา", + "v2.page.settings-profile-no-permission.default.content": "ไม่ได้รับอนุญาต", + "v2.page.settings-profile-no-permission.default.title": "ปัญหาที่ไม่คาดคิด", + "v2.page.settings-profile.default.address-title": "ที่อยู่", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "ไม่ได้ระบุ", + "v2.page.settings-profile.default.birthdate-title": "วันเกิด", + "v2.page.settings-profile.default.button-label-add-picture": "เพิ่มรูปโปรไฟล์", + "v2.page.settings-profile.default.button-label-remove-picture": "ลบรูปโปรไฟล์", + "v2.page.settings-profile.default.button-label-upload-new-picture": "อัปโหลดรูปใหม่", + "v2.page.settings-profile.default.gender-title": "เพศ", + "v2.page.settings-profile.default.language-title": "ภาษา", + "v2.page.settings-profile.default.name-title": "ชื่อ", + "v2.page.settings-profile.default.navbar-title": "โปรไฟล์", + "v2.page.settings-profile.default.profile-picture-title": "รูปโปรไฟล์", + "v2.page.settings-profile.default.zoneinfo-title": "เขตเวลา", "v2.page.settings.default.button-label-advanced-settings": "การตั้งค่าขั้นสูง", - "v2.page.settings.default.button-label-and-more": "และอื่นๆ อีก", + "v2.page.settings.default.button-label-and-more": "{item} และอื่นๆ", "v2.page.settings.default.button-label-back-to-app": "กลับไปที่แอปพลิเคชันของฉัน", "v2.page.settings.default.button-label-biometric-login": "การเข้าสู่ระบบด้วยข้อมูลชีวภาพ", "v2.page.settings.default.button-label-email": "อีเมล", diff --git a/resources/authgear/templates/vi/translation.json b/resources/authgear/templates/vi/translation.json index 555bc3532d..3b91b987a3 100644 --- a/resources/authgear/templates/vi/translation.json +++ b/resources/authgear/templates/vi/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "Tiếp tục với Số điện thoại", "v2.component.button.default.label-continue-with-text-login-id": "Tiếp tục với {variant, select, email {Email} username {Tên đăng nhập} other {Email / Tên đăng nhập}}", "v2.component.button.default.label-login": "Đăng nhập", + "v2.component.button.default.label-save": "Lưu", "v2.component.button.default.label-send": "Gửi", "v2.component.device-token-checkbox.default.label": "Nhớ thiết bị này, và không hỏi lại", "v2.component.divider.default.or-label": "hoặc", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "Thử lại sau %s", "v2.component.lockout.default.subtitle": "Tài khoản này đã bị khóa do quá nhiều lần thử. Vui lòng thử lại sau.", "v2.component.lockout.default.title": "Tài khoản không khả dụng", + "v2.component.navbar.default.item-back-button-label": "Quay lại", "v2.component.new-password-field.default.password-policy-alphabet": "Chứa một chữ cái", "v2.component.new-password-field.default.password-policy-digit": "Chứa một chữ số", "v2.component.new-password-field.default.password-policy-lowercase": "Chứa một chữ cái viết thường", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "Hiện mật khẩu", "v2.component.phone-input.default.no-results-found": "Không tìm thấy kết quả", "v2.component.phone-input.default.search-label": "Tìm kiếm", + "v2.component.select-input.default.no-results-found": "Không tìm thấy kết quả", + "v2.component.select-input.default.not-provided-label": "Không cung cấp", + "v2.component.select-input.default.search-label": "Tìm kiếm", + "v2.component.select-input.default.unset-label": "Bỏ đặt", "v2.component.toc-pp-footer.default.label": "Bằng cách đăng ký, bạn đồng ý với {variant, select, both{Điều khoản dịch vụChính sách bảo mật} termsOnly{Điều khoản dịch vụ} privacyOnly{Chính sách bảo mật} other{}}", "v2.component.verify-bot-protection.default.description": "Bạn sẽ được chuyển hướng ngay sau khi hoàn thành thử thách", "v2.component.verify-bot-protection.default.title": "Đang kiểm tra hệ thống của bạn...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "Bạn đã đăng nhập với {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}}. Tiếp tục để tiến hành.", "v2.page.select-account.default.title": "Đăng nhập vào {AppOrClientName}", "v2.page.select-account.default.use-another-account": "Sử dụng tài khoản khác", + "v2.page.settings-profile-edit-address.default.country-label": "Quốc gia", + "v2.page.settings-profile-edit-address.default.locality-label": "Thành phố", + "v2.page.settings-profile-edit-address.default.navbar-title": "Địa chỉ", + "v2.page.settings-profile-edit-address.default.postal-code-label": "Mã bưu chính", + "v2.page.settings-profile-edit-address.default.region-label": "Vùng", + "v2.page.settings-profile-edit-address.default.street-label": "Địa chỉ đường phố", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "Ngày sinh", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "Tùy chỉnh", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "Nữ", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "Nam", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "Không cung cấp", + "v2.page.settings-profile-edit-gender.default.title": "Giới tính", + "v2.page.settings-profile-edit-locale.default.navbar-title": "Ngôn ngữ", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "Họ", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "Tên đầy đủ", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "Tên", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "Tên đệm", + "v2.page.settings-profile-edit-name.default.navbar-title": "Tên", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "Biệt danh", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "Múi giờ", + "v2.page.settings-profile-no-permission.default.content": "Không được ủy quyền", + "v2.page.settings-profile-no-permission.default.title": "Vấn đề bất ngờ", + "v2.page.settings-profile.default.address-title": "Địa chỉ", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "Không cung cấp", + "v2.page.settings-profile.default.birthdate-title": "Ngày sinh", + "v2.page.settings-profile.default.button-label-add-picture": "Thêm ảnh đại diện", + "v2.page.settings-profile.default.button-label-remove-picture": "Xóa ảnh đại diện", + "v2.page.settings-profile.default.button-label-upload-new-picture": "Tải lên ảnh mới", + "v2.page.settings-profile.default.gender-title": "Giới tính", + "v2.page.settings-profile.default.language-title": "Ngôn ngữ", + "v2.page.settings-profile.default.name-title": "Tên", + "v2.page.settings-profile.default.navbar-title": "Hồ sơ", + "v2.page.settings-profile.default.profile-picture-title": "Ảnh đại diện", + "v2.page.settings-profile.default.zoneinfo-title": "Múi giờ", "v2.page.settings.default.button-label-advanced-settings": "Cài đặt Nâng cao", - "v2.page.settings.default.button-label-and-more": "và nhiều hơn nữa", + "v2.page.settings.default.button-label-and-more": "{item} và nhiều hơn nữa", "v2.page.settings.default.button-label-back-to-app": "Quay lại ứng dụng của tôi", "v2.page.settings.default.button-label-biometric-login": "Đăng nhập Sinh trắc học", "v2.page.settings.default.button-label-email": "Email", diff --git a/resources/authgear/templates/zh-CN/translation.json b/resources/authgear/templates/zh-CN/translation.json index a6d84c0299..3246acab54 100644 --- a/resources/authgear/templates/zh-CN/translation.json +++ b/resources/authgear/templates/zh-CN/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "继续使用手机号码", "v2.component.button.default.label-continue-with-text-login-id": "继续使用{variant, select, email {电子邮箱} username {用户名} other {电子邮箱 / 用户名}}", "v2.component.button.default.label-login": "登录", + "v2.component.button.default.label-save": "保存", "v2.component.button.default.label-send": "发送", "v2.component.device-token-checkbox.default.label": "记住此设备,不要再次询问", "v2.component.divider.default.or-label": "或", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "%s 秒后重试", "v2.component.lockout.default.subtitle": "此账户由于尝试次数过多而被锁定。请稍后再试。", "v2.component.lockout.default.title": "账户不可用", + "v2.component.navbar.default.item-back-button-label": "返回", "v2.component.new-password-field.default.password-policy-alphabet": "包含一个字母", "v2.component.new-password-field.default.password-policy-digit": "包含一个数字", "v2.component.new-password-field.default.password-policy-lowercase": "包含一个小写字母", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "显示密码", "v2.component.phone-input.default.no-results-found": "未找到结果", "v2.component.phone-input.default.search-label": "搜索", + "v2.component.select-input.default.no-results-found": "未找到结果", + "v2.component.select-input.default.not-provided-label": "未提供", + "v2.component.select-input.default.search-label": "搜索", + "v2.component.select-input.default.unset-label": "未设置", "v2.component.toc-pp-footer.default.label": "注册后, 您同意 {variant, select, both{服务条款隐私政策} termsOnly{服务条款} privacyOnly{隐私政策} other{}}", "v2.component.verify-bot-protection.default.description": "您完成挑战后将很快被重定向", "v2.component.verify-bot-protection.default.title": "正在检查您的系统...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "您已使用 {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}} 登录。请继续操作。", "v2.page.select-account.default.title": "登录到 {AppOrClientName}", "v2.page.select-account.default.use-another-account": "使用其他帐户", + "v2.page.settings-profile-edit-address.default.country-label": "国家", + "v2.page.settings-profile-edit-address.default.locality-label": "城市", + "v2.page.settings-profile-edit-address.default.navbar-title": "地址", + "v2.page.settings-profile-edit-address.default.postal-code-label": "邮政编码", + "v2.page.settings-profile-edit-address.default.region-label": "地区", + "v2.page.settings-profile-edit-address.default.street-label": "街道地址", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "出生日期", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "自定义", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "女性", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "男性", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "未提供", + "v2.page.settings-profile-edit-gender.default.title": "性别", + "v2.page.settings-profile-edit-locale.default.navbar-title": "语言", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "姓氏", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "全名", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "名字", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "中间名", + "v2.page.settings-profile-edit-name.default.navbar-title": "名字", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "昵称", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "时区", + "v2.page.settings-profile-no-permission.default.content": "未经授权", + "v2.page.settings-profile-no-permission.default.title": "意外问题", + "v2.page.settings-profile.default.address-title": "地址", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "未提供", + "v2.page.settings-profile.default.birthdate-title": "出生日期", + "v2.page.settings-profile.default.button-label-add-picture": "添加个人资料图片", + "v2.page.settings-profile.default.button-label-remove-picture": "移除个人资料图片", + "v2.page.settings-profile.default.button-label-upload-new-picture": "上传新图片", + "v2.page.settings-profile.default.gender-title": "性别", + "v2.page.settings-profile.default.language-title": "语言", + "v2.page.settings-profile.default.name-title": "名称", + "v2.page.settings-profile.default.navbar-title": "个人资料", + "v2.page.settings-profile.default.profile-picture-title": "个人头像", + "v2.page.settings-profile.default.zoneinfo-title": "时区", "v2.page.settings.default.button-label-advanced-settings": "高级设置", - "v2.page.settings.default.button-label-and-more": "等等", + "v2.page.settings.default.button-label-and-more": "{item}等", "v2.page.settings.default.button-label-back-to-app": "返回我的应用程序", "v2.page.settings.default.button-label-biometric-login": "生物识别登录", "v2.page.settings.default.button-label-email": "电子邮件", diff --git a/resources/authgear/templates/zh-HK/translation.json b/resources/authgear/templates/zh-HK/translation.json index 2feec324dc..eab9560f6e 100644 --- a/resources/authgear/templates/zh-HK/translation.json +++ b/resources/authgear/templates/zh-HK/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "以電話號碼繼續", "v2.component.button.default.label-continue-with-text-login-id": "使用{variant, select, email {電郵} username {使用者名稱} other {電郵 / 使用者名稱}}繼續", "v2.component.button.default.label-login": "登入", + "v2.component.button.default.label-save": "儲存", "v2.component.button.default.label-send": "傳送", "v2.component.device-token-checkbox.default.label": "記住此裝置,不要再詢問", "v2.component.divider.default.or-label": "或", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "%s 後重試", "v2.component.lockout.default.subtitle": "由於嘗試次數過多,此帳戶已被鎖定,請稍後重試。", "v2.component.lockout.default.title": "帳戶不可用", + "v2.component.navbar.default.item-back-button-label": "返回", "v2.component.new-password-field.default.password-policy-alphabet": "請輸入最少一個英文字母", "v2.component.new-password-field.default.password-policy-digit": "請輸入最少一個數字", "v2.component.new-password-field.default.password-policy-lowercase": "請輸入最少一個小寫英文字母", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "顯示密碼", "v2.component.phone-input.default.no-results-found": "找不到結果", "v2.component.phone-input.default.search-label": "搜尋", + "v2.component.select-input.default.no-results-found": "未找到結果", + "v2.component.select-input.default.not-provided-label": "未提供", + "v2.component.select-input.default.search-label": "搜尋", + "v2.component.select-input.default.unset-label": "取消設定", "v2.component.toc-pp-footer.default.label": "註冊即表示我已同意 {variant, select, both{條款和細則隱私政策} termsOnly{條款和細則} privacyOnly{隱私政策} other{}}。", "v2.component.verify-bot-protection.default.description": "在您完成驗證後,您將很快被重新導向", "v2.component.verify-bot-protection.default.title": "正在驗證你的系統...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "您正在使用 {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}} 登入。", "v2.page.select-account.default.title": "登入 {AppOrClientName}", "v2.page.select-account.default.use-another-account": "使用另一個帳戶", + "v2.page.settings-profile-edit-address.default.country-label": "國家", + "v2.page.settings-profile-edit-address.default.locality-label": "城市", + "v2.page.settings-profile-edit-address.default.navbar-title": "地址", + "v2.page.settings-profile-edit-address.default.postal-code-label": "郵遞區號", + "v2.page.settings-profile-edit-address.default.region-label": "區域", + "v2.page.settings-profile-edit-address.default.street-label": "街道地址", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "出生日期", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "自訂", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "女性", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "男性", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "未提供", + "v2.page.settings-profile-edit-gender.default.title": "性別", + "v2.page.settings-profile-edit-locale.default.navbar-title": "語言", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "姓", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "全名", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "名", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "中間名", + "v2.page.settings-profile-edit-name.default.navbar-title": "姓名", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "暱稱", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "時區", + "v2.page.settings-profile-no-permission.default.content": "未經授權", + "v2.page.settings-profile-no-permission.default.title": "系統錯誤", + "v2.page.settings-profile.default.address-title": "地址", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "未提供", + "v2.page.settings-profile.default.birthdate-title": "出生日期", + "v2.page.settings-profile.default.button-label-add-picture": "新增頭像", + "v2.page.settings-profile.default.button-label-remove-picture": "移除頭像", + "v2.page.settings-profile.default.button-label-upload-new-picture": "上傳新頭像", + "v2.page.settings-profile.default.gender-title": "性別", + "v2.page.settings-profile.default.language-title": "語言", + "v2.page.settings-profile.default.name-title": "名稱", + "v2.page.settings-profile.default.navbar-title": "個人資料", + "v2.page.settings-profile.default.profile-picture-title": "頭像", + "v2.page.settings-profile.default.zoneinfo-title": "時區", "v2.page.settings.default.button-label-advanced-settings": "進階設定", - "v2.page.settings.default.button-label-and-more": "還有更多", + "v2.page.settings.default.button-label-and-more": "{item} 還有更多", "v2.page.settings.default.button-label-back-to-app": "返回我的App", "v2.page.settings.default.button-label-biometric-login": "生物驗證登入", "v2.page.settings.default.button-label-email": "電郵", diff --git a/resources/authgear/templates/zh-TW/translation.json b/resources/authgear/templates/zh-TW/translation.json index e3738181aa..2150e7a51d 100644 --- a/resources/authgear/templates/zh-TW/translation.json +++ b/resources/authgear/templates/zh-TW/translation.json @@ -883,6 +883,7 @@ "v2.component.button.default.label-continue-with-phone": "使用電話號碼繼續", "v2.component.button.default.label-continue-with-text-login-id": "使用{variant, select, email {電郵} username {使用者名稱} other {電郵 / 使用者名稱}}繼續", "v2.component.button.default.label-login": "登入", + "v2.component.button.default.label-save": "儲存", "v2.component.button.default.label-send": "傳送", "v2.component.device-token-checkbox.default.label": "記住此裝置,不要再詢問", "v2.component.divider.default.or-label": "或", @@ -895,6 +896,7 @@ "v2.component.lockout.default.retry-countdown-label-unit": "%s 後重試", "v2.component.lockout.default.subtitle": "由於嘗試次數過多,此帳號已被鎖定,請稍後重試。", "v2.component.lockout.default.title": "帳號不可用", + "v2.component.navbar.default.item-back-button-label": "返回", "v2.component.new-password-field.default.password-policy-alphabet": "請輸入最少一個英文字母", "v2.component.new-password-field.default.password-policy-digit": "請輸入最少一個數字", "v2.component.new-password-field.default.password-policy-lowercase": "請輸入最少一個小寫英文字母", @@ -926,6 +928,10 @@ "v2.component.password-input.default.show-password": "顯示密碼", "v2.component.phone-input.default.no-results-found": "找不到結果", "v2.component.phone-input.default.search-label": "搜尋", + "v2.component.select-input.default.no-results-found": "未找到結果", + "v2.component.select-input.default.not-provided-label": "未提供", + "v2.component.select-input.default.search-label": "搜尋", + "v2.component.select-input.default.unset-label": "取消設定", "v2.component.toc-pp-footer.default.label": "註冊即表示我已同意 {variant, select, both{條款和細則隱私政策} termsOnly{條款和細則} privacyOnly{隱私政策} other{}}。", "v2.component.verify-bot-protection.default.description": "在您完成驗證後,您將很快被重新導向", "v2.component.verify-bot-protection.default.title": "正在驗證你的系統...", @@ -1106,8 +1112,42 @@ "v2.page.select-account.default.description": "您正在使用 {email_is_present,select,true{{email}} other{{phone_number_is_present,select,true{{phone_number}} other{{preferred_username}}}}} 登入。", "v2.page.select-account.default.title": "登入 {AppOrClientName}", "v2.page.select-account.default.use-another-account": "使用另一個帳號", + "v2.page.settings-profile-edit-address.default.country-label": "國家", + "v2.page.settings-profile-edit-address.default.locality-label": "城市", + "v2.page.settings-profile-edit-address.default.navbar-title": "地址", + "v2.page.settings-profile-edit-address.default.postal-code-label": "郵遞區號", + "v2.page.settings-profile-edit-address.default.region-label": "區域", + "v2.page.settings-profile-edit-address.default.street-label": "街道地址", + "v2.page.settings-profile-edit-birthdate.default.navbar-title": "出生日期", + "v2.page.settings-profile-edit-gender.default.gender-label-custom": "自訂", + "v2.page.settings-profile-edit-gender.default.gender-label-female": "女性", + "v2.page.settings-profile-edit-gender.default.gender-label-male": "男性", + "v2.page.settings-profile-edit-gender.default.gender-label-unspecified": "未提供", + "v2.page.settings-profile-edit-gender.default.title": "性別", + "v2.page.settings-profile-edit-locale.default.navbar-title": "語言", + "v2.page.settings-profile-edit-name.default.family-name-input-label": "姓", + "v2.page.settings-profile-edit-name.default.fullname-input-label": "全名", + "v2.page.settings-profile-edit-name.default.given-name-input-label": "名", + "v2.page.settings-profile-edit-name.default.middle-name-input-label": "中間名", + "v2.page.settings-profile-edit-name.default.navbar-title": "姓名", + "v2.page.settings-profile-edit-name.default.nickname-input-label": "暱稱", + "v2.page.settings-profile-edit-zoneinfo.default.navbar-title": "時區", + "v2.page.settings-profile-no-permission.default.content": "未經授權", + "v2.page.settings-profile-no-permission.default.title": "系統錯誤", + "v2.page.settings-profile.default.address-title": "地址", + "v2.page.settings-profile.default.attribute-value-unspecified-label": "未提供", + "v2.page.settings-profile.default.birthdate-title": "出生日期", + "v2.page.settings-profile.default.button-label-add-picture": "新增頭像", + "v2.page.settings-profile.default.button-label-remove-picture": "移除頭像", + "v2.page.settings-profile.default.button-label-upload-new-picture": "上傳新頭像", + "v2.page.settings-profile.default.gender-title": "性別", + "v2.page.settings-profile.default.language-title": "語言", + "v2.page.settings-profile.default.name-title": "名稱", + "v2.page.settings-profile.default.navbar-title": "個人資料", + "v2.page.settings-profile.default.profile-picture-title": "頭像", + "v2.page.settings-profile.default.zoneinfo-title": "時區", "v2.page.settings.default.button-label-advanced-settings": "進階設定", - "v2.page.settings.default.button-label-and-more": "還有更多", + "v2.page.settings.default.button-label-and-more": "{item} 還有更多", "v2.page.settings.default.button-label-back-to-app": "返回我的App", "v2.page.settings.default.button-label-biometric-login": "生物驗證登入", "v2.page.settings.default.button-label-email": "電郵", diff --git a/scripts/python/subset_fonts/material-icons.txt b/scripts/python/subset_fonts/material-icons.txt index af2485d66c..7eb4c0f74c 100644 --- a/scripts/python/subset_fonts/material-icons.txt +++ b/scripts/python/subset_fonts/material-icons.txt @@ -7,6 +7,7 @@ api arrow_back_ios arrow_forward_ios block +border_color box call cancel @@ -33,6 +34,8 @@ error event explicit face +female +filter fingerprint flag forward_to_inbox @@ -60,6 +63,7 @@ lock login lowercase mail +male margin mediation merge @@ -86,10 +90,12 @@ privacy progress_activity public qr_code +radio refresh repeat restore rule +save scale score script @@ -127,6 +133,7 @@ transform translate try update +upload uppercase verified_user visibility