diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-26 20:51:05 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-26 20:51:05 +0200 |
commit | a0e038f91261a3ea75ca2c4c06a269c44bb9a575 (patch) | |
tree | 27fcd7fa749f8040d7ba83fb235aa4e941d05898 /lib/private/Files | |
parent | 731888235789bb04f4e889b46cbaa35094607b36 (diff) | |
download | nextcloud-server-a0e038f91261a3ea75ca2c4c06a269c44bb9a575.tar.gz nextcloud-server-a0e038f91261a3ea75ca2c4c06a269c44bb9a575.zip |
generateTokenFromCache is only valid for V3
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/ObjectStore/SwiftFactory.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index 389a5df7195..3ff534b4e64 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -131,9 +131,9 @@ class SwiftFactory { $cachedToken = $this->params['cachedToken']; $hasValidCachedToken = false; - if (is_array($cachedToken)) { + if (\is_array($cachedToken) && ($authService instanceof IdentityV3Service)) { $token = $authService->generateTokenFromCache($cachedToken); - if (is_null($token->catalog)) { + if (\is_null($token->catalog)) { $this->logger->warning('Invalid cached token for swift, no catalog set: ' . json_encode($cachedToken)); } else if ($token->hasExpired()) { $this->logger->debug('Cached token for swift expired'); |