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