PersistentTokenInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Security\Core\Authentication\RememberMe;
  11. /**
  12. * Interface to be implemented by persistent token classes (such as
  13. * Doctrine entities representing a remember-me token).
  14. *
  15. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  16. */
  17. interface PersistentTokenInterface
  18. {
  19. /**
  20. * Returns the class of the user.
  21. *
  22. * @return string
  23. */
  24. public function getClass();
  25. /**
  26. * Returns the username.
  27. *
  28. * @return string
  29. */
  30. public function getUsername();
  31. /**
  32. * Returns the series.
  33. *
  34. * @return string
  35. */
  36. public function getSeries();
  37. /**
  38. * Returns the token value.
  39. *
  40. * @return string
  41. */
  42. public function getTokenValue();
  43. /**
  44. * Returns the time the token was last used.
  45. *
  46. * @return \DateTime
  47. */
  48. public function getLastUsed();
  49. }