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:
17
src/models/response/identityTwoFactorResponse.ts
Normal file
17
src/models/response/identityTwoFactorResponse.ts
Normal 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user