From 9d6e01ef40f7f4d2acab653b33e1af026bcde6c7 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 2 Nov 2016 13:37:39 +0100 Subject: Add missing tests and fix PHPDoc Signed-off-by: Lukas Reschke --- lib/private/Authentication/Token/DefaultTokenProvider.php | 9 ++++++++- lib/private/Authentication/Token/IProvider.php | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/private') 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 @@ * * @author Christoph Wurst * @@ -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); -- cgit v1.2.3