]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/Saml2Controller.php
Fixes minor vulnerability when using target="_blank" on links (RSPEC-5148)
[bookstack] / app / Http / Controllers / Auth / Saml2Controller.php
index 86389412861a033e6c9bc8170f8799cb3c23988a..dc7814c4b173055bdb07c5c4a0e298249c113e65 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,8 +80,6 @@ class Saml2Controller extends Controller
             return redirect('/login');
         }
 
-        session()->put('last_login_type', 'saml2');
         return redirect()->intended();
     }
-
 }