]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Fix identation
authorChristoph Stoettner <christoph.stoettner@stoeps.de>
Wed, 30 Sep 2020 10:29:54 +0000 (12:29 +0200)
committerChristoph Stoettner <christoph.stoettner@stoeps.de>
Wed, 30 Sep 2020 10:29:54 +0000 (12:29 +0200)
application/api/ApiMiddleware.php

index f4a71f7c105d7d87042c395c2eeda36c7bc2a15a..7f1e7fca2785d0d485d9855ccdcd4899ba09feae 100644 (file)
@@ -102,16 +102,16 @@ class ApiMiddleware
         if (! $request->hasHeader('Authorization') && !isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])) {
             throw new ApiAuthorizationException('JWT token not provided');
         }
-       
+
         if (empty($this->conf->get('api.secret'))) {
             throw new ApiAuthorizationException('Token secret must be set in Shaarli\'s administration');
         }
 
-       if (isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])) {
-           $authorization = $this->container->environment['REDIRECT_HTTP_AUTHORIZATION'];
-       } else {
+        if (isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])) {
+            $authorization = $this->container->environment['REDIRECT_HTTP_AUTHORIZATION'];
+        } else {
             $authorization = $request->getHeaderLine('Authorization');
-       }
+        }
 
         if (! preg_match('/^Bearer (.*)/i', $authorization, $matches)) {
             throw new ApiAuthorizationException('Invalid JWT header');