diff options
author | Alexander <iam.asm89@gmail.com> | 2012-07-15 17:26:18 +0200 |
---|---|---|
committer | Alexander <iam.asm89@gmail.com> | 2013-01-07 20:58:58 +0100 |
commit | 7f5659fa1622474a60de0578f0c7014b22746da2 (patch) | |
tree | 3fe8ddba859fe93176f1717fa4e05a080276e4b3 /Core/Exception | |
parent | 236974f019efbe80e96388dc30f881add50599b6 (diff) | |
download | symfony-security-7f5659fa1622474a60de0578f0c7014b22746da2.zip symfony-security-7f5659fa1622474a60de0578f0c7014b22746da2.tar.gz symfony-security-7f5659fa1622474a60de0578f0c7014b22746da2.tar.bz2 |
[Security] Removed `get/setExtraInformation`, added `get/set(Token|User)`
Diffstat (limited to 'Core/Exception')
-rw-r--r-- | Core/Exception/AccountStatusException.php | 24 | ||||
-rw-r--r-- | Core/Exception/AuthenticationException.php | 22 |
2 files changed, 41 insertions, 5 deletions
diff --git a/Core/Exception/AccountStatusException.php b/Core/Exception/AccountStatusException.php index 958f584..5a16673 100644 --- a/Core/Exception/AccountStatusException.php +++ b/Core/Exception/AccountStatusException.php @@ -11,12 +11,36 @@ namespace Symfony\Component\Security\Core\Exception; +use Symfony\Component\Security\Core\User\UserInterface; + /** * AccountStatusException is the base class for authentication exceptions * caused by the user account status. * * @author Fabien Potencier <fabien@symfony.com> + * @author Alexander <iam.asm89@gmail.com> */ abstract class AccountStatusException extends AuthenticationException { + private $user; + + /** + * Get the user. + * + * @return UserInterface + */ + public function getUser() + { + return $this->user; + } + + /** + * Set the user. + * + * @param UserInterface $user + */ + public function setUser(UserInterface $user) + { + $this->user = $user; + } } diff --git a/Core/Exception/AuthenticationException.php b/Core/Exception/AuthenticationException.php index 93e395b..d67d41e 100644 --- a/Core/Exception/AuthenticationException.php +++ b/Core/Exception/AuthenticationException.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core\Exception; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; + /** * AuthenticationException is the base class for all authentication exceptions. * @@ -19,16 +21,26 @@ namespace Symfony\Component\Security\Core\Exception; */ class AuthenticationException extends \RuntimeException implements \Serializable { - private $extraInformation; + private $token; - public function getExtraInformation() + /** + * Get the token. + * + * @return TokenInterface + */ + public function getToken() { - return $this->extraInformation; + return $this->token; } - public function setExtraInformation($extraInformation) + /** + * Set the token. + * + * @param TokenInterface $token + */ + public function setToken(TokenInterface $token) { - $this->extraInformation = $extraInformation; + $this->token = $token; } public function serialize() |