diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-05-06 16:31:40 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-11 13:36:46 +0200 |
commit | 46bdf6ea2b1e10c2f4d2fae214ecc81b188fa981 (patch) | |
tree | 56c5fb779556bea6489463a315affa6726d81655 /lib/private/Authentication/Token/DefaultTokenProvider.php | |
parent | 3ffa7d986a3bb2a67ae37e017f3e34097774cbf2 (diff) | |
download | nextcloud-server-46bdf6ea2b1e10c2f4d2fae214ecc81b188fa981.tar.gz nextcloud-server-46bdf6ea2b1e10c2f4d2fae214ecc81b188fa981.zip |
fix PHPDoc and other minor issues
Diffstat (limited to 'lib/private/Authentication/Token/DefaultTokenProvider.php')
-rw-r--r-- | lib/private/Authentication/Token/DefaultTokenProvider.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index a0d07f9e2e2..53ecb562a8d 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -51,6 +51,7 @@ class DefaultTokenProvider implements IProvider { * @param ICrypto $crypto * @param IConfig $config * @param ILogger $logger + * @param ITimeFactory $time */ public function __construct(DefaultTokenMapper $mapper, ICrypto $crypto, IConfig $config, ILogger $logger, ITimeFactory $time) { $this->mapper = $mapper; @@ -66,6 +67,7 @@ class DefaultTokenProvider implements IProvider { * @param string $token * @param string $uid * @param string $password + * @param string $name * @param int $type token type * @return DefaultToken */ @@ -86,7 +88,8 @@ class DefaultTokenProvider implements IProvider { /** * Update token activity timestamp * - * @param DefaultToken $token + * @throws InvalidTokenException + * @param IToken $token */ public function updateToken(IToken $token) { if (!($token instanceof DefaultToken)) { @@ -101,6 +104,7 @@ class DefaultTokenProvider implements IProvider { /** * @param string $token * @throws InvalidTokenException + * @return DefaultToken */ public function getToken($token) { try { @@ -113,6 +117,7 @@ class DefaultTokenProvider implements IProvider { /** * @param DefaultToken $savedToken * @param string $token session token + * @return string */ public function getPassword(DefaultToken $savedToken, $token) { return $this->decryptPassword($savedToken->getPassword(), $token); @@ -139,13 +144,13 @@ class DefaultTokenProvider implements IProvider { /** * @param string $token * @throws InvalidTokenException - * @return IToken user UID + * @return DefaultToken user UID */ public function validateToken($token) { $this->logger->debug('validating default token <' . $token . '>'); try { $dbToken = $this->mapper->getToken($this->hashToken($token)); - $this->logger->debug('valid token for ' . $dbToken->getUid()); + $this->logger->debug('valid token for ' . $dbToken->getUID()); return $dbToken; } catch (DoesNotExistException $ex) { $this->logger->warning('invalid token'); |