Symfony\Component\Security\Core\User\UserInterface
Represents the interface that all user classes must implement.
This interface is useful because the authentication layer can deal with
the object through its lifecycle, using the object to get the encoded
password (for checking against a submitted password), assigning roles
and so on.
Regardless of how your user are loaded or where they come from (a database,
configuration, web service, etc), you will have a class that implements
this interface. Objects that implement this interface are created and
loaded by different objects that implement UserProviderInterface
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
interface UserInterface
{
- // methods
- public array getRoles()
- public string getPassword()
- public string getSalt()
- public string getUsername()
- public void eraseCredentials()
Hierarchy
Methods
public
- eraseCredentials() — Removes sensitive data from the user.
- getPassword() — Returns the password used to authenticate the user.
- getRoles() — Returns the roles granted to the user.
- getSalt() — Returns the salt that was originally used to encode the password.
- getUsername() — Returns the username used to authenticate the user.