aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
diff options
context:
space:
mode:
authorChristoph Stoettner <christoph.stoettner@stoeps.de>2020-09-30 12:29:54 +0200
committerChristoph Stoettner <christoph.stoettner@stoeps.de>2020-09-30 12:29:54 +0200
commit25cb75552baaad62b093b0b38156fcb15dca7826 (patch)
treeeeb6f24c6788337cf6769bcba6d609972842c54a /application
parentd8ef4a893fc899471d415c4aa0bb1cad9ab9c2dc (diff)
downloadShaarli-25cb75552baaad62b093b0b38156fcb15dca7826.tar.gz
Shaarli-25cb75552baaad62b093b0b38156fcb15dca7826.tar.zst
Shaarli-25cb75552baaad62b093b0b38156fcb15dca7826.zip
Fix identation
Diffstat (limited to 'application')
-rw-r--r--application/api/ApiMiddleware.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/application/api/ApiMiddleware.php b/application/api/ApiMiddleware.php
index f4a71f7c..7f1e7fca 100644
--- a/application/api/ApiMiddleware.php
+++ b/application/api/ApiMiddleware.php
@@ -102,16 +102,16 @@ class ApiMiddleware
102 if (! $request->hasHeader('Authorization') && !isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])) { 102 if (! $request->hasHeader('Authorization') && !isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])) {
103 throw new ApiAuthorizationException('JWT token not provided'); 103 throw new ApiAuthorizationException('JWT token not provided');
104 } 104 }
105 105
106 if (empty($this->conf->get('api.secret'))) { 106 if (empty($this->conf->get('api.secret'))) {
107 throw new ApiAuthorizationException('Token secret must be set in Shaarli\'s administration'); 107 throw new ApiAuthorizationException('Token secret must be set in Shaarli\'s administration');
108 } 108 }
109 109
110 if (isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])) { 110 if (isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])) {
111 $authorization = $this->container->environment['REDIRECT_HTTP_AUTHORIZATION']; 111 $authorization = $this->container->environment['REDIRECT_HTTP_AUTHORIZATION'];
112 } else { 112 } else {
113 $authorization = $request->getHeaderLine('Authorization'); 113 $authorization = $request->getHeaderLine('Authorization');
114 } 114 }
115 115
116 if (! preg_match('/^Bearer (.*)/i', $authorization, $matches)) { 116 if (! preg_match('/^Bearer (.*)/i', $authorization, $matches)) {
117 throw new ApiAuthorizationException('Invalid JWT header'); 117 throw new ApiAuthorizationException('Invalid JWT header');