1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

[PM-3198][PM-3199] Rename PasswordlessLoginStrategy (#6425)

* rename to LoginWithDeviceLoginStrategy

* rename LoginWithDeviceComponent

* update translation for web route

* rename strategy to AuthRequestLoginStrategy

* rename PasswordlessLogInCredentials and PasswordlessCreateAuthRequest

* rename setPasswordlessAccessCode

* rename startPasswordlessLogin() in template files

* rename startPasswordlessLogin() for browser template file

* rename AuthenticationType.Passwordless

* standardize LogInStrategy to LoginStrategy

* standardize PasswordLogInStrategy to PasswordLoginStrategy

* standardize SsoLogInStrategy to SsoLoginStrategy

* standardize UserApiLogInStrategy to UserApiLoginStrategy

* standardize naming of login credentials

* rename log-in-credentials.ts to login-credentials.ts
This commit is contained in:
rr-bw
2023-10-25 11:15:05 -07:00
committed by GitHub
parent 8dd17bd55a
commit 5868d76b91
38 changed files with 250 additions and 254 deletions

View File

@@ -32,7 +32,7 @@
</div>
<div class="tw-my-10" *ngIf="showResendNotification">
<a [routerLink]="[]" disabled="true" (click)="startPasswordlessLogin()">{{
<a [routerLink]="[]" disabled="true" (click)="startAuthRequestLogin()">{{
"resendNotification" | i18n
}}</a>
</div>

View File

@@ -1,7 +1,7 @@
import { Component, OnDestroy, OnInit } from "@angular/core";
import { Router } from "@angular/router";
import { LoginWithDeviceComponent as BaseLoginWithDeviceComponent } from "@bitwarden/angular/auth/components/login-with-device.component";
import { LoginViaAuthRequestComponent as BaseLoginWithDeviceComponent } from "@bitwarden/angular/auth/components/login-via-auth-request.component";
import { AnonymousHubService } from "@bitwarden/common/abstractions/anonymousHub.service";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { AuthRequestCryptoServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth-request-crypto.service.abstraction";
@@ -21,10 +21,10 @@ import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/ge
import { StateService } from "../../core";
@Component({
selector: "app-login-with-device",
templateUrl: "login-with-device.component.html",
selector: "app-login-via-auth-request",
templateUrl: "login-via-auth-request.component.html",
})
export class LoginWithDeviceComponent
export class LoginViaAuthRequestComponent
extends BaseLoginWithDeviceComponent
implements OnInit, OnDestroy
{

View File

@@ -108,7 +108,7 @@
type="button"
[block]="true"
buttonType="secondary"
(click)="startPasswordlessLogin()"
(click)="startAuthRequestLogin()"
>
<span> <i class="bwi bwi-mobile"></i> {{ "loginWithDevice" | i18n }} </span>
</button>

View File

@@ -5,12 +5,12 @@ import { CheckboxModule } from "@bitwarden/components";
import { SharedModule } from "../../../app/shared";
import { LoginDecryptionOptionsComponent } from "./login-decryption-options/login-decryption-options.component";
import { LoginWithDeviceComponent } from "./login-with-device.component";
import { LoginViaAuthRequestComponent } from "./login-via-auth-request.component";
import { LoginComponent } from "./login.component";
@NgModule({
imports: [SharedModule, CheckboxModule],
declarations: [LoginComponent, LoginWithDeviceComponent, LoginDecryptionOptionsComponent],
exports: [LoginComponent, LoginWithDeviceComponent, LoginDecryptionOptionsComponent],
declarations: [LoginComponent, LoginViaAuthRequestComponent, LoginDecryptionOptionsComponent],
exports: [LoginComponent, LoginViaAuthRequestComponent, LoginDecryptionOptionsComponent],
})
export class LoginModule {}

View File

@@ -22,7 +22,7 @@ import { AcceptOrganizationComponent } from "./auth/accept-organization.componen
import { HintComponent } from "./auth/hint.component";
import { LockComponent } from "./auth/lock.component";
import { LoginDecryptionOptionsComponent } from "./auth/login/login-decryption-options/login-decryption-options.component";
import { LoginWithDeviceComponent } from "./auth/login/login-with-device.component";
import { LoginViaAuthRequestComponent } from "./auth/login/login-via-auth-request.component";
import { LoginComponent } from "./auth/login/login.component";
import { RecoverDeleteComponent } from "./auth/recover-delete.component";
import { RecoverTwoFactorComponent } from "./auth/recover-two-factor.component";
@@ -66,13 +66,13 @@ const routes: Routes = [
{ path: "login", component: LoginComponent, canActivate: [UnauthGuard] },
{
path: "login-with-device",
component: LoginWithDeviceComponent,
component: LoginViaAuthRequestComponent,
data: { titleId: "loginWithDevice" },
},
{
path: "admin-approval-requested",
component: LoginWithDeviceComponent,
data: { titleId: "loginWithDevice" },
component: LoginViaAuthRequestComponent,
data: { titleId: "adminApprovalRequested" },
},
{ path: "2fa", component: TwoFactorComponent, canActivate: [UnauthGuard] },
{