GuardTokenInterface
interface GuardTokenInterface implements TokenInterface
A marker interface that both guard tokens implement.
Any tokens passed to GuardAuthenticationProvider (i.e. any tokens that are handled by the guard auth system) must implement this interface.
Methods
Details
in TokenInterface at line line 31
string
__toString()
Returns a string representation of the Token.
This is only to be used for debugging purposes.
in TokenInterface at line line 38
RoleInterface[]
getRoles()
Returns the user roles.
in TokenInterface at line line 45
mixed
getCredentials()
Returns the user credentials.
in TokenInterface at line line 55
mixed
getUser()
Returns a user representation.
in TokenInterface at line line 62
setUser(mixed $user)
Sets a user.
in TokenInterface at line line 69
string
getUsername()
Returns the username.
in TokenInterface at line line 76
bool
isAuthenticated()
Returns whether the user is authenticated or not.
in TokenInterface at line line 83
setAuthenticated(bool $isAuthenticated)
Sets the authenticated flag.
in TokenInterface at line line 88
eraseCredentials()
Removes sensitive information from the token.
in TokenInterface at line line 95
array
getAttributes()
Returns the token attributes.
in TokenInterface at line line 102
setAttributes(array $attributes)
Sets the token attributes.
in TokenInterface at line line 111
bool
hasAttribute(string $name)
Returns true if the attribute exists.
in TokenInterface at line line 122
mixed
getAttribute(string $name)
Returns an attribute value.
in TokenInterface at line line 130
setAttribute(string $name, mixed $value)
Sets an attribute.