public function GALoginHotpValidation::storeSeed in Google Authenticator login 8
Save seed for account.
Parameters
string $seed: Un-encrypted seed.
1 call to GALoginHotpValidation::storeSeed()
- GALoginHotpSetup::submitSetupForm in src/
Plugin/ TfaSetup/ GALoginHotpSetup.php - Submit the setup form.
File
- src/
Plugin/ TfaValidation/ GALoginHotpValidation.php, line 305
Class
- GALoginHotpValidation
- HOTP validation class for performing HOTP validation.
Namespace
Drupal\ga_login\Plugin\TfaValidationCode
public function storeSeed($seed) {
// Encrypt seed for storage.
$encrypted = $this
->encrypt($seed);
$record = [
'tfa_hotp_seed' => [
'seed' => base64_encode($encrypted),
'created' => $this->time
->getRequestTime(),
],
];
$this
->setUserData('tfa', $record, $this->uid, $this->userData);
}