mirror of
https://github.com/bitwarden/jslib
synced 2025-12-17 16:53:20 +00:00
[authService refactor] Fix browser by not using instanceof (#647)
* use authenticationType enum instead of instanceof
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { AuthenticationType } from "../../enums/authenticationType";
|
||||
|
||||
import { TokenRequestTwoFactor } from "../request/identityToken/tokenRequest";
|
||||
|
||||
export class PasswordLogInCredentials {
|
||||
readonly type = AuthenticationType.Password;
|
||||
|
||||
constructor(
|
||||
public email: string,
|
||||
public masterPassword: string,
|
||||
@@ -10,6 +14,8 @@ export class PasswordLogInCredentials {
|
||||
}
|
||||
|
||||
export class SsoLogInCredentials {
|
||||
readonly type = AuthenticationType.Sso;
|
||||
|
||||
constructor(
|
||||
public code: string,
|
||||
public codeVerifier: string,
|
||||
@@ -20,5 +26,7 @@ export class SsoLogInCredentials {
|
||||
}
|
||||
|
||||
export class ApiLogInCredentials {
|
||||
readonly type = AuthenticationType.Api;
|
||||
|
||||
constructor(public clientId: string, public clientSecret: string) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user