public function TfaTotp::__construct in TFA Basic plugins 7
@copydoc TfaBasePlugin::__construct()
Overrides TfaBasePlugin::__construct
1 call to TfaTotp::__construct()
- TfaTotpSetup::__construct in includes/
tfa_totp.inc - @copydoc TfaBasePlugin::__construct()
1 method overrides TfaTotp::__construct()
- TfaTotpSetup::__construct in includes/
tfa_totp.inc - @copydoc TfaBasePlugin::__construct()
File
- includes/
tfa_totp.inc, line 30 - classes for tfa_totp
Class
- TfaTotp
- Class TfaTotp
Code
public function __construct(array $context) {
parent::__construct($context);
$this->ga = new PHPGangsta_GoogleAuthenticator();
// Allow codes within tolerance range of 3 * 30 second units.
$this->timeSkew = variable_get('tfa_basic_time_skew', 3);
// Recommended: set variable tfa_totp_secret_key in settings.php.
$this->encryptionKey = variable_get('tfa_basic_secret_key', drupal_get_private_key());
$this->alreadyAccepted = FALSE;
}