class SecurityContext implements SecurityContextInterface
deprecated
since version 2.6, to be removed in 3.0.
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() deprecated | |
setToken(TokenInterface $token = null) deprecated | ||
bool | isGranted(mixed $attributes, mixed $object = null) deprecated |
Details
__construct(TokenStorageInterface|AuthenticationManagerInterface $tokenStorage, AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker, bool $alwaysAuthenticate = false)
For backwards compatibility, the signature of sf <2.6 still works.
TokenInterface|null getToken() deprecated
deprecated
since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead. {@inheritdoc}setToken(TokenInterface $token = null) deprecated
deprecated
since version 2.6, to be removed in 3.0. Use TokenStorageInterface::setToken() instead. {@inheritdoc}bool isGranted(mixed $attributes, mixed $object = null) deprecated
deprecated
since version 2.6, to be removed in 3.0. Use AuthorizationCheckerInterface::isGranted() instead. {@inheritdoc}
Please login to continue.