1
0
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:
Kyle Spearrin
2018-10-08 14:21:53 -04:00
parent c3f67dbe26
commit 4b7962dc8f
5 changed files with 43 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
import { PasswordVerificationRequest } from './passwordVerificationRequest';
export class UpdateTwoFactorU2fDeleteRequest extends PasswordVerificationRequest {
id: number;
}

View File

@@ -2,4 +2,6 @@ import { PasswordVerificationRequest } from './passwordVerificationRequest';
export class UpdateTwoFactorU2fRequest extends PasswordVerificationRequest {
deviceResponse: string;
name: string;
id: number;
}

View File

@@ -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;
}
}