Minor code cleanup

This commit is contained in:
Thomas Bruederli 2015-06-04 16:18:56 +02:00
parent 1b10eb060a
commit c83d6d7341
6 changed files with 6 additions and 6 deletions

View file

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// available methods/providers
// available methods/providers. Supported methods are: 'totp','hotp','yubikey'
$config['kolab_2fa_drivers'] = array('totp','hotp');
// backend for storing 2-factor-auth related per-user settings
@ -40,12 +40,14 @@ $config['kolab_2fa_storage_config'] = array(
'uid' => 'uid',
'mail' => 'mail',
'totp' => 'kolabAuthTOTP',
'hotp' => 'kolabAuthHOTP',
'yubikey' => 'kolabAuthYubikey',
),
'debug' => true,
);
// force a two-factor authentication for all users
// to be set by another plugin (e.g. kolab_auth based on LDAP roles)
// $config['kolab_2fa_factors'] = array('totp');
// timeout for 2nd factor auth submission (in seconds)

View file

@ -118,7 +118,7 @@ class kolab_2fa extends rcube_plugin
public function login_step($factors)
{
// replace handler for login form
$this->login_factors = $factors;
$this->login_factors = array_values($factors);
$this->api->output->add_handler('loginform', array($this, 'auth_form'));
// focus the code input field on load

View file

@ -212,7 +212,6 @@ abstract class Base
public function clear()
{
if ($this->storage) {
console('CLEAR prefs');
$this->storage->remove($this->username . ':' . $this->method);
}
}

View file

@ -98,7 +98,7 @@ class HOTP extends Base
// store incremented counter value
$this->set('counter', $this->backend->getCounter());
console('VERIFY HOTP', $this->username, $secret, $counter, $code, $pass);
// console('VERIFY HOTP', $this->username, $secret, $counter, $code, $pass);
return $pass;
}

View file

@ -98,7 +98,7 @@ class TOTP extends Base
}
}
console('VERIFY TOTP', $this->username, $secret, $code, $timestamp, $pass);
// console('VERIFY TOTP', $this->username, $secret, $code, $timestamp, $pass);
return $pass;
}

View file

@ -25,7 +25,6 @@ $labels['or'] = 'or';
$labels['yes'] = 'yes';
$labels['now'] = 'no';
$labels['qrcode'] = 'QR Code';
$labels['showqrcode'] = 'Show QR Code';
$labels['qrcodeexplaintotp'] = 'Download an authenticator app on your phone. Two apps which work well are <strong>FreeOTP</strong> and <strong>Google Authenticator</strong>, but any other TOTP app should also work.<br/><br/>