mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
add two factor apis
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
export class TwoFactorEmailRequest {
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class TwoFactorEmailRequest extends PasswordVerificationRequest {
|
||||
email: string;
|
||||
masterPasswordHash: string;
|
||||
|
||||
constructor(email: string, masterPasswordHash: string) {
|
||||
this.email = email;
|
||||
super();
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
this.email = email;
|
||||
}
|
||||
}
|
||||
|
||||
7
src/models/request/twoFactorProviderRequest.ts
Normal file
7
src/models/request/twoFactorProviderRequest.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
import { TwoFactorProviderType } from '../../enums/twoFactorProviderType';
|
||||
|
||||
export class TwoFactorProviderRequest extends PasswordVerificationRequest {
|
||||
type: TwoFactorProviderType;
|
||||
}
|
||||
6
src/models/request/twoFactorRecoveryRequest.ts
Normal file
6
src/models/request/twoFactorRecoveryRequest.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class TwoFactorRecoveryRequest extends PasswordVerificationRequest {
|
||||
recoveryCode: string;
|
||||
email: string;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class UpdateTwoFactorAuthenticatorRequest extends PasswordVerificationRequest {
|
||||
token: string;
|
||||
key: string;
|
||||
}
|
||||
7
src/models/request/updateTwoFactorDuoRequest.ts
Normal file
7
src/models/request/updateTwoFactorDuoRequest.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class UpdateTwoFactorDuoRequest extends PasswordVerificationRequest {
|
||||
integrationKey: string;
|
||||
secretKey: string;
|
||||
host: string;
|
||||
}
|
||||
6
src/models/request/updateTwoFactorEmailRequest.ts
Normal file
6
src/models/request/updateTwoFactorEmailRequest.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class UpdateTwoFactorEmailRequest extends PasswordVerificationRequest {
|
||||
token: string;
|
||||
email: string;
|
||||
}
|
||||
5
src/models/request/updateTwoFactorU2fRequest.ts
Normal file
5
src/models/request/updateTwoFactorU2fRequest.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class UpdateTwoFactorU2fRequest extends PasswordVerificationRequest {
|
||||
deviceResponse: string;
|
||||
}
|
||||
10
src/models/request/updateTwoFactorYubioOtpRequest.ts
Normal file
10
src/models/request/updateTwoFactorYubioOtpRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class UpdateTwoFactorYubioOtpRequest extends PasswordVerificationRequest {
|
||||
key1: string;
|
||||
key2: string;
|
||||
key3: string;
|
||||
key4: string;
|
||||
key5: string;
|
||||
nfc: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user