generateTokenFromCache is only valid for V3
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
a1e379986b
commit
1dd7193047
|
@ -131,9 +131,9 @@ class SwiftFactory {
|
||||||
|
|
||||||
$cachedToken = $this->params['cachedToken'];
|
$cachedToken = $this->params['cachedToken'];
|
||||||
$hasValidCachedToken = false;
|
$hasValidCachedToken = false;
|
||||||
if (is_array($cachedToken)) {
|
if (\is_array($cachedToken) && ($authService instanceof IdentityV3Service)) {
|
||||||
$token = $authService->generateTokenFromCache($cachedToken);
|
$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));
|
$this->logger->warning('Invalid cached token for swift, no catalog set: ' . json_encode($cachedToken));
|
||||||
} else if ($token->hasExpired()) {
|
} else if ($token->hasExpired()) {
|
||||||
$this->logger->debug('Cached token for swift expired');
|
$this->logger->debug('Cached token for swift expired');
|
||||||
|
|
Loading…
Reference in New Issue