diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-21 14:37:08 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-21 14:37:08 +0200 |
commit | 34f5f4091e276b4074512283c9b46a125f16463c (patch) | |
tree | 6e792e555c960bf995a9e6eb6523713bde206e1b /lib/private/Authentication | |
parent | b3a92a4e39cec7a43e52bbdcdd10736112c714a5 (diff) | |
download | nextcloud-server-34f5f4091e276b4074512283c9b46a125f16463c.tar.gz nextcloud-server-34f5f4091e276b4074512283c9b46a125f16463c.zip |
Catch more occurences where ExpiredTokenException can be thrown
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r-- | lib/private/Authentication/Token/Manager.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/Manager.php b/lib/private/Authentication/Token/Manager.php index a811393f553..98a48f41523 100644 --- a/lib/private/Authentication/Token/Manager.php +++ b/lib/private/Authentication/Token/Manager.php @@ -112,7 +112,9 @@ class Manager implements IProvider { public function getToken(string $tokenId): IToken { try { return $this->publicKeyTokenProvider->getToken($tokenId); - } catch (InvalidTokenException $e) { + } catch (ExpiredTokenException $e) { + throw $e; + } catch(InvalidTokenException $e) { // No worries we try to convert it to a PublicKey Token } @@ -153,6 +155,8 @@ class Manager implements IProvider { public function renewSessionToken(string $oldSessionId, string $sessionId) { try { $this->publicKeyTokenProvider->renewSessionToken($oldSessionId, $sessionId); + } catch (ExpiredTokenException $e) { + throw $e; } catch (InvalidTokenException $e) { $this->defaultTokenProvider->renewSessionToken($oldSessionId, $sessionId); } |