]> BookStack Code Mirror - bookstack/commitdiff
Applied latest StyleCI changes
authorDan Brown <redacted>
Thu, 24 Feb 2022 15:04:09 +0000 (15:04 +0000)
committerDan Brown <redacted>
Thu, 24 Feb 2022 15:04:09 +0000 (15:04 +0000)
app/Auth/Access/Oidc/OidcException.php
app/Auth/Access/Oidc/OidcIssuerDiscoveryException.php
app/Auth/Access/Oidc/OidcService.php
app/Http/Controllers/Auth/OidcController.php

index d65661d63b5dec75e719989127f79dcb2630c009..e39f2c22465cba1b34c8f4c8211496fbde5538f5 100644 (file)
@@ -4,4 +4,6 @@ namespace BookStack\Auth\Access\Oidc;
 
 use Exception;
 
-class OidcException extends Exception {}
+class OidcException extends Exception
+{
+}
index c14be689253783c040f045cf05618066b242c412..1ca1ed44a62332817f5bf8094c274cf9d9e08cfc 100644 (file)
@@ -4,4 +4,6 @@ namespace BookStack\Auth\Access\Oidc;
 
 use Exception;
 
-class OidcIssuerDiscoveryException extends Exception {}
+class OidcIssuerDiscoveryException extends Exception
+{
+}
index b4a6a0f089d8952f8fc15042bc54e9a2c86c47e2..eeacdb732357dc135075ef32827b3cfb2fafe74f 100644 (file)
@@ -2,18 +2,18 @@
 
 namespace BookStack\Auth\Access\Oidc;
 
+use function auth;
 use BookStack\Auth\Access\LoginService;
 use BookStack\Auth\Access\RegistrationService;
 use BookStack\Auth\User;
 use BookStack\Exceptions\JsonDebugException;
 use BookStack\Exceptions\StoppedAuthenticationException;
 use BookStack\Exceptions\UserRegistrationException;
+use function config;
 use Illuminate\Support\Facades\Cache;
 use League\OAuth2\Client\OptionProvider\HttpBasicAuthOptionProvider;
 use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
 use Psr\Http\Client\ClientInterface as HttpClient;
-use function auth;
-use function config;
 use function trans;
 use function url;
 
@@ -40,8 +40,9 @@ class OidcService
     /**
      * Initiate an authorization flow.
      *
-     * @return array{url: string, state: string}
      * @throws OidcException
+     *
+     * @return array{url: string, state: string}
      */
     public function login(): array
     {
@@ -77,7 +78,6 @@ class OidcService
         return $this->processAccessTokenCallback($accessToken, $settings);
     }
 
-
     /**
      * @throws OidcException
      */
index 571caa3c7b64e4a91c5fc967bc7c3e01503556a9..78a47e4888f55a3eb25232ae13acc7a88dce981c 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace BookStack\Http\Controllers\Auth;
 
-use BookStack\Auth\Access\Oidc\OidcService;
 use BookStack\Auth\Access\Oidc\OidcException;
+use BookStack\Auth\Access\Oidc\OidcService;
 use BookStack\Http\Controllers\Controller;
 use Illuminate\Http\Request;
 
@@ -29,6 +29,7 @@ class OidcController extends Controller
             $loginDetails = $this->oidcService->login();
         } catch (OidcException $exception) {
             $this->showErrorNotification($exception->getMessage());
+
             return redirect('/login');
         }
 
@@ -56,6 +57,7 @@ class OidcController extends Controller
             $this->oidcService->processAuthorizeResponse($request->query('code'));
         } catch (OidcException $oidcException) {
             $this->showErrorNotification($oidcException->getMessage());
+
             return redirect('/login');
         }
 
Morty Proxy This is a proxified and sanitized view of the page, visit original site.