mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-31 08:04:54 +00:00
refactor(web): replace SOGoGoogleAuthenticatorEnabled with
SOGoTOTPEnabled Fixes #5294
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user