diff options
author | Joseph Bielawski <stloyd@gmail.com> | 2014-01-17 10:30:22 +0100 |
---|---|---|
committer | Joseph Bielawski <stloyd@gmail.com> | 2014-01-17 10:30:22 +0100 |
commit | 916ee032f85e3bba7b6e5fb05b807d27d4267640 (patch) | |
tree | 9f712835b1de39fda0271b493927d2b6a0bb99df /Core/Authentication | |
parent | bcdebea77d289cc60ca17f135edd6cd95f4991fa (diff) | |
download | symfony-security-916ee032f85e3bba7b6e5fb05b807d27d4267640.zip symfony-security-916ee032f85e3bba7b6e5fb05b807d27d4267640.tar.gz symfony-security-916ee032f85e3bba7b6e5fb05b807d27d4267640.tar.bz2 |
[Component/Security] Fixed some phpdocs in Security/Core
Diffstat (limited to 'Core/Authentication')
9 files changed, 81 insertions, 21 deletions
diff --git a/Core/Authentication/Provider/RememberMeAuthenticationProvider.php b/Core/Authentication/Provider/RememberMeAuthenticationProvider.php index 4175907..234bddb 100644 --- a/Core/Authentication/Provider/RememberMeAuthenticationProvider.php +++ b/Core/Authentication/Provider/RememberMeAuthenticationProvider.php @@ -22,6 +22,13 @@ class RememberMeAuthenticationProvider implements AuthenticationProviderInterfac private $key; private $providerKey; + /** + * Constructor. + * + * @param UserCheckerInterface $userChecker An UserCheckerInterface interface + * @param string $key A key + * @param string $providerKey A provider key + */ public function __construct(UserCheckerInterface $userChecker, $key, $providerKey) { $this->userChecker = $userChecker; @@ -29,6 +36,9 @@ class RememberMeAuthenticationProvider implements AuthenticationProviderInterfac $this->providerKey = $providerKey; } + /** + * {@inheritdoc} + */ public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { @@ -48,6 +58,9 @@ class RememberMeAuthenticationProvider implements AuthenticationProviderInterfac return $authenticatedToken; } + /** + * {@inheritdoc} + */ public function supports(TokenInterface $token) { return $token instanceof RememberMeToken && $token->getProviderKey() === $this->providerKey; diff --git a/Core/Authentication/RememberMe/InMemoryTokenProvider.php b/Core/Authentication/RememberMe/InMemoryTokenProvider.php index a15c2b4..719d7a1 100644 --- a/Core/Authentication/RememberMe/InMemoryTokenProvider.php +++ b/Core/Authentication/RememberMe/InMemoryTokenProvider.php @@ -22,6 +22,9 @@ class InMemoryTokenProvider implements TokenProviderInterface { private $tokens = array(); + /** + * {@inheritdoc} + */ public function loadTokenBySeries($series) { if (!isset($this->tokens[$series])) { @@ -31,6 +34,9 @@ class InMemoryTokenProvider implements TokenProviderInterface return $this->tokens[$series]; } + /** + * {@inheritdoc} + */ public function updateToken($series, $tokenValue, \DateTime $lastUsed) { if (!isset($this->tokens[$series])) { @@ -47,11 +53,17 @@ class InMemoryTokenProvider implements TokenProviderInterface $this->tokens[$series] = $token; } + /** + * {@inheritdoc} + */ public function deleteTokenBySeries($series) { unset($this->tokens[$series]); } + /** + * {@inheritdoc} + */ public function createNewToken(PersistentTokenInterface $token) { $this->tokens[$token->getSeries()] = $token; diff --git a/Core/Authentication/RememberMe/PersistentToken.php b/Core/Authentication/RememberMe/PersistentToken.php index 8919be9..5df71ec 100644 --- a/Core/Authentication/RememberMe/PersistentToken.php +++ b/Core/Authentication/RememberMe/PersistentToken.php @@ -58,9 +58,7 @@ final class PersistentToken implements PersistentTokenInterface } /** - * Returns the class of the user - * - * @return string + * {@inheritdoc} */ public function getClass() { @@ -68,9 +66,7 @@ final class PersistentToken implements PersistentTokenInterface } /** - * Returns the username - * - * @return string + * {@inheritdoc} */ public function getUsername() { @@ -78,9 +74,7 @@ final class PersistentToken implements PersistentTokenInterface } /** - * Returns the series - * - * @return string + * {@inheritdoc} */ public function getSeries() { @@ -88,9 +82,7 @@ final class PersistentToken implements PersistentTokenInterface } /** - * Returns the token value - * - * @return string + * {@inheritdoc} */ public function getTokenValue() { @@ -98,9 +90,7 @@ final class PersistentToken implements PersistentTokenInterface } /** - * Returns the time the token was last used - * - * @return \DateTime + * {@inheritdoc} */ public function getLastUsed() { diff --git a/Core/Authentication/RememberMe/PersistentTokenInterface.php b/Core/Authentication/RememberMe/PersistentTokenInterface.php index 6e9d891..ad52753 100644 --- a/Core/Authentication/RememberMe/PersistentTokenInterface.php +++ b/Core/Authentication/RememberMe/PersistentTokenInterface.php @@ -20,31 +20,36 @@ namespace Symfony\Component\Security\Core\Authentication\RememberMe; interface PersistentTokenInterface { /** - * Returns the class of the user + * Returns the class of the user. + * * @return string */ public function getClass(); /** - * Returns the username + * Returns the username. + * * @return string */ public function getUsername(); /** - * Returns the series + * Returns the series. + * * @return string */ public function getSeries(); /** - * Returns the token value + * Returns the token value. + * * @return string */ public function getTokenValue(); /** - * Returns the last time the cookie was used + * Returns the time the token was last used. + * * @return \DateTime */ public function getLastUsed(); 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; |