summaryrefslogtreecommitdiff
path: root/server/vendor/php-opencloud/common/src/Common/Auth
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-28 12:17:43 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-28 12:17:43 +0200
commit53f65de9d4163c9c095f2b8e87baca648c3645bd (patch)
tree37f167f38b25aa50bd7dd1429438c0245a280a28 /server/vendor/php-opencloud/common/src/Common/Auth
parent60cfe3ebc039df8d6a468a43a59e7fd8c2a16956 (diff)
parent804fa322d841d73ee7592885ec500dc94e91b9e6 (diff)
Test
Diffstat (limited to 'server/vendor/php-opencloud/common/src/Common/Auth')
-rwxr-xr-xserver/vendor/php-opencloud/common/src/Common/Auth/AuthHandler.php7
-rwxr-xr-xserver/vendor/php-opencloud/common/src/Common/Auth/Catalog.php4
-rwxr-xr-xserver/vendor/php-opencloud/common/src/Common/Auth/IdentityService.php4
-rwxr-xr-xserver/vendor/php-opencloud/common/src/Common/Auth/Token.php6
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 100755
--- 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 100755
--- 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 100755
--- 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 100755
--- 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;
}