interface TokenInterface implements Serializable
TokenInterface is the interface for the user authentication information.
Methods
| string |
__toString()
Returns a string representation of the Token. |
|
| RoleInterface[] |
getRoles()
Returns the user roles. |
|
| mixed |
getCredentials()
Returns the user credentials. |
|
| mixed |
getUser()
Returns a user representation. |
|
|
setUser(mixed $user)
Sets a user. |
||
| string |
getUsername()
Returns the username. |
|
| Boolean |
isAuthenticated()
Returns whether the user is authenticated or not. |
|
|
setAuthenticated(Boolean $isAuthenticated)
Sets the authenticated flag. |
||
|
eraseCredentials()
Removes sensitive information from the token. |
||
| array |
getAttributes()
Returns the token attributes. |
|
|
setAttributes(array $attributes)
Sets the token attributes. |
||
| Boolean |
hasAttribute(string $name)
Returns true if the attribute exists. |
|
| mixed |
getAttribute(string $name)
Returns an attribute value. |
|
|
setAttribute(string $name, mixed $value)
Sets an attribute. |
Details
at line 31
public string
__toString()
Returns a string representation of the Token.
This is only to be used for debugging purposes.
at line 38
public RoleInterface[]
getRoles()
Returns the user roles.
at line 45
public mixed
getCredentials()
Returns the user credentials.
at line 53
public mixed
getUser()
Returns a user representation.
at line 60
public
setUser(mixed $user)
Sets a user.
at line 67
public string
getUsername()
Returns the username.
at line 74
public Boolean
isAuthenticated()
Returns whether the user is authenticated or not.
at line 81
public
setAuthenticated(Boolean $isAuthenticated)
Sets the authenticated flag.
at line 86
public
eraseCredentials()
Removes sensitive information from the token.
at line 93
public array
getAttributes()
Returns the token attributes.
at line 100
public
setAttributes(array $attributes)
Sets the token attributes.
at line 109
public Boolean
hasAttribute(string $name)
Returns true if the attribute exists.
at line 120
public mixed
getAttribute(string $name)
Returns an attribute value.
at line 128
public
setAttribute(string $name, mixed $value)
Sets an attribute.