interface TfaValidationInterface in Two-factor Authentication (TFA) 8
Interface TfaValidationInterface.
Validation plugins interact with the Tfa form processes to provide code entry and validate submitted codes.
Hierarchy
- interface \Drupal\tfa\Plugin\TfaValidationInterface
Expanded class hierarchy of TfaValidationInterface
All classes that implement TfaValidationInterface
4 files declare their use of TfaValidationInterface
- TfaContextTest.php in tests/
src/ Unit/ TfaContextTest.php - TfaRecoveryCode.php in src/
Plugin/ TfaValidation/ TfaRecoveryCode.php - TfaTestValidationPlugin.php in tests/
modules/ tfa_test_plugins/ src/ Plugin/ TfaValidation/ TfaTestValidationPlugin.php - TfaTrustedBrowser.php in src/
Plugin/ TfaLogin/ TfaTrustedBrowser.php
File
- src/
Plugin/ TfaValidationInterface.php, line 13
Namespace
Drupal\tfa\PluginView source
interface TfaValidationInterface {
/**
* Get TFA process form from plugin.
*
* @param array $form
* The configuration form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return array
* Form API array.
*/
public function getForm(array $form, FormStateInterface $form_state);
/**
* Validate form.
*
* @param array $form
* The configuration form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return bool
* Whether form passes validation or not
*/
public function validateForm(array $form, FormStateInterface $form_state);
/**
* Check whether the user has setup Tfa for this validation plugin.
*
* @return bool
* Whether or not the user has setup this validation plugin.
*/
public function ready();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TfaValidationInterface:: |
public | function | Get TFA process form from plugin. | 3 |
TfaValidationInterface:: |
public | function | Check whether the user has setup Tfa for this validation plugin. | |
TfaValidationInterface:: |
public | function | Validate form. | 3 |