Skip to content

Commit

Permalink
Move auth to app folder (#5336)
Browse files Browse the repository at this point in the history
* move auth folder into app folder

* fix auth folder imports

* reorder imports in login component
  • Loading branch information
jlf0dev committed May 2, 2023
1 parent 01244e2 commit 2c51af1
Show file tree
Hide file tree
Showing 78 changed files with 70 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { NgModule } from "@angular/core";

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 { RegisterFormModule } from "../../auth/register-form/register-form.module";
import { BillingComponent } from "../../billing/accounts/trial-initiation/billing.component";
import { LooseComponentsModule, SharedModule } from "../../shared";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";

import { TwoFactorDuoComponent } from "../../../../auth/settings/two-factor-duo.component";
import { TwoFactorSetupComponent as BaseTwoFactorSetupComponent } from "../../../../auth/settings/two-factor-setup.component";
import { TwoFactorDuoComponent } from "../../../auth/settings/two-factor-duo.component";
import { TwoFactorSetupComponent as BaseTwoFactorSetupComponent } from "../../../auth/settings/two-factor-setup.component";

@Component({
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
export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUti
import { StateService } from "@bitwarden/common/abstractions/state.service";
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({
selector: "app-accept-emergency",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 { Utils } from "@bitwarden/common/misc/utils";

import { BaseAcceptComponent } from "../app/common/base.accept.component";
import { BaseAcceptComponent } from "../common/base.accept.component";

@Component({
selector: "app-accept-organization",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { InternalPolicyService } from "@bitwarden/common/admin-console/abstracti
import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";

import { RouterService } from "../app/core";
import { RouterService } from "../core";

@Component({
selector: "app-lock",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { LoginService } from "@bitwarden/common/auth/abstractions/login.service";
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";

import { StateService } from "../../app/core";
import { StateService } from "../../core";

@Component({
selector: "app-login-with-device",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"
import { ListResponse } from "@bitwarden/common/models/response/list.response";
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({
selector: "app-login",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from "@angular/core";

import { CheckboxModule } from "@bitwarden/components";

import { SharedModule } from "../../app/shared";
import { SharedModule } from "../../../app/shared";

import { LoginWithDeviceComponent } from "./login-with-device.component";
import { LoginComponent } from "./login.component";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from "@angular/core";

import { SharedModule } from "../../app/shared";
import { SharedModule } from "../../shared";

import { RegisterFormComponent } from "./register-form.component";

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.v

@Component({
selector: "emergency-access-attachments",
templateUrl: "../../../app/vault/individual-vault/attachments.component.html",
templateUrl: "../../../vault/individual-vault/attachments.component.html",
})
export class EmergencyAccessAttachmentsComponent extends BaseAttachmentsComponent {
viewOnly = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
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({
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 {
originalCipher: Cipher = null;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { LoginService } from "@bitwarden/common/auth/abstractions/login.service"
import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service";
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";

Expand Down
36 changes: 18 additions & 18 deletions apps/web/src/app/oss-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@ import { LockGuard } from "@bitwarden/angular/auth/guards/lock.guard";
import { UnauthGuard } from "@bitwarden/angular/auth/guards/unauth.guard";

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 { TrialInitiationComponent } from "./accounts/trial-initiation/trial-initiation.component";
Expand All @@ -32,6 +14,24 @@ import { AcceptFamilySponsorshipComponent } from "./admin-console/organizations/
import { FamiliesForEnterpriseSetupComponent } from "./admin-console/organizations/sponsorships/families-for-enterprise-setup.component";
import { CreateOrganizationComponent } from "./admin-console/settings/create-organization.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 { FrontendLayoutComponent } from "./layouts/frontend-layout.component";
import { UserLayoutComponent } from "./layouts/user-layout.component";
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/app/oss.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { NgModule } from "@angular/core";

import { LoginModule } from "../auth/login/login.module";

import { TrialInitiationModule } from "./accounts/trial-initiation/trial-initiation.module";
import { OrganizationCreateModule } from "./admin-console/organizations/create/organization-create.module";
import { OrganizationManageModule } from "./admin-console/organizations/manage/organization-manage.module";
import { OrganizationUserModule } from "./admin-console/organizations/users/organization-user.module";
import { LoginModule } from "./auth/login/login.module";
import { LooseComponentsModule, SharedModule } from "./shared";
import { OrganizationBadgeModule } from "./vault/individual-vault/organization-badge/organization-badge.module";
import { VaultFilterModule } from "./vault/individual-vault/vault-filter/vault-filter.module";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/settings/account.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { StateService } from "@bitwarden/common/abstractions/state.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 { PurgeVaultComponent } from "./purge-vault.component";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/settings/security-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from "@angular/core";
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 { SecurityKeysComponent } from "./security-keys.component";
Expand Down
66 changes: 33 additions & 33 deletions apps/web/src/app/shared/loose-components.module.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,5 @@
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 { OrganizationCreateModule } from "../admin-console/organizations/create/organization-create.module";
import { OrganizationLayoutComponent } from "../admin-console/organizations/layouts/organization-layout.component";
Expand All @@ -51,6 +18,39 @@ import { ProvidersComponent } from "../admin-console/providers/providers.compone
import { CreateOrganizationComponent } from "../admin-console/settings/create-organization.component";
import { SponsoredFamiliesComponent } from "../admin-console/settings/sponsored-families.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 { AdjustPaymentComponent } from "../billing/settings/adjust-payment.component";
import { BillingHistoryViewComponent } from "../billing/settings/billing-history-view.component";
Expand Down

0 comments on commit 2c51af1

Please sign in to comment.