SecurityContext deprecated
class SecurityContext implements SecurityContextInterface
deprecated
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.
Parameters
TokenStorageInterface|AuthenticationManagerInterface | $tokenStorage | |
AuthorizationCheckerInterface|AccessDecisionManagerInterface | $authorizationChecker | |
bool | $alwaysAuthenticate | only applicable with old signature |
TokenInterface|null getToken() deprecated
deprecated
Return Value
TokenInterface|null | A TokenInterface instance or null if no authentication information is available |
setToken(TokenInterface $token = null) deprecated
deprecated
Parameters
TokenInterface | $token | A TokenInterface token, or null if no further authentication information should be stored |
bool isGranted(mixed $attributes, mixed $object = null) deprecated
deprecated
Parameters
mixed | $attributes | |
mixed | $object |
Return Value
bool |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Security/Core/SecurityContext.html