AuthenticationInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Model;
  7. use Magento\Framework\Exception\InvalidEmailOrPasswordException;
  8. use Magento\Framework\Exception\State\UserLockedException;
  9. /**
  10. * Interface \Magento\Customer\Model\AuthenticationInterface
  11. * @api
  12. * @since 100.1.0
  13. */
  14. interface AuthenticationInterface
  15. {
  16. /**
  17. * Process customer authentication failure
  18. *
  19. * @param int $customerId
  20. * @return void
  21. * @since 100.1.0
  22. */
  23. public function processAuthenticationFailure($customerId);
  24. /**
  25. * Unlock customer
  26. *
  27. * @param int $customerId
  28. * @return void
  29. * @since 100.1.0
  30. */
  31. public function unlock($customerId);
  32. /**
  33. * Check if a customer is locked
  34. *
  35. * @param int $customerId
  36. * @return boolean
  37. * @since 100.1.0
  38. */
  39. public function isLocked($customerId);
  40. /**
  41. * Authenticate customer
  42. *
  43. * @param int $customerId
  44. * @param string $password
  45. * @return boolean
  46. * @throws InvalidEmailOrPasswordException
  47. * @throws UserLockedException
  48. * @since 100.1.0
  49. */
  50. public function authenticate($customerId, $password);
  51. }