diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-12-03 00:16:10 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2019-01-12 22:47:48 +0100 |
commit | 00af48d9d20af1ce51c8ad42fe354fafc9ceb8a3 (patch) | |
tree | d25bd47e03f7016af5fc8d2ea982b982fed9f54a | |
parent | dfc650aa239d3a2c028d0ba13132ce75b4f4c0b4 (diff) | |
download | Shaarli-00af48d9d20af1ce51c8ad42fe354fafc9ceb8a3.tar.gz Shaarli-00af48d9d20af1ce51c8ad42fe354fafc9ceb8a3.tar.zst Shaarli-00af48d9d20af1ce51c8ad42fe354fafc9ceb8a3.zip |
namespacing: \Shaarli\Http\Base64Url
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
-rw-r--r-- | application/api/ApiUtils.php | 6 | ||||
-rw-r--r-- | application/http/Base64Url.php (renamed from application/Base64Url.php) | 2 | ||||
-rw-r--r-- | composer.json | 1 | ||||
-rw-r--r-- | tests/api/ApiUtilsTest.php | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/application/api/ApiUtils.php b/application/api/ApiUtils.php index fc5ecaf1..e51b73e1 100644 --- a/application/api/ApiUtils.php +++ b/application/api/ApiUtils.php | |||
@@ -1,7 +1,7 @@ | |||
1 | <?php | 1 | <?php |
2 | namespace Shaarli\Api; | 2 | namespace Shaarli\Api; |
3 | 3 | ||
4 | use Shaarli\Base64Url; | 4 | use Shaarli\Http\Base64Url; |
5 | use Shaarli\Api\Exceptions\ApiAuthorizationException; | 5 | use Shaarli\Api\Exceptions\ApiAuthorizationException; |
6 | 6 | ||
7 | /** | 7 | /** |
@@ -12,7 +12,7 @@ class ApiUtils | |||
12 | /** | 12 | /** |
13 | * Validates a JWT token authenticity. | 13 | * Validates a JWT token authenticity. |
14 | * | 14 | * |
15 | * @param string $token JWT token extracted from the headers. | 15 | * @param string $token JWT token extracted from the headers. |
16 | * @param string $secret API secret set in the settings. | 16 | * @param string $secret API secret set in the settings. |
17 | * | 17 | * |
18 | * @throws ApiAuthorizationException the token is not valid. | 18 | * @throws ApiAuthorizationException the token is not valid. |
@@ -50,7 +50,7 @@ class ApiUtils | |||
50 | /** | 50 | /** |
51 | * Format a Link for the REST API. | 51 | * Format a Link for the REST API. |
52 | * | 52 | * |
53 | * @param array $link Link data read from the datastore. | 53 | * @param array $link Link data read from the datastore. |
54 | * @param string $indexUrl Shaarli's index URL (used for relative URL). | 54 | * @param string $indexUrl Shaarli's index URL (used for relative URL). |
55 | * | 55 | * |
56 | * @return array Link data formatted for the REST API. | 56 | * @return array Link data formatted for the REST API. |
diff --git a/application/Base64Url.php b/application/http/Base64Url.php index 54d0fcd5..33fa7c1f 100644 --- a/application/Base64Url.php +++ b/application/http/Base64Url.php | |||
@@ -1,6 +1,6 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace Shaarli; | 3 | namespace Shaarli\Http; |
4 | 4 | ||
5 | /** | 5 | /** |
6 | * URL-safe Base64 operations | 6 | * URL-safe Base64 operations |
diff --git a/composer.json b/composer.json index 7c9cbf3d..8a3d1636 100644 --- a/composer.json +++ b/composer.json | |||
@@ -38,6 +38,7 @@ | |||
38 | "Shaarli\\Config\\Exception\\": "application/config/exception", | 38 | "Shaarli\\Config\\Exception\\": "application/config/exception", |
39 | "Shaarli\\Exceptions\\": "application/exceptions", | 39 | "Shaarli\\Exceptions\\": "application/exceptions", |
40 | "Shaarli\\Feed\\": "application/feed", | 40 | "Shaarli\\Feed\\": "application/feed", |
41 | "Shaarli\\Http\\": "application/http", | ||
41 | "Shaarli\\Security\\": "application/security" | 42 | "Shaarli\\Security\\": "application/security" |
42 | } | 43 | } |
43 | } | 44 | } |
diff --git a/tests/api/ApiUtilsTest.php b/tests/api/ApiUtilsTest.php index df4e189a..a1b623d8 100644 --- a/tests/api/ApiUtilsTest.php +++ b/tests/api/ApiUtilsTest.php | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | namespace Shaarli\Api; | 3 | namespace Shaarli\Api; |
4 | 4 | ||
5 | use Shaarli\Base64Url; | 5 | use Shaarli\Http\Base64Url; |
6 | 6 | ||
7 | /** | 7 | /** |
8 | * Class ApiUtilsTest | 8 | * Class ApiUtilsTest |