fix(openstack): Fix psalm issue with updated openstack version

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-04-23 12:17:55 +02:00
parent 144936abfd
commit cdb40a3110
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
1 changed files with 4 additions and 1 deletions

View File

@ -25,11 +25,14 @@ declare(strict_types=1);
*/
namespace OC\Files\ObjectStore;
use OpenStack\Common\Auth\Token;
use OpenStack\Identity\v2\Service;
class SwiftV2CachingAuthService extends Service {
public function authenticate(array $options = []): array {
if (!empty($options['v2cachedToken'])) {
if (isset($options['v2cachedToken'], $options['v2serviceUrl'])
&& $options['v2cachedToken'] instanceof Token
&& is_string($options['v2serviceUrl'])) {
return [$options['v2cachedToken'], $options['v2serviceUrl']];
} else {
return parent::authenticate($options);