diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-11-02 13:37:39 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-11-02 13:39:17 +0100 |
commit | 9d6e01ef40f7f4d2acab653b33e1af026bcde6c7 (patch) | |
tree | 45c98681e5fd2671bba975a56bc75185b08d0f9a /lib/private/Authentication/Token | |
parent | 271f2a4cfff2be6f25d4bc546040613fdb2e70bf (diff) | |
download | nextcloud-server-9d6e01ef40f7f4d2acab653b33e1af026bcde6c7.tar.gz nextcloud-server-9d6e01ef40f7f4d2acab653b33e1af026bcde6c7.zip |
Add missing tests and fix PHPDoc
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Authentication/Token')
-rw-r--r-- | lib/private/Authentication/Token/DefaultTokenProvider.php | 9 | ||||
-rw-r--r-- | lib/private/Authentication/Token/IProvider.php | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index af1d600e4c3..87f434c684c 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -1,6 +1,7 @@ <?php /** * @copyright Copyright (c) 2016, ownCloud, Inc. + * @copyright Copyright (c) 2016, Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@owncloud.com> * @@ -56,7 +57,11 @@ class DefaultTokenProvider implements IProvider { * @param ILogger $logger * @param ITimeFactory $time */ - public function __construct(DefaultTokenMapper $mapper, ICrypto $crypto, IConfig $config, ILogger $logger, ITimeFactory $time) { + public function __construct(DefaultTokenMapper $mapper, + ICrypto $crypto, + IConfig $config, + ILogger $logger, + ITimeFactory $time) { $this->mapper = $mapper; $this->crypto = $crypto; $this->config = $config; @@ -98,6 +103,7 @@ class DefaultTokenProvider implements IProvider { * Save the updated token * * @param IToken $token + * @throws InvalidTokenException */ public function updateToken(IToken $token) { if (!($token instanceof DefaultToken)) { @@ -156,6 +162,7 @@ class DefaultTokenProvider implements IProvider { /** * @param string $oldSessionId * @param string $sessionId + * @throws InvalidTokenException */ public function renewSessionToken($oldSessionId, $sessionId) { $token = $this->getToken($oldSessionId); diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php index b8c15571df1..6260555470d 100644 --- a/lib/private/Authentication/Token/IProvider.php +++ b/lib/private/Authentication/Token/IProvider.php @@ -55,6 +55,7 @@ interface IProvider { /** * @param string $oldSessionId * @param string $sessionId + * @throws InvalidTokenException */ public function renewSessionToken($oldSessionId, $sessionId); |