mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
add support for u2f setup apis
This commit is contained in:
5
src/models/request/updateTwoFactorU2fDeleteRequest.ts
Normal file
5
src/models/request/updateTwoFactorU2fDeleteRequest.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class UpdateTwoFactorU2fDeleteRequest extends PasswordVerificationRequest {
|
||||
id: number;
|
||||
}
|
||||
@@ -2,4 +2,6 @@ import { PasswordVerificationRequest } from './passwordVerificationRequest';
|
||||
|
||||
export class UpdateTwoFactorU2fRequest extends PasswordVerificationRequest {
|
||||
deviceResponse: string;
|
||||
name: string;
|
||||
id: number;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,22 @@
|
||||
export class TwoFactorU2fResponse {
|
||||
enabled: boolean;
|
||||
challenge: ChallengeResponse;
|
||||
keys: KeyResponse[];
|
||||
|
||||
constructor(response: any) {
|
||||
this.enabled = response.Enabled;
|
||||
this.challenge = response.Challenge == null ? null : new ChallengeResponse(response.Challenge);
|
||||
this.keys = response.Keys == null ? null : response.Keys.map((k: any) => new KeyResponse(k));
|
||||
}
|
||||
}
|
||||
|
||||
export class KeyResponse {
|
||||
name: string;
|
||||
id: number;
|
||||
compromised: boolean;
|
||||
|
||||
constructor(response: any) {
|
||||
this.name = response.Name;
|
||||
this.id = response.Id;
|
||||
this.compromised = response.Compromised;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user