diff options
Diffstat (limited to 'Core/Authentication/Token')
-rw-r--r-- | Core/Authentication/Token/AbstractToken.php | 3 | ||||
-rw-r--r-- | Core/Authentication/Token/AnonymousToken.php | 1 | ||||
-rw-r--r-- | Core/Authentication/Token/PreAuthenticatedToken.php | 14 | ||||
-rw-r--r-- | Core/Authentication/Token/RememberMeToken.php | 16 | ||||
-rw-r--r-- | Core/Authentication/Token/UsernamePasswordToken.php | 8 |
5 files changed, 41 insertions, 1 deletions
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php index b994733..e4c46d5 100644 --- a/Core/Authentication/Token/AbstractToken.php +++ b/Core/Authentication/Token/AbstractToken.php @@ -74,6 +74,9 @@ abstract class AbstractToken implements TokenInterface return (string) $this->user; } + /** + * {@inheritdoc} + */ public function getUser() { return $this->user; diff --git a/Core/Authentication/Token/AnonymousToken.php b/Core/Authentication/Token/AnonymousToken.php index cabb6d5..d39fec8 100644 --- a/Core/Authentication/Token/AnonymousToken.php +++ b/Core/Authentication/Token/AnonymousToken.php @@ -18,7 +18,6 @@ use Symfony\Component\Security\Core\Role\RoleInterface; * * @author Fabien Potencier <fabien@symfony.com> */ - class AnonymousToken extends AbstractToken { private $key; diff --git a/Core/Authentication/Token/PreAuthenticatedToken.php b/Core/Authentication/Token/PreAuthenticatedToken.php index ff0572f..abcd2bf 100644 --- a/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/Core/Authentication/Token/PreAuthenticatedToken.php @@ -41,11 +41,19 @@ class PreAuthenticatedToken extends AbstractToken } } + /** + * Returns the provider key. + * + * @return string The provider key + */ public function getProviderKey() { return $this->providerKey; } + /** + * {@inheritdoc} + */ public function getCredentials() { return $this->credentials; @@ -61,11 +69,17 @@ class PreAuthenticatedToken extends AbstractToken $this->credentials = null; } + /** + * {@inheritdoc} + */ public function serialize() { return serialize(array($this->credentials, $this->providerKey, parent::serialize())); } + /** + * {@inheritdoc} + */ public function unserialize($str) { list($this->credentials, $this->providerKey, $parentStr) = unserialize($str); diff --git a/Core/Authentication/Token/RememberMeToken.php b/Core/Authentication/Token/RememberMeToken.php index 6f3d821..609fdad 100644 --- a/Core/Authentication/Token/RememberMeToken.php +++ b/Core/Authentication/Token/RememberMeToken.php @@ -51,6 +51,9 @@ class RememberMeToken extends AbstractToken parent::setAuthenticated(true); } + /** + * {@inheritdoc} + */ public function setAuthenticated($authenticated) { if ($authenticated) { @@ -60,16 +63,29 @@ class RememberMeToken extends AbstractToken parent::setAuthenticated(false); } + /** + * Returns the provider key. + * + * @return string The provider key + */ public function getProviderKey() { return $this->providerKey; } + /** + * Returns the key. + * + * @return string The Key + */ public function getKey() { return $this->key; } + /** + * {@inheritdoc} + */ public function getCredentials() { return ''; diff --git a/Core/Authentication/Token/UsernamePasswordToken.php b/Core/Authentication/Token/UsernamePasswordToken.php index 3854242..b6dfce4 100644 --- a/Core/Authentication/Token/UsernamePasswordToken.php +++ b/Core/Authentication/Token/UsernamePasswordToken.php @@ -60,11 +60,19 @@ class UsernamePasswordToken extends AbstractToken parent::setAuthenticated(false); } + /** + * {@inheritdoc} + */ public function getCredentials() { return $this->credentials; } + /** + * Returns the provider key. + * + * @return string The provider key + */ public function getProviderKey() { return $this->providerKey; |