public function TfaRecoveryCode::validateRequest in Two-factor Authentication (TFA) 8
Simple validate for web services.
Parameters
int $code: OTP Code.
Return value
bool True if validation was successful otherwise false.
File
- src/
Plugin/ TfaValidation/ TfaRecoveryCode.php, line 154
Class
- TfaRecoveryCode
- Recovery validation class for performing recovery codes validation.
Namespace
Drupal\tfa\Plugin\TfaValidationCode
public function validateRequest($code) {
if ($this
->validate($code)) {
$this
->storeAcceptedCode($code);
return TRUE;
}
return FALSE;
}