summaryrefslogtreecommitdiffstats
path: root/Core/Exception
diff options
context:
space:
mode:
authorAlexander <iam.asm89@gmail.com>2012-07-15 17:46:50 +0200
committerAlexander <iam.asm89@gmail.com>2013-01-07 20:58:58 +0100
commitcd47f40584b192f6bc94e48dfbe7545280f382c9 (patch)
tree52a319948dd2a71e50e811c932d3f8d41a0218cd /Core/Exception
parent2a58d99772d05834fb6687268d49f256e55df4bb (diff)
downloadsymfony-security-cd47f40584b192f6bc94e48dfbe7545280f382c9.zip
symfony-security-cd47f40584b192f6bc94e48dfbe7545280f382c9.tar.gz
symfony-security-cd47f40584b192f6bc94e48dfbe7545280f382c9.tar.bz2
[Security] Fix `AuthenticationException` serialization
Diffstat (limited to 'Core/Exception')
-rw-r--r--Core/Exception/AccountStatusException.php23
-rw-r--r--Core/Exception/AuthenticationException.php4
-rw-r--r--Core/Exception/UsernameNotFoundException.php23
3 files changed, 48 insertions, 2 deletions
diff --git a/Core/Exception/AccountStatusException.php b/Core/Exception/AccountStatusException.php
index 5a16673..d89d553 100644
--- a/Core/Exception/AccountStatusException.php
+++ b/Core/Exception/AccountStatusException.php
@@ -43,4 +43,27 @@ abstract class AccountStatusException extends AuthenticationException
{
$this->user = $user;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function serialize()
+ {
+ return serialize(array(
+ $this->user,
+ parent::serialize(),
+ ));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function unserialize($str)
+ {
+ list(
+ $this->user,
+ $parentData
+ ) = unserialize($str);
+ parent::unserialize($parentData);
+ }
}
diff --git a/Core/Exception/AuthenticationException.php b/Core/Exception/AuthenticationException.php
index d67d41e..7958ff7 100644
--- a/Core/Exception/AuthenticationException.php
+++ b/Core/Exception/AuthenticationException.php
@@ -46,7 +46,7 @@ class AuthenticationException extends \RuntimeException implements \Serializable
public function serialize()
{
return serialize(array(
- $this->extraInformation,
+ $this->token,
$this->code,
$this->message,
$this->file,
@@ -57,7 +57,7 @@ class AuthenticationException extends \RuntimeException implements \Serializable
public function unserialize($str)
{
list(
- $this->extraInformation,
+ $this->token,
$this->code,
$this->message,
$this->file,
diff --git a/Core/Exception/UsernameNotFoundException.php b/Core/Exception/UsernameNotFoundException.php
index 421fada..9a9989f 100644
--- a/Core/Exception/UsernameNotFoundException.php
+++ b/Core/Exception/UsernameNotFoundException.php
@@ -48,4 +48,27 @@ class UsernameNotFoundException extends AuthenticationException
{
$this->username = $username;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function serialize()
+ {
+ return serialize(array(
+ $this->username,
+ parent::serialize(),
+ ));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function unserialize($str)
+ {
+ list(
+ $this->username,
+ $parentData
+ ) = unserialize($str);
+ parent::unserialize($parentData);
+ }
}