Skip to content

Commit

Permalink
fix(openstack): Fix psalm issue with updated openstack version
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Apr 24, 2024
1 parent 144936a commit cdb40a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@
*/
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);
Expand Down

0 comments on commit cdb40a3

Please sign in to comment.