diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-10-13 00:19:03 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2018-12-02 22:39:16 +0100 |
commit | f211e417bf637b8a83988175c29ee072c69f7642 (patch) | |
tree | c33378b38ff1bd16e90934b5c60467a7e0395f53 /application/api/ApiMiddleware.php | |
parent | 04ec8fedd91642d4c0fc96258868086b8a51c899 (diff) | |
download | Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.tar.gz Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.tar.zst Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.zip |
lint: apply phpcbf to application/
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'application/api/ApiMiddleware.php')
-rw-r--r-- | application/api/ApiMiddleware.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/application/api/ApiMiddleware.php b/application/api/ApiMiddleware.php index ff209393..66eac133 100644 --- a/application/api/ApiMiddleware.php +++ b/application/api/ApiMiddleware.php | |||
@@ -65,7 +65,7 @@ class ApiMiddleware | |||
65 | try { | 65 | try { |
66 | $this->checkRequest($request); | 66 | $this->checkRequest($request); |
67 | $response = $next($request, $response); | 67 | $response = $next($request, $response); |
68 | } catch(ApiException $e) { | 68 | } catch (ApiException $e) { |
69 | $e->setResponse($response); | 69 | $e->setResponse($response); |
70 | $e->setDebug($this->conf->get('dev.debug', false)); | 70 | $e->setDebug($this->conf->get('dev.debug', false)); |
71 | $response = $e->getApiResponse(); | 71 | $response = $e->getApiResponse(); |
@@ -98,7 +98,8 @@ class ApiMiddleware | |||
98 | * | 98 | * |
99 | * @throws ApiAuthorizationException The token couldn't be validated. | 99 | * @throws ApiAuthorizationException The token couldn't be validated. |
100 | */ | 100 | */ |
101 | protected function checkToken($request) { | 101 | protected function checkToken($request) |
102 | { | ||
102 | if (! $request->hasHeader('Authorization')) { | 103 | if (! $request->hasHeader('Authorization')) { |
103 | throw new ApiAuthorizationException('JWT token not provided'); | 104 | throw new ApiAuthorizationException('JWT token not provided'); |
104 | } | 105 | } |