refactor(web): replace SOGoGoogleAuthenticatorEnabled with

SOGoTOTPEnabled

Fixes #5294
This commit is contained in:
Francis Lachapelle
2021-06-16 14:59:02 -04:00
parent 34184aa3fc
commit 20b2fd5e45
11 changed files with 40 additions and 36 deletions
@@ -94,8 +94,8 @@
}
else {
// Check for TOTP
if (typeof data.GoogleAuthenticatorMissingKey != 'undefined' && response.status == 202) {
d.resolve({gamissingkey: 1});
if (typeof data.totpMissingKey != 'undefined' && response.status == 202) {
d.resolve({totpmissingkey: 1});
}
// Check password policy
else if (typeof data.expire != 'undefined' && typeof data.grace != 'undefined') {
@@ -125,7 +125,7 @@
}
}, function(error) {
var response, perr, data = error.data;
if (data && data.GoogleAuthenticatorInvalidKey) {
if (data && data.totpInvalidKey) {
response = {error: l('You provided an invalid TOTP key.')};
}
else if (data && angular.isDefined(data.LDAPPasswordPolicyError)) {
+3 -3
View File
@@ -25,7 +25,7 @@
this.creds.language = $window.language;
this.loginState = false;
// Code pattern for Google verification code
// Code pattern for TOTP verification code
this.verificationCodePattern = '\\d{6}';
// Password policy - change expired password
@@ -41,8 +41,8 @@
Authentication.login(vm.creds)
.then(function(data) {
if (data.gamissingkey) {
vm.loginState = 'googleauthenticatorcode';
if (data.totpmissingkey) {
vm.loginState = 'totpcode';
}
else {
vm.loginState = 'logged';