summaryrefslogtreecommitdiffstats
path: root/Core/Authentication
diff options
context:
space:
mode:
authorrealmfoo <konstantin.leboev@gmail.com>2011-08-10 10:59:19 +0400
committerrealmfoo <konstantin.leboev@gmail.com>2011-08-10 10:59:19 +0400
commitb33e8d2376f20761911faa654d85790d61a29019 (patch)
tree91ef528a24e416523bb25859a702d8d859a0e2af /Core/Authentication
parent111f1e758a0919556c2c2fdd8fd8779303113f30 (diff)
parent77b520411cafe3f32f1f52d27dd806ee6110504d (diff)
downloadsymfony-security-b33e8d2376f20761911faa654d85790d61a29019.zip
symfony-security-b33e8d2376f20761911faa654d85790d61a29019.tar.gz
symfony-security-b33e8d2376f20761911faa654d85790d61a29019.tar.bz2
merge from master
Diffstat (limited to 'Core/Authentication')
-rw-r--r--Core/Authentication/Provider/AnonymousAuthenticationProvider.php2
-rw-r--r--Core/Authentication/Provider/RememberMeAuthenticationProvider.php12
-rw-r--r--Core/Authentication/RememberMe/InMemoryTokenProvider.php11
-rw-r--r--Core/Authentication/RememberMe/PersistentToken.php2
-rw-r--r--Core/Authentication/RememberMe/PersistentTokenInterface.php8
-rw-r--r--Core/Authentication/RememberMe/TokenProviderInterface.php2
-rw-r--r--Core/Authentication/Token/RememberMeToken.php6
7 files changed, 34 insertions, 9 deletions
diff --git a/Core/Authentication/Provider/AnonymousAuthenticationProvider.php b/Core/Authentication/Provider/AnonymousAuthenticationProvider.php
index c48a27e..ea91075 100644
--- a/Core/Authentication/Provider/AnonymousAuthenticationProvider.php
+++ b/Core/Authentication/Provider/AnonymousAuthenticationProvider.php
@@ -43,7 +43,7 @@ class AnonymousAuthenticationProvider implements AuthenticationProviderInterface
return null;
}
- if ($this->key != $token->getKey()) {
+ if ($this->key !== $token->getKey()) {
throw new BadCredentialsException('The Token does not contain the expected key.');
}
diff --git a/Core/Authentication/Provider/RememberMeAuthenticationProvider.php b/Core/Authentication/Provider/RememberMeAuthenticationProvider.php
index 940288b..fb687b2 100644
--- a/Core/Authentication/Provider/RememberMeAuthenticationProvider.php
+++ b/Core/Authentication/Provider/RememberMeAuthenticationProvider.php
@@ -1,4 +1,14 @@
<?php
+
+/*
+ * This file is part of the Symfony framework.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
namespace Symfony\Component\Security\Core\Authentication\Provider;
use Symfony\Component\Security\Core\User\UserCheckerInterface;
@@ -43,4 +53,4 @@ class RememberMeAuthenticationProvider implements AuthenticationProviderInterfac
{
return $token instanceof RememberMeToken && $token->getProviderKey() === $this->providerKey;
}
-} \ No newline at end of file
+}
diff --git a/Core/Authentication/RememberMe/InMemoryTokenProvider.php b/Core/Authentication/RememberMe/InMemoryTokenProvider.php
index c432b0e..4653900 100644
--- a/Core/Authentication/RememberMe/InMemoryTokenProvider.php
+++ b/Core/Authentication/RememberMe/InMemoryTokenProvider.php
@@ -1,5 +1,14 @@
<?php
+/*
+ * This file is part of the Symfony framework.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
namespace Symfony\Component\Security\Core\Authentication\RememberMe;
use Symfony\Component\Security\Core\Exception\TokenNotFoundException;
@@ -47,4 +56,4 @@ class InMemoryTokenProvider implements TokenProviderInterface
{
$this->tokens[$token->getSeries()] = $token;
}
-} \ No newline at end of file
+}
diff --git a/Core/Authentication/RememberMe/PersistentToken.php b/Core/Authentication/RememberMe/PersistentToken.php
index 55e6b89..d9029f5 100644
--- a/Core/Authentication/RememberMe/PersistentToken.php
+++ b/Core/Authentication/RememberMe/PersistentToken.php
@@ -104,4 +104,4 @@ final class PersistentToken implements PersistentTokenInterface
{
return $this->lastUsed;
}
-} \ No newline at end of file
+}
diff --git a/Core/Authentication/RememberMe/PersistentTokenInterface.php b/Core/Authentication/RememberMe/PersistentTokenInterface.php
index fe1db51..004a9b7 100644
--- a/Core/Authentication/RememberMe/PersistentTokenInterface.php
+++ b/Core/Authentication/RememberMe/PersistentTokenInterface.php
@@ -20,6 +20,12 @@ namespace Symfony\Component\Security\Core\Authentication\RememberMe;
interface PersistentTokenInterface
{
/**
+ * Returns the class of the user
+ * @return string
+ */
+ function getClass();
+
+ /**
* Returns the username
* @return string
*/
@@ -42,4 +48,4 @@ interface PersistentTokenInterface
* @return \DateTime
*/
function getLastUsed();
-} \ No newline at end of file
+}
diff --git a/Core/Authentication/RememberMe/TokenProviderInterface.php b/Core/Authentication/RememberMe/TokenProviderInterface.php
index 1ec9c80..b48bd4d 100644
--- a/Core/Authentication/RememberMe/TokenProviderInterface.php
+++ b/Core/Authentication/RememberMe/TokenProviderInterface.php
@@ -48,4 +48,4 @@ interface TokenProviderInterface
* @param PersistentTokenInterface $token
*/
function createNewToken(PersistentTokenInterface $token);
-} \ No newline at end of file
+}
diff --git a/Core/Authentication/Token/RememberMeToken.php b/Core/Authentication/Token/RememberMeToken.php
index 7978427..81ab1c2 100644
--- a/Core/Authentication/Token/RememberMeToken.php
+++ b/Core/Authentication/Token/RememberMeToken.php
@@ -27,8 +27,8 @@ class RememberMeToken extends AbstractToken
* Constructor.
*
* @param UserInterface $user
- * @param string $providerKey
- * @param string $key
+ * @param string $providerKey
+ * @param string $key
*/
public function __construct(UserInterface $user, $providerKey, $key) {
parent::__construct($user->getRoles());
@@ -92,4 +92,4 @@ class RememberMeToken extends AbstractToken
list($this->key, $this->providerKey, $parentStr) = unserialize($serialized);
parent::unserialize($parentStr);
}
-} \ No newline at end of file
+}