Symfony\Component\Security\Core\SecurityContext
SecurityContext is the main entry point of the Security component.
It gives access to the token representing the current user authentication.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class SecurityContext
implements
SecurityContextInterface
{
- // members
- private $token;
- private $accessDecisionManager;
- private $authenticationManager;
- private $alwaysAuthenticate;
- // methods
- public void __construct()
- public final Boolean isGranted()
- public TokenInterface|null getToken()
- public void setToken()
Hierarchy
Constants
Name | Value |
---|---|
ACCESS_DENIED_ERROR | '_security.403_error' |
AUTHENTICATION_ERROR | '_security.last_error' |
LAST_USERNAME | '_security.last_username' |
Members
private
- $accessDecisionManager
- $alwaysAuthenticate
- $authenticationManager
- $token
Methods
public
- __construct() — Constructor.
- getToken() — Gets the currently authenticated token.
- isGranted() — Checks if the attributes are granted against the current token.
- setToken() — Sets the currently authenticated token.