namespacing: \Shaarli\Http\Base64Url

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2018-12-03 00:16:10 +01:00
parent dfc650aa23
commit 00af48d9d2
4 changed files with 6 additions and 5 deletions

View file

@ -1,7 +1,7 @@
<?php <?php
namespace Shaarli\Api; namespace Shaarli\Api;
use Shaarli\Base64Url; use Shaarli\Http\Base64Url;
use Shaarli\Api\Exceptions\ApiAuthorizationException; use Shaarli\Api\Exceptions\ApiAuthorizationException;
/** /**
@ -12,7 +12,7 @@ class ApiUtils
/** /**
* Validates a JWT token authenticity. * Validates a JWT token authenticity.
* *
* @param string $token JWT token extracted from the headers. * @param string $token JWT token extracted from the headers.
* @param string $secret API secret set in the settings. * @param string $secret API secret set in the settings.
* *
* @throws ApiAuthorizationException the token is not valid. * @throws ApiAuthorizationException the token is not valid.
@ -50,7 +50,7 @@ public static function validateJwtToken($token, $secret)
/** /**
* Format a Link for the REST API. * Format a Link for the REST API.
* *
* @param array $link Link data read from the datastore. * @param array $link Link data read from the datastore.
* @param string $indexUrl Shaarli's index URL (used for relative URL). * @param string $indexUrl Shaarli's index URL (used for relative URL).
* *
* @return array Link data formatted for the REST API. * @return array Link data formatted for the REST API.

View file

@ -1,6 +1,6 @@
<?php <?php
namespace Shaarli; namespace Shaarli\Http;
/** /**
* URL-safe Base64 operations * URL-safe Base64 operations

View file

@ -38,6 +38,7 @@
"Shaarli\\Config\\Exception\\": "application/config/exception", "Shaarli\\Config\\Exception\\": "application/config/exception",
"Shaarli\\Exceptions\\": "application/exceptions", "Shaarli\\Exceptions\\": "application/exceptions",
"Shaarli\\Feed\\": "application/feed", "Shaarli\\Feed\\": "application/feed",
"Shaarli\\Http\\": "application/http",
"Shaarli\\Security\\": "application/security" "Shaarli\\Security\\": "application/security"
} }
} }

View file

@ -2,7 +2,7 @@
namespace Shaarli\Api; namespace Shaarli\Api;
use Shaarli\Base64Url; use Shaarli\Http\Base64Url;
/** /**
* Class ApiUtilsTest * Class ApiUtilsTest