diff options
author | Iltar van der Berg <ivanderberg@hostnet.nl> | 2014-09-24 09:31:12 +0200 |
---|---|---|
committer | Iltar van der Berg <ivanderberg@hostnet.nl> | 2014-09-24 09:31:49 +0200 |
commit | d52740c8c0f0a5b98e31b4f759b6681ec364d576 (patch) | |
tree | 9f9c97cb3229b6e5d9ab164c05c21355a7008e9a /Core/SecurityContextInterface.php | |
parent | ddbd3ca7801b2e1c5028ab8d36b315ed4fb896f1 (diff) | |
download | symfony-security-d52740c8c0f0a5b98e31b4f759b6681ec364d576.zip symfony-security-d52740c8c0f0a5b98e31b4f759b6681ec364d576.tar.gz symfony-security-d52740c8c0f0a5b98e31b4f759b6681ec364d576.tar.bz2 |
Split of the SecurityContext to AuthorizationChecker and TokenStorage
Diffstat (limited to 'Core/SecurityContextInterface.php')
-rw-r--r-- | Core/SecurityContextInterface.php | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/Core/SecurityContextInterface.php b/Core/SecurityContextInterface.php index ca816a8..844482b 100644 --- a/Core/SecurityContextInterface.php +++ b/Core/SecurityContextInterface.php @@ -11,40 +11,15 @@ namespace Symfony\Component\Security\Core; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; +use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; /** * The SecurityContextInterface. * * @author Johannes M. Schmitt <schmittjoh@gmail.com> + * @deprecated Deprecated since version 2.6, to be removed in 3.0. */ -interface SecurityContextInterface +interface SecurityContextInterface extends TokenStorageInterface, AuthorizationCheckerInterface, SecuritySessionStorageInterface { - const ACCESS_DENIED_ERROR = '_security.403_error'; - const AUTHENTICATION_ERROR = '_security.last_error'; - const LAST_USERNAME = '_security.last_username'; - - /** - * Returns the current security token. - * - * @return TokenInterface|null A TokenInterface instance or null if no authentication information is available - */ - public function getToken(); - - /** - * Sets the authentication token. - * - * @param TokenInterface $token A TokenInterface token, or null if no further authentication information should be stored - */ - public function setToken(TokenInterface $token = null); - - /** - * Checks if the attributes are granted against the current authentication token and optionally supplied object. - * - * @param mixed $attributes - * @param mixed $object - * - * @return bool - */ - public function isGranted($attributes, $object = null); } |