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(AuthenticationManagerInterface $authenticationManager, AccessDecisionManagerInterface $accessDecisionManager, Boolean $alwaysAuthenticate = false)
Constructor. |
||
| Boolean |
isGranted(mixed $attributes, mixed|null $object = null)
Checks if the attributes are granted against the current authentication token and optionally supplied object. |
|
| TokenInterface|null |
getToken()
Returns the current security token. |
|
|
setToken(TokenInterface $token = null)
Sets the authentication token. |
Details
at line 41
public
__construct(AuthenticationManagerInterface $authenticationManager, AccessDecisionManagerInterface $accessDecisionManager, Boolean $alwaysAuthenticate = false)
Constructor.
at line 58
final public Boolean
isGranted(mixed $attributes, mixed|null $object = null)
Checks if the attributes are granted against the current authentication token and optionally supplied object.
at line 80
public TokenInterface|null
getToken()
Returns the current security token.
at line 90
public
setToken(TokenInterface $token = null)
Sets the authentication token.