thingsboard/ui-ngx/src/app/shared/models/two-factor-auth.models.ts

31 lines
875 B
TypeScript
Raw Normal View History

2022-04-28 23:03:37 +03:00
export interface TwoFactorAuthSettings {
maxVerificationFailuresBeforeUserLockout: number;
providers: Array<TwoFactorAuthProviderConfig>;
totalAllowedTimeForVerification: number;
useSystemTwoFactorAuthSettings: boolean;
verificationCodeCheckRateLimit: string;
verificationCodeSendRateLimit: string;
}
export type TwoFactorAuthProviderConfig = Partial<TotpTwoFactorAuthProviderConfig | SmsTwoFactorAuthProviderConfig>
export interface TotpTwoFactorAuthProviderConfig {
providerType: TwoFactorAuthProviderType;
issuerName: string;
}
export interface SmsTwoFactorAuthProviderConfig {
providerType: TwoFactorAuthProviderType;
smsVerificationMessageTemplate: string;
verificationCodeLifetime: number;
}
export enum TwoFactorAuthProviderType{
TOTP = 'TOTP',
SMS = 'SMS'
}
export interface TwoFactorAuthSettingsForm extends TwoFactorAuthSettings {
}