sfSecurityUser.class.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  5. * (c) 2004-2006 Sean Kerr <sean@code-box.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * sfSecurityUser interface provides advanced security manipulation methods.
  12. *
  13. * @package symfony
  14. * @subpackage user
  15. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  16. * @author Sean Kerr <sean@code-box.org>
  17. * @version SVN: $Id: sfSecurityUser.class.php 9060 2008-05-19 21:31:17Z FabianLange $
  18. */
  19. interface sfSecurityUser
  20. {
  21. /**
  22. * Add a credential to this user.
  23. *
  24. * @param mixed Credential data.
  25. */
  26. public function addCredential($credential);
  27. /**
  28. * Clear all credentials associated with this user.
  29. */
  30. public function clearCredentials();
  31. /**
  32. * Indicates whether or not this user has a credential.
  33. *
  34. * @param mixed $credential Credential data.
  35. *
  36. * @return bool true, if this user has the credential, otherwise false.
  37. */
  38. public function hasCredential($credential);
  39. /**
  40. * Indicates whether or not this user is authenticated.
  41. *
  42. * @return bool true, if this user is authenticated, otherwise false.
  43. */
  44. public function isAuthenticated();
  45. /**
  46. * Remove a credential from this user.
  47. *
  48. * @param mixed $credential Credential data.
  49. */
  50. public function removeCredential($credential);
  51. /**
  52. * Set the authenticated status of this user.
  53. *
  54. * @param bool $authenticated A flag indicating the authenticated status of this user.
  55. */
  56. public function setAuthenticated($authenticated);
  57. }