TokenInterface
interface TokenInterface implements Serializable
TokenInterface is the interface for the user authentication information.
Methods
Returns a string representation of the Token.
Returns the user roles.
Returns the user credentials.
Returns a user representation.
Sets a user.
Returns the username.
Returns whether the user is authenticated or not.
Sets the authenticated flag.
Removes sensitive information from the token.
Returns the token attributes.
Sets the token attributes.
Returns true if the attribute exists.
Returns an attribute value.
Sets an attribute.
Details
at line line 31
string
__toString()
Returns a string representation of the Token.
This is only to be used for debugging purposes.
at line line 38
RoleInterface[]
getRoles()
Returns the user roles.
at line line 45
mixed
getCredentials()
Returns the user credentials.
at line line 55
mixed
getUser()
Returns a user representation.
at line line 62
setUser(mixed $user)
Sets a user.
at line line 69
string
getUsername()
Returns the username.
at line line 76
bool
isAuthenticated()
Returns whether the user is authenticated or not.
at line line 83
setAuthenticated(bool $isAuthenticated)
Sets the authenticated flag.
at line line 88
eraseCredentials()
Removes sensitive information from the token.
at line line 95
array
getAttributes()
Returns the token attributes.
at line line 102
setAttributes(array $attributes)
Sets the token attributes.
at line line 111
bool
hasAttribute(string $name)
Returns true if the attribute exists.
at line line 122
mixed
getAttribute(string $name)
Returns an attribute value.
at line line 130
setAttribute(string $name, mixed $value)
Sets an attribute.