summaryrefslogtreecommitdiffstats
path: root/Core/Authentication
diff options
context:
space:
mode:
authorJohannes M. Schmitt <schmittjoh@gmail.com>2011-03-10 21:27:42 +0100
committerJohannes Schmitt <schmittjoh@gmail.com>2011-03-11 01:19:55 +0100
commit841a404044e42bb70eecb207ee27b3768201d9b6 (patch)
tree5ed73a39cd2fd722fcc4a003ac3578b3c5997cf0 /Core/Authentication
parente38cdf3bd10bdd9ab9a514c417fabc4c6656e173 (diff)
downloadsymfony-security-841a404044e42bb70eecb207ee27b3768201d9b6.zip
symfony-security-841a404044e42bb70eecb207ee27b3768201d9b6.tar.gz
symfony-security-841a404044e42bb70eecb207ee27b3768201d9b6.tar.bz2
[Security] refactored remember-me code
Diffstat (limited to 'Core/Authentication')
-rw-r--r--Core/Authentication/AuthenticationManagerInterface.php2
-rw-r--r--Core/Authentication/Token/RememberMeToken.php10
2 files changed, 2 insertions, 10 deletions
diff --git a/Core/Authentication/AuthenticationManagerInterface.php b/Core/Authentication/AuthenticationManagerInterface.php
index 5f407f2..36cdc92 100644
--- a/Core/Authentication/AuthenticationManagerInterface.php
+++ b/Core/Authentication/AuthenticationManagerInterface.php
@@ -27,7 +27,7 @@ interface AuthenticationManagerInterface
*
* @param TokenInterface $token The TokenInterface instance to authenticate
*
- * @return TokenInterface An authenticated TokenInterface instance
+ * @return TokenInterface An authenticated TokenInterface instance, never null
*
* @throws AuthenticationException if the authentication fails
*/
diff --git a/Core/Authentication/Token/RememberMeToken.php b/Core/Authentication/Token/RememberMeToken.php
index 038198a..7978427 100644
--- a/Core/Authentication/Token/RememberMeToken.php
+++ b/Core/Authentication/Token/RememberMeToken.php
@@ -11,7 +11,6 @@
namespace Symfony\Component\Security\Core\Authentication\Token;
-use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentTokenInterface;
use Symfony\Component\Security\Core\User\UserInterface;
/**
@@ -23,7 +22,6 @@ class RememberMeToken extends AbstractToken
{
private $key;
private $providerKey;
- private $persistentToken;
/**
* Constructor.
@@ -32,7 +30,7 @@ class RememberMeToken extends AbstractToken
* @param string $providerKey
* @param string $key
*/
- public function __construct(UserInterface $user, $providerKey, $key, PersistentTokenInterface $persistentToken = null) {
+ public function __construct(UserInterface $user, $providerKey, $key) {
parent::__construct($user->getRoles());
if (empty($key)) {
@@ -45,7 +43,6 @@ class RememberMeToken extends AbstractToken
$this->providerKey = $providerKey;
$this->key = $key;
- $this->persistentToken = $persistentToken;
$this->setUser($user);
parent::setAuthenticated(true);
@@ -70,11 +67,6 @@ class RememberMeToken extends AbstractToken
return $this->key;
}
- public function getPersistentToken()
- {
- return $this->persistentToken;
- }
-
public function getCredentials()
{
return '';