Move auth to app folder (#5336)

* move auth folder into app folder

* fix auth folder imports

* reorder imports in login component
This commit is contained in:
Jake Fink 2023-05-02 16:08:52 -04:00 committed by GitHub
parent 01244e2b9e
commit 2c51af192c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 70 additions and 71 deletions

View File

@ -4,8 +4,8 @@ import { NgModule } from "@angular/core";
import { FormFieldModule } from "@bitwarden/components"; import { FormFieldModule } from "@bitwarden/components";
import { RegisterFormModule } from "../../../auth/register-form/register-form.module";
import { OrganizationCreateModule } from "../../admin-console/organizations/create/organization-create.module"; import { OrganizationCreateModule } from "../../admin-console/organizations/create/organization-create.module";
import { RegisterFormModule } from "../../auth/register-form/register-form.module";
import { BillingComponent } from "../../billing/accounts/trial-initiation/billing.component"; import { BillingComponent } from "../../billing/accounts/trial-initiation/billing.component";
import { LooseComponentsModule, SharedModule } from "../../shared"; import { LooseComponentsModule, SharedModule } from "../../shared";

View File

@ -8,12 +8,12 @@ import { StateService } from "@bitwarden/common/abstractions/state.service";
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
import { TwoFactorDuoComponent } from "../../../../auth/settings/two-factor-duo.component"; import { TwoFactorDuoComponent } from "../../../auth/settings/two-factor-duo.component";
import { TwoFactorSetupComponent as BaseTwoFactorSetupComponent } from "../../../../auth/settings/two-factor-setup.component"; import { TwoFactorSetupComponent as BaseTwoFactorSetupComponent } from "../../../auth/settings/two-factor-setup.component";
@Component({ @Component({
selector: "app-two-factor-setup", selector: "app-two-factor-setup",
templateUrl: "../../../../auth/settings/two-factor-setup.component.html", templateUrl: "../../../auth/settings/two-factor-setup.component.html",
}) })
// eslint-disable-next-line rxjs-angular/prefer-takeuntil // eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent { export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent {

View File

@ -7,7 +7,7 @@ import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUti
import { StateService } from "@bitwarden/common/abstractions/state.service"; import { StateService } from "@bitwarden/common/abstractions/state.service";
import { EmergencyAccessAcceptRequest } from "@bitwarden/common/auth/models/request/emergency-access-accept.request"; import { EmergencyAccessAcceptRequest } from "@bitwarden/common/auth/models/request/emergency-access-accept.request";
import { BaseAcceptComponent } from "../app/common/base.accept.component"; import { BaseAcceptComponent } from "../common/base.accept.component";
@Component({ @Component({
selector: "app-accept-emergency", selector: "app-accept-emergency",

View File

@ -19,7 +19,7 @@ import { Policy } from "@bitwarden/common/admin-console/models/domain/policy";
import { OrganizationKeysRequest } from "@bitwarden/common/admin-console/models/request/organization-keys.request"; import { OrganizationKeysRequest } from "@bitwarden/common/admin-console/models/request/organization-keys.request";
import { Utils } from "@bitwarden/common/misc/utils"; import { Utils } from "@bitwarden/common/misc/utils";
import { BaseAcceptComponent } from "../app/common/base.accept.component"; import { BaseAcceptComponent } from "../common/base.accept.component";
@Component({ @Component({
selector: "app-accept-organization", selector: "app-accept-organization",

View File

@ -18,7 +18,7 @@ import { InternalPolicyService } from "@bitwarden/common/admin-console/abstracti
import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
import { RouterService } from "../app/core"; import { RouterService } from "../core";
@Component({ @Component({
selector: "app-lock", selector: "app-lock",

View File

@ -16,7 +16,7 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"; import { LoginService } from "@bitwarden/common/auth/abstractions/login.service";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
import { StateService } from "../../app/core"; import { StateService } from "../../core";
@Component({ @Component({
selector: "app-login-with-device", selector: "app-login-with-device",

View File

@ -25,8 +25,8 @@ import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"
import { ListResponse } from "@bitwarden/common/models/response/list.response"; import { ListResponse } from "@bitwarden/common/models/response/list.response";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
import { RouterService, StateService } from "../../app/core"; import { flagEnabled } from "../../../utils/flags";
import { flagEnabled } from "../../utils/flags"; import { RouterService, StateService } from "../../core";
@Component({ @Component({
selector: "app-login", selector: "app-login",

View File

@ -2,7 +2,7 @@ import { NgModule } from "@angular/core";
import { CheckboxModule } from "@bitwarden/components"; import { CheckboxModule } from "@bitwarden/components";
import { SharedModule } from "../../app/shared"; import { SharedModule } from "../../../app/shared";
import { LoginWithDeviceComponent } from "./login-with-device.component"; import { LoginWithDeviceComponent } from "./login-with-device.component";
import { LoginComponent } from "./login.component"; import { LoginComponent } from "./login.component";

View File

@ -1,6 +1,6 @@
import { NgModule } from "@angular/core"; import { NgModule } from "@angular/core";
import { SharedModule } from "../../app/shared"; import { SharedModule } from "../../shared";
import { RegisterFormComponent } from "./register-form.component"; import { RegisterFormComponent } from "./register-form.component";

View File

@ -14,7 +14,7 @@ import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.v
@Component({ @Component({
selector: "emergency-access-attachments", selector: "emergency-access-attachments",
templateUrl: "../../../app/vault/individual-vault/attachments.component.html", templateUrl: "../../../vault/individual-vault/attachments.component.html",
}) })
export class EmergencyAccessAttachmentsComponent extends BaseAttachmentsComponent { export class EmergencyAccessAttachmentsComponent extends BaseAttachmentsComponent {
viewOnly = true; viewOnly = true;

View File

@ -19,11 +19,11 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service"; import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
import { AddEditComponent as BaseAddEditComponent } from "../../../app/vault/individual-vault/add-edit.component"; import { AddEditComponent as BaseAddEditComponent } from "../../../vault/individual-vault/add-edit.component";
@Component({ @Component({
selector: "app-org-vault-add-edit", selector: "app-org-vault-add-edit",
templateUrl: "../../../app/vault/individual-vault/add-edit.component.html", templateUrl: "../../../vault/individual-vault/add-edit.component.html",
}) })
export class EmergencyAddEditComponent extends BaseAddEditComponent { export class EmergencyAddEditComponent extends BaseAddEditComponent {
originalCipher: Cipher = null; originalCipher: Cipher = null;

View File

@ -15,7 +15,7 @@ import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"
import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service"; import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service";
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
import { RouterService } from "../app/core"; import { RouterService } from "../core";
import { TwoFactorOptionsComponent } from "./two-factor-options.component"; import { TwoFactorOptionsComponent } from "./two-factor-options.component";

View File

@ -6,24 +6,6 @@ import { LockGuard } from "@bitwarden/angular/auth/guards/lock.guard";
import { UnauthGuard } from "@bitwarden/angular/auth/guards/unauth.guard"; import { UnauthGuard } from "@bitwarden/angular/auth/guards/unauth.guard";
import { SubscriptionRoutingModule } from "../app/billing/settings/subscription-routing.module"; import { SubscriptionRoutingModule } from "../app/billing/settings/subscription-routing.module";
import { AcceptEmergencyComponent } from "../auth/accept-emergency.component";
import { AcceptOrganizationComponent } from "../auth/accept-organization.component";
import { HintComponent } from "../auth/hint.component";
import { LockComponent } from "../auth/lock.component";
import { LoginWithDeviceComponent } from "../auth/login/login-with-device.component";
import { LoginComponent } from "../auth/login/login.component";
import { RecoverDeleteComponent } from "../auth/recover-delete.component";
import { RecoverTwoFactorComponent } from "../auth/recover-two-factor.component";
import { RemovePasswordComponent } from "../auth/remove-password.component";
import { SetPasswordComponent } from "../auth/set-password.component";
import { EmergencyAccessViewComponent } from "../auth/settings/emergency-access/emergency-access-view.component";
import { EmergencyAccessComponent } from "../auth/settings/emergency-access/emergency-access.component";
import { SsoComponent } from "../auth/sso.component";
import { TwoFactorComponent } from "../auth/two-factor.component";
import { UpdatePasswordComponent } from "../auth/update-password.component";
import { UpdateTempPasswordComponent } from "../auth/update-temp-password.component";
import { VerifyEmailTokenComponent } from "../auth/verify-email-token.component";
import { VerifyRecoverDeleteComponent } from "../auth/verify-recover-delete.component";
import { flagEnabled, Flags } from "../utils/flags"; import { flagEnabled, Flags } from "../utils/flags";
import { TrialInitiationComponent } from "./accounts/trial-initiation/trial-initiation.component"; import { TrialInitiationComponent } from "./accounts/trial-initiation/trial-initiation.component";
@ -32,6 +14,24 @@ import { AcceptFamilySponsorshipComponent } from "./admin-console/organizations/
import { FamiliesForEnterpriseSetupComponent } from "./admin-console/organizations/sponsorships/families-for-enterprise-setup.component"; import { FamiliesForEnterpriseSetupComponent } from "./admin-console/organizations/sponsorships/families-for-enterprise-setup.component";
import { CreateOrganizationComponent } from "./admin-console/settings/create-organization.component"; import { CreateOrganizationComponent } from "./admin-console/settings/create-organization.component";
import { SponsoredFamiliesComponent } from "./admin-console/settings/sponsored-families.component"; import { SponsoredFamiliesComponent } from "./admin-console/settings/sponsored-families.component";
import { AcceptEmergencyComponent } from "./auth/accept-emergency.component";
import { AcceptOrganizationComponent } from "./auth/accept-organization.component";
import { HintComponent } from "./auth/hint.component";
import { LockComponent } from "./auth/lock.component";
import { LoginWithDeviceComponent } from "./auth/login/login-with-device.component";
import { LoginComponent } from "./auth/login/login.component";
import { RecoverDeleteComponent } from "./auth/recover-delete.component";
import { RecoverTwoFactorComponent } from "./auth/recover-two-factor.component";
import { RemovePasswordComponent } from "./auth/remove-password.component";
import { SetPasswordComponent } from "./auth/set-password.component";
import { EmergencyAccessViewComponent } from "./auth/settings/emergency-access/emergency-access-view.component";
import { EmergencyAccessComponent } from "./auth/settings/emergency-access/emergency-access.component";
import { SsoComponent } from "./auth/sso.component";
import { TwoFactorComponent } from "./auth/two-factor.component";
import { UpdatePasswordComponent } from "./auth/update-password.component";
import { UpdateTempPasswordComponent } from "./auth/update-temp-password.component";
import { VerifyEmailTokenComponent } from "./auth/verify-email-token.component";
import { VerifyRecoverDeleteComponent } from "./auth/verify-recover-delete.component";
import { HomeGuard } from "./guards/home.guard"; import { HomeGuard } from "./guards/home.guard";
import { FrontendLayoutComponent } from "./layouts/frontend-layout.component"; import { FrontendLayoutComponent } from "./layouts/frontend-layout.component";
import { UserLayoutComponent } from "./layouts/user-layout.component"; import { UserLayoutComponent } from "./layouts/user-layout.component";

View File

@ -1,11 +1,10 @@
import { NgModule } from "@angular/core"; import { NgModule } from "@angular/core";
import { LoginModule } from "../auth/login/login.module";
import { TrialInitiationModule } from "./accounts/trial-initiation/trial-initiation.module"; import { TrialInitiationModule } from "./accounts/trial-initiation/trial-initiation.module";
import { OrganizationCreateModule } from "./admin-console/organizations/create/organization-create.module"; import { OrganizationCreateModule } from "./admin-console/organizations/create/organization-create.module";
import { OrganizationManageModule } from "./admin-console/organizations/manage/organization-manage.module"; import { OrganizationManageModule } from "./admin-console/organizations/manage/organization-manage.module";
import { OrganizationUserModule } from "./admin-console/organizations/users/organization-user.module"; import { OrganizationUserModule } from "./admin-console/organizations/users/organization-user.module";
import { LoginModule } from "./auth/login/login.module";
import { LooseComponentsModule, SharedModule } from "./shared"; import { LooseComponentsModule, SharedModule } from "./shared";
import { OrganizationBadgeModule } from "./vault/individual-vault/organization-badge/organization-badge.module"; import { OrganizationBadgeModule } from "./vault/individual-vault/organization-badge/organization-badge.module";
import { VaultFilterModule } from "./vault/individual-vault/vault-filter/vault-filter.module"; import { VaultFilterModule } from "./vault/individual-vault/vault-filter/vault-filter.module";

View File

@ -5,7 +5,7 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { StateService } from "@bitwarden/common/abstractions/state.service"; import { StateService } from "@bitwarden/common/abstractions/state.service";
import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service";
import { DeauthorizeSessionsComponent } from "../../auth/settings/deauthorize-sessions.component"; import { DeauthorizeSessionsComponent } from "../auth/settings/deauthorize-sessions.component";
import { DeleteAccountComponent } from "./delete-account.component"; import { DeleteAccountComponent } from "./delete-account.component";
import { PurgeVaultComponent } from "./purge-vault.component"; import { PurgeVaultComponent } from "./purge-vault.component";

View File

@ -1,7 +1,7 @@
import { NgModule } from "@angular/core"; import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router"; import { RouterModule, Routes } from "@angular/router";
import { TwoFactorSetupComponent } from "../../auth/settings/two-factor-setup.component"; import { TwoFactorSetupComponent } from "../auth/settings/two-factor-setup.component";
import { ChangePasswordComponent } from "./change-password.component"; import { ChangePasswordComponent } from "./change-password.component";
import { SecurityKeysComponent } from "./security-keys.component"; import { SecurityKeysComponent } from "./security-keys.component";

View File

@ -1,38 +1,5 @@
import { NgModule } from "@angular/core"; import { NgModule } from "@angular/core";
import { AcceptEmergencyComponent } from "../../auth/accept-emergency.component";
import { AcceptOrganizationComponent } from "../../auth/accept-organization.component";
import { HintComponent } from "../../auth/hint.component";
import { LockComponent } from "../../auth/lock.component";
import { RecoverDeleteComponent } from "../../auth/recover-delete.component";
import { RecoverTwoFactorComponent } from "../../auth/recover-two-factor.component";
import { RegisterFormModule } from "../../auth/register-form/register-form.module";
import { RemovePasswordComponent } from "../../auth/remove-password.component";
import { SetPasswordComponent } from "../../auth/set-password.component";
import { DeauthorizeSessionsComponent } from "../../auth/settings/deauthorize-sessions.component";
import { EmergencyAccessAddEditComponent } from "../../auth/settings/emergency-access/emergency-access-add-edit.component";
import { EmergencyAccessAttachmentsComponent } from "../../auth/settings/emergency-access/emergency-access-attachments.component";
import { EmergencyAccessConfirmComponent } from "../../auth/settings/emergency-access/emergency-access-confirm.component";
import { EmergencyAccessTakeoverComponent } from "../../auth/settings/emergency-access/emergency-access-takeover.component";
import { EmergencyAccessViewComponent } from "../../auth/settings/emergency-access/emergency-access-view.component";
import { EmergencyAccessComponent } from "../../auth/settings/emergency-access/emergency-access.component";
import { EmergencyAddEditComponent } from "../../auth/settings/emergency-access/emergency-add-edit.component";
import { TwoFactorAuthenticatorComponent } from "../../auth/settings/two-factor-authenticator.component";
import { TwoFactorDuoComponent } from "../../auth/settings/two-factor-duo.component";
import { TwoFactorEmailComponent } from "../../auth/settings/two-factor-email.component";
import { TwoFactorRecoveryComponent } from "../../auth/settings/two-factor-recovery.component";
import { TwoFactorSetupComponent } from "../../auth/settings/two-factor-setup.component";
import { TwoFactorVerifyComponent } from "../../auth/settings/two-factor-verify.component";
import { TwoFactorWebAuthnComponent } from "../../auth/settings/two-factor-webauthn.component";
import { TwoFactorYubiKeyComponent } from "../../auth/settings/two-factor-yubikey.component";
import { VerifyEmailComponent } from "../../auth/settings/verify-email.component";
import { SsoComponent } from "../../auth/sso.component";
import { TwoFactorOptionsComponent } from "../../auth/two-factor-options.component";
import { TwoFactorComponent } from "../../auth/two-factor.component";
import { UpdatePasswordComponent } from "../../auth/update-password.component";
import { UpdateTempPasswordComponent } from "../../auth/update-temp-password.component";
import { VerifyEmailTokenComponent } from "../../auth/verify-email-token.component";
import { VerifyRecoverDeleteComponent } from "../../auth/verify-recover-delete.component";
import { OrganizationSwitcherComponent } from "../admin-console/components/organization-switcher.component"; import { OrganizationSwitcherComponent } from "../admin-console/components/organization-switcher.component";
import { OrganizationCreateModule } from "../admin-console/organizations/create/organization-create.module"; import { OrganizationCreateModule } from "../admin-console/organizations/create/organization-create.module";
import { OrganizationLayoutComponent } from "../admin-console/organizations/layouts/organization-layout.component"; import { OrganizationLayoutComponent } from "../admin-console/organizations/layouts/organization-layout.component";
@ -51,6 +18,39 @@ import { ProvidersComponent } from "../admin-console/providers/providers.compone
import { CreateOrganizationComponent } from "../admin-console/settings/create-organization.component"; import { CreateOrganizationComponent } from "../admin-console/settings/create-organization.component";
import { SponsoredFamiliesComponent } from "../admin-console/settings/sponsored-families.component"; import { SponsoredFamiliesComponent } from "../admin-console/settings/sponsored-families.component";
import { SponsoringOrgRowComponent } from "../admin-console/settings/sponsoring-org-row.component"; import { SponsoringOrgRowComponent } from "../admin-console/settings/sponsoring-org-row.component";
import { AcceptEmergencyComponent } from "../auth/accept-emergency.component";
import { AcceptOrganizationComponent } from "../auth/accept-organization.component";
import { HintComponent } from "../auth/hint.component";
import { LockComponent } from "../auth/lock.component";
import { RecoverDeleteComponent } from "../auth/recover-delete.component";
import { RecoverTwoFactorComponent } from "../auth/recover-two-factor.component";
import { RegisterFormModule } from "../auth/register-form/register-form.module";
import { RemovePasswordComponent } from "../auth/remove-password.component";
import { SetPasswordComponent } from "../auth/set-password.component";
import { DeauthorizeSessionsComponent } from "../auth/settings/deauthorize-sessions.component";
import { EmergencyAccessAddEditComponent } from "../auth/settings/emergency-access/emergency-access-add-edit.component";
import { EmergencyAccessAttachmentsComponent } from "../auth/settings/emergency-access/emergency-access-attachments.component";
import { EmergencyAccessConfirmComponent } from "../auth/settings/emergency-access/emergency-access-confirm.component";
import { EmergencyAccessTakeoverComponent } from "../auth/settings/emergency-access/emergency-access-takeover.component";
import { EmergencyAccessViewComponent } from "../auth/settings/emergency-access/emergency-access-view.component";
import { EmergencyAccessComponent } from "../auth/settings/emergency-access/emergency-access.component";
import { EmergencyAddEditComponent } from "../auth/settings/emergency-access/emergency-add-edit.component";
import { TwoFactorAuthenticatorComponent } from "../auth/settings/two-factor-authenticator.component";
import { TwoFactorDuoComponent } from "../auth/settings/two-factor-duo.component";
import { TwoFactorEmailComponent } from "../auth/settings/two-factor-email.component";
import { TwoFactorRecoveryComponent } from "../auth/settings/two-factor-recovery.component";
import { TwoFactorSetupComponent } from "../auth/settings/two-factor-setup.component";
import { TwoFactorVerifyComponent } from "../auth/settings/two-factor-verify.component";
import { TwoFactorWebAuthnComponent } from "../auth/settings/two-factor-webauthn.component";
import { TwoFactorYubiKeyComponent } from "../auth/settings/two-factor-yubikey.component";
import { VerifyEmailComponent } from "../auth/settings/verify-email.component";
import { SsoComponent } from "../auth/sso.component";
import { TwoFactorOptionsComponent } from "../auth/two-factor-options.component";
import { TwoFactorComponent } from "../auth/two-factor.component";
import { UpdatePasswordComponent } from "../auth/update-password.component";
import { UpdateTempPasswordComponent } from "../auth/update-temp-password.component";
import { VerifyEmailTokenComponent } from "../auth/verify-email-token.component";
import { VerifyRecoverDeleteComponent } from "../auth/verify-recover-delete.component";
import { AddCreditComponent } from "../billing/settings/add-credit.component"; import { AddCreditComponent } from "../billing/settings/add-credit.component";
import { AdjustPaymentComponent } from "../billing/settings/adjust-payment.component"; import { AdjustPaymentComponent } from "../billing/settings/adjust-payment.component";
import { BillingHistoryViewComponent } from "../billing/settings/billing-history-view.component"; import { BillingHistoryViewComponent } from "../billing/settings/billing-history-view.component";