On this page
Security
class Security
Helper class for commonly-needed security tasks.
Constants
ACCESS_DENIED_ERROR | |
AUTHENTICATION_ERROR | |
LAST_USERNAME | |
MAX_USERNAME_LENGTH |
Methods
__construct(ContainerInterface $container) | ||
UserInterface|null | getUser() | |
bool | isGranted(mixed $attributes, mixed $subject = null) Checks if the attributes are granted against the current authentication token and optionally supplied subject. |
|
TokenInterface|null | getToken() |
Details
__construct(ContainerInterface $container)
Parameters
ContainerInterface | $container |
UserInterface|null getUser()
Return Value
UserInterface|null |
bool isGranted(mixed $attributes, mixed $subject = null)
Checks if the attributes are granted against the current authentication token and optionally supplied subject.
Parameters
mixed | $attributes | |
mixed | $subject |
Return Value
bool |
TokenInterface|null getToken()
Return Value
TokenInterface|null |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.4/Symfony/Component/Security/Core/Security.html