AlertInterface.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * MageSpecialist
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Open Software License (OSL 3.0)
  8. * that is bundled with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/osl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to info@magespecialist.it so we can send you a copy immediately.
  14. *
  15. * @category MSP
  16. * @package MSP_TwoFactorAuth
  17. * @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it)
  18. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  19. */
  20. namespace MSP\TwoFactorAuth\Model;
  21. /**
  22. * @api
  23. */
  24. interface AlertInterface
  25. {
  26. const EVENT_PREFIX = 'twofactor';
  27. const LEVEL_INFO = 'info';
  28. const LEVEL_WARNING = 'warn';
  29. const LEVEL_ERROR = 'error';
  30. const LEVEL_SECURITY_ALERT = 'security_alert';
  31. const ACTION_LOG = 'log';
  32. const ACTION_LOCKDOWN = 'lockdown';
  33. const ALERT_PARAM_LEVEL = 'level';
  34. const ALERT_PARAM_MODULE = 'module';
  35. const ALERT_PARAM_MESSAGE = 'message';
  36. const ALERT_PARAM_USERNAME = 'username';
  37. const ALERT_PARAM_PAYLOAD = 'payload';
  38. /**
  39. * Trigger a security suite event
  40. * @param string $module
  41. * @param string $message
  42. * @param string $level
  43. * @param string $username
  44. * @param string $action
  45. * @param array|string $payload
  46. * @return boolean
  47. */
  48. public function event($module, $message, $level = null, $username = null, $action = null, $payload = null);
  49. }