1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

updates for 2fa auth services

This commit is contained in:
Kyle Spearrin
2018-02-01 22:55:49 -05:00
parent 5845291aaf
commit 7c3bed1737
12 changed files with 195 additions and 36 deletions

View File

@@ -0,0 +1,17 @@
import { TwoFactorProviderType } from '../../enums/twoFactorProviderType';
export class IdentityTwoFactorResponse {
twoFactorProviders: TwoFactorProviderType[];
twoFactorProviders2 = new Map<TwoFactorProviderType, { [key: string]: string; }>();
constructor(response: any) {
this.twoFactorProviders = response.TwoFactorProviders;
if (response.TwoFactorProviders2 != null) {
for (const prop in response.TwoFactorProviders2) {
if (response.TwoFactorProviders2.hasOwnProperty(prop)) {
this.twoFactorProviders2.set(parseInt(prop, null), response.TwoFactorProviders2[prop]);
}
}
}
}
}