protected function GALoginHotpValidation::getSeed in Google Authenticator login 8
Get seed for this account.
Return value
string Decrypted account OTP seed or FALSE if none exists.
2 calls to GALoginHotpValidation::getSeed()
- GALoginHotpValidation::ready in src/
Plugin/ TfaValidation/ GALoginHotpValidation.php - Determine if the plugin can run for the current TFA context.
- GALoginHotpValidation::validate in src/
Plugin/ TfaValidation/ GALoginHotpValidation.php - Validate code.
File
- src/
Plugin/ TfaValidation/ GALoginHotpValidation.php, line 285
Class
- GALoginHotpValidation
- HOTP validation class for performing HOTP validation.
Namespace
Drupal\ga_login\Plugin\TfaValidationCode
protected function getSeed() {
// Lookup seed for account and decrypt.
$result = $this
->getUserData('tfa', 'tfa_hotp_seed', $this->uid, $this->userData);
if (!empty($result)) {
$encrypted = base64_decode($result['seed']);
$seed = $this
->decrypt($encrypted);
if (!empty($seed)) {
return $seed;
}
}
return FALSE;
}