2018-02-19 19:07:19 +01:00
|
|
|
import { TwoFactorProviderType } from "../../enums/twoFactorProviderType";
|
2022-02-01 00:51:32 +01:00
|
|
|
import { Utils } from "../../misc/utils";
|
|
|
|
|
2018-02-02 04:55:49 +01:00
|
|
|
export class AuthResult {
|
2022-02-22 15:39:11 +01:00
|
|
|
captchaSiteKey = "";
|
|
|
|
resetMasterPassword = false;
|
|
|
|
forcePasswordReset = false;
|
2018-02-02 04:55:49 +01:00
|
|
|
twoFactorProviders: Map<TwoFactorProviderType, { [key: string]: string }> = null;
|
2022-02-01 00:51:32 +01:00
|
|
|
|
|
|
|
get requiresCaptcha() {
|
|
|
|
return !Utils.isNullOrWhitespace(this.captchaSiteKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
get requiresTwoFactor() {
|
|
|
|
return this.twoFactorProviders != null;
|
|
|
|
}
|
2018-02-02 04:55:49 +01:00
|
|
|
}
|