Try to fix getToken BuerklinProvider.php

This commit is contained in:
Marc 2025-03-11 18:41:03 +01:00 committed by GitHub
parent fc2e7265be
commit 5070abd5d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,11 +69,10 @@ class BuerklinProvider implements InfoProviderInterface
*/
private function getToken(): string
{
if ($this->authTokenManager->hasToken(self::OAUTH_APP_NAME)) {
return $this->authTokenManager->getAlwaysValidTokenString(self::OAUTH_APP_NAME);
if (!$this->authTokenManager->hasToken(self::OAUTH_APP_NAME)) {
$this->authTokenManager->retrieveClientCredentialsToken(self::OAUTH_APP_NAME);
}
$this->authTokenManager->retrieveClientCredentialsToken(self::OAUTH_APP_NAME);
$token = $this->authTokenManager->getAlwaysValidTokenString(self::OAUTH_APP_NAME);
if ($token === null) {
@ -81,10 +80,9 @@ class BuerklinProvider implements InfoProviderInterface
}
return $token;
}
}
/**
/**
* Make a http get request to the Buerklin API
* @return array
*/