Invalid.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Second authentication factor handling
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. namespace PhpMyAdmin\Plugins\TwoFactor;
  9. use PhpMyAdmin\Plugins\TwoFactorPlugin;
  10. use PhpMyAdmin\Template;
  11. /**
  12. * Invalid two-factor authentication showing that configured choice is not available.
  13. */
  14. class Invalid extends TwoFactorPlugin
  15. {
  16. /**
  17. * @var string
  18. */
  19. public static $id = 'invalid';
  20. public static $showSubmit = false;
  21. /**
  22. * Checks authentication, returns true on success
  23. *
  24. * @return boolean
  25. */
  26. public function check()
  27. {
  28. return false;
  29. }
  30. /**
  31. * Renders user interface to enter two-factor authentication
  32. *
  33. * @return string HTML code
  34. */
  35. public function render()
  36. {
  37. return Template::get('login/twofactor/invalid')->render();
  38. }
  39. /**
  40. * Get user visible name
  41. *
  42. * @return string
  43. */
  44. public static function getName()
  45. {
  46. return 'Invalid two-factor authentication';
  47. }
  48. /**
  49. * Get user visible description
  50. *
  51. * @return string
  52. */
  53. public static function getDescription()
  54. {
  55. return 'Error fallback only!';
  56. }
  57. }