Core\SecurityContext (Component\Security)
Symfony\Component\Security\Core\SecurityContext
class SecurityContext implements SecurityContextInterface
SecurityContext is the main entry point of the Security component.
It gives access to the token representing the current user authentication.
Methods
__construct(TokenStorageInterface|AuthenticationManagerInterface $tokenStorage, AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker, bool $alwaysAuthenticate = false) For backwards compatibility, the signature of sf <2.6 still works. | ||
TokenInterface|null | getToken() | |
setToken(TokenInterface $token = null) | ||
bool | isGranted(mixed $attributes, mixed $object = null) |
Details
public __construct(TokenStorageInterface|AuthenticationManagerInterface $tokenStorage, AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker, bool $alwaysAuthenticate = false)
For backwards compatibility, the signature of sf <2.6 still works.
public TokenInterface|null getToken()
public setToken(TokenInterface $token = null)
public bool isGranted(mixed $attributes, mixed $object = null)
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Security/Core/SecurityContext.html