diff options
Diffstat (limited to 'server/vendor/php-opencloud/common/src/Common/Auth')
4 files changed, 12 insertions, 9 deletions
diff --git a/server/vendor/php-opencloud/common/src/Common/Auth/AuthHandler.php b/server/vendor/php-opencloud/common/src/Common/Auth/AuthHandler.php index 1a36cc0..61a07c9 100644 --- a/server/vendor/php-opencloud/common/src/Common/Auth/AuthHandler.php +++ b/server/vendor/php-opencloud/common/src/Common/Auth/AuthHandler.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); namespace OpenCloud\Common\Auth; @@ -14,10 +14,13 @@ use Psr\Http\Message\RequestInterface; */ class AuthHandler { + /** @var callable */ private $nextHandler; + /** @var callable */ private $tokenGenerator; + /** @var Token */ private $token; /** @@ -66,7 +69,7 @@ class AuthHandler * * @return bool */ - private function shouldIgnore(RequestInterface $request) + private function shouldIgnore(RequestInterface $request): bool { return strpos((string) $request->getUri(), 'tokens') !== false && $request->getMethod() == 'POST'; } diff --git a/server/vendor/php-opencloud/common/src/Common/Auth/Catalog.php b/server/vendor/php-opencloud/common/src/Common/Auth/Catalog.php index b4ab381..22ebc09 100644 --- a/server/vendor/php-opencloud/common/src/Common/Auth/Catalog.php +++ b/server/vendor/php-opencloud/common/src/Common/Auth/Catalog.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); namespace OpenCloud\Common\Auth; @@ -16,5 +16,5 @@ interface Catalog * * @returns string */ - public function getServiceUrl($name, $type, $region, $urlType); + public function getServiceUrl(string $name, string $type, string $region, string $urlType): string; } diff --git a/server/vendor/php-opencloud/common/src/Common/Auth/IdentityService.php b/server/vendor/php-opencloud/common/src/Common/Auth/IdentityService.php index 695e7b1..1f1d91f 100644 --- a/server/vendor/php-opencloud/common/src/Common/Auth/IdentityService.php +++ b/server/vendor/php-opencloud/common/src/Common/Auth/IdentityService.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); namespace OpenCloud\Common\Auth; @@ -9,5 +9,5 @@ interface IdentityService * * @return array The FIRST key is {@see Token} instance, the SECOND key is a {@see Catalog} instance */ - public function authenticate(array $options); + public function authenticate(array $options): array; } diff --git a/server/vendor/php-opencloud/common/src/Common/Auth/Token.php b/server/vendor/php-opencloud/common/src/Common/Auth/Token.php index 200fcee..642ea46 100644 --- a/server/vendor/php-opencloud/common/src/Common/Auth/Token.php +++ b/server/vendor/php-opencloud/common/src/Common/Auth/Token.php @@ -1,15 +1,15 @@ -<?php +<?php declare(strict_types=1); namespace OpenCloud\Common\Auth; interface Token { - public function getId(); + public function getId(): string; /** * Indicates whether the token has expired or not. * * @return bool TRUE if the token has expired, FALSE if it is still valid */ - public function hasExpired(); + public function hasExpired(): bool; } |
