Pārlūkot izejas kodu

[Security] added the 'key' attribute of RememberMeToken to serialized string to be stored in session

Bulat Shakirzyanov 14 gadi atpakaļ
vecāks
revīzija
dbde41c082

+ 17 - 0
src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php

@@ -66,4 +66,21 @@ class RememberMeToken extends Token
     {
     {
         $this->persistentToken = $persistentToken;
         $this->persistentToken = $persistentToken;
     }
     }
+
+
+    /**
+     * {@inheritdoc}
+     */
+    public function serialize()
+    {
+        return serialize(array($this->user, $this->credentials, $this->authenticated, $this->roles, $this->immutable, $this->providerKey, $this->attributes, $this->key));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function unserialize($serialized)
+    {
+        list($this->user, $this->credentials, $this->authenticated, $this->roles, $this->immutable, $this->providerKey, $this->attributes, $this->key) = unserialize($serialized);
+    }
 }
 }