1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23: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

@@ -2,7 +2,7 @@ import { MasterKey, UserKey } from "../../../platform/models/domain/symmetric-cr
import { AuthenticationType } from "../../enums/authentication-type";
import { TokenTwoFactorRequest } from "../request/identity-token/token-two-factor.request";
export class PasswordLogInCredentials {
export class PasswordLoginCredentials {
readonly type = AuthenticationType.Password;
constructor(
@@ -13,7 +13,7 @@ export class PasswordLogInCredentials {
) {}
}
export class SsoLogInCredentials {
export class SsoLoginCredentials {
readonly type = AuthenticationType.Sso;
constructor(
@@ -25,14 +25,14 @@ export class SsoLogInCredentials {
) {}
}
export class UserApiLogInCredentials {
export class UserApiLoginCredentials {
readonly type = AuthenticationType.UserApi;
constructor(public clientId: string, public clientSecret: string) {}
}
export class PasswordlessLogInCredentials {
readonly type = AuthenticationType.Passwordless;
export class AuthRequestLoginCredentials {
readonly type = AuthenticationType.AuthRequest;
constructor(
public email: string,

View File

@@ -1,6 +1,6 @@
import { AuthRequestType } from "../../enums/auth-request-type";
export class PasswordlessCreateAuthRequest {
export class CreateAuthRequest {
constructor(
readonly email: string,
readonly deviceIdentifier: string,

View File

@@ -3,7 +3,7 @@ import { TokenTwoFactorRequest } from "./token-two-factor.request";
export abstract class TokenRequest {
protected device?: DeviceRequest;
protected passwordlessAuthRequest: string;
protected authRequest: string;
constructor(protected twoFactor: TokenTwoFactorRequest, device?: DeviceRequest) {
this.device = device != null ? device : null;
@@ -18,8 +18,8 @@ export abstract class TokenRequest {
this.twoFactor = twoFactor;
}
setPasswordlessAccessCode(accessCode: string) {
this.passwordlessAuthRequest = accessCode;
setAuthRequestAccessCode(accessCode: string) {
this.authRequest = accessCode;
}
protected toIdentityToken(clientId: string) {
@@ -37,8 +37,8 @@ export abstract class TokenRequest {
}
//passswordless login
if (this.passwordlessAuthRequest) {
obj.authRequest = this.passwordlessAuthRequest;
if (this.authRequest) {
obj.authRequest = this.authRequest;
}
if (this.twoFactor) {