mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-14 22:29:33 +00:00
Try to fix getToken BuerklinProvider.php
This commit is contained in:
parent
fc2e7265be
commit
5070abd5d3
1 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue