mirror of
https://github.com/bitwarden/browser
synced 2026-02-22 04:14:04 +00:00
Refactor TwoFactorFormCacheService
This commit is contained in:
19
libs/common/src/auth/models/view/two-factor-form.view.ts
Normal file
19
libs/common/src/auth/models/view/two-factor-form.view.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Jsonify } from "type-fest";
|
||||
|
||||
import { View } from "@bitwarden/common/models/view/view";
|
||||
|
||||
import { TwoFactorProviderType } from "../../enums/two-factor-provider-type";
|
||||
|
||||
/**
|
||||
* This is a cache model for the two factor form.
|
||||
*/
|
||||
export class TwoFactorFormView implements View {
|
||||
token: string | undefined = undefined;
|
||||
remember: boolean | undefined = undefined;
|
||||
selectedProviderType: TwoFactorProviderType | undefined = undefined;
|
||||
emailSent: boolean | undefined = undefined;
|
||||
|
||||
static fromJSON(obj: Partial<Jsonify<TwoFactorFormView>>): TwoFactorFormView {
|
||||
return Object.assign(new TwoFactorFormView(), obj);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user