Symfony\Component\Security\Core\Authentication\Token\TokenInterface
TokenInterface is the interface for the user authentication information.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
interface TokenInterface
extends Serializable
{
- // methods
- public string __toString()
- public array getRoles()
- public mixed getCredentials()
- public mixed getUser()
- public void setUser()
- public string getUsername()
- public Boolean isAuthenticated()
- public void setAuthenticated()
- public void eraseCredentials()
- public array getAttributes()
- public void setAttributes()
- public Boolean hasAttribute()
- public mixed getAttribute()
- public void setAttribute()
- // Inherited methods from Serializable
- public string serialize()
- public void unserialize()
Hierarchy
Extends
Implemented by
- Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken
- Symfony\Component\Security\Core\Authentication\Token\AnonymousToken
- Symfony\Component\Security\Core\Authentication\Token\AbstractToken
- Symfony\Component\Security\Core\Authentication\Token\RememberMeToken
- Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken
Methods
public
- __toString() — Returns a string representation of the Token.
- eraseCredentials() — Removes sensitive information from the token.
- getAttribute() — Returns an attribute value.
- getAttributes() — Returns the token attributes.
- getCredentials() — Returns the user credentials.
- getRoles() — Returns the user roles.
- getUser() — Returns a user representation.
- getUsername() — Returns the username.
- hasAttribute() — Returns true if the attribute exists.
- isAuthenticated() — Returns whether the user is authenticated or not.
- setAttribute() — Sets an attribute.
- setAttributes() — Sets the token attributes.
- setAuthenticated() — Sets the authenticated flag.
- setUser() — Sets a user.
Inherited from Serializable
public
- serialize() — String representation of object
- unserialize() — Constructs the object