Core\SecurityContextInterface (Component\Security)
Symfony\Component\Security\Core\SecurityContextInterface
interface SecurityContextInterface implements TokenStorageInterface, AuthorizationCheckerInterface
The SecurityContextInterface.
Constants
ACCESS_DENIED_ERROR | |
AUTHENTICATION_ERROR | |
LAST_USERNAME |
Methods
TokenInterface|null | getToken() Returns the current security token. | from TokenStorageInterface |
setToken(TokenInterface $token = null) Sets the authentication token. | from TokenStorageInterface | |
bool | isGranted(mixed $attributes, mixed $object = null) Checks if the attributes are granted against the current authentication token and optionally supplied object. | from AuthorizationCheckerInterface |
Details
public TokenInterface|null getToken()
Returns the current security token.
public setToken(TokenInterface $token = null)
Sets the authentication token.
public bool isGranted(mixed $attributes, mixed $object = null)
Checks if the attributes are granted against the current authentication token and optionally supplied object.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Security/Core/SecurityContextInterface.html