]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/Saml2Controller.php
Added testing to cover the pages API
[bookstack] / app / Http / Controllers / Auth / Saml2Controller.php
index 86389412861a033e6c9bc8170f8799cb3c23988a..8a3bf065ed566b55062a184c76c7144797417060 100644 (file)
@@ -15,17 +15,8 @@ class Saml2Controller extends Controller
      */
     public function __construct(Saml2Service $samlService)
     {
-        parent::__construct();
         $this->samlService = $samlService;
-
-        // SAML2 access middleware
-        $this->middleware(function ($request, $next) {
-            if (!config('saml2.enabled')) {
-                $this->showPermissionError();
-            }
-
-            return $next($request);
-        });
+        $this->middleware('guard:saml2');
     }
 
     /**
@@ -89,7 +80,6 @@ class Saml2Controller extends Controller
             return redirect('/login');
         }
 
-        session()->put('last_login_type', 'saml2');
         return redirect()->intended();
     }