]> BookStack Code Mirror - bookstack/blobdiff - app/Access/Controllers/OidcController.php
respective book and chapter structure added.
[bookstack] / app / Access / Controllers / OidcController.php
index 969f287d643cb21c1c9dab48d108b39cd6e3b7cd..055d4c1403ff2cae480bb8424f065b3a6d159970 100644 (file)
@@ -4,16 +4,13 @@ namespace BookStack\Access\Controllers;
 
 use BookStack\Access\Oidc\OidcException;
 use BookStack\Access\Oidc\OidcService;
-use BookStack\Http\Controllers\Controller;
+use BookStack\Http\Controller;
 use Illuminate\Http\Request;
 
 class OidcController extends Controller
 {
     protected OidcService $oidcService;
 
-    /**
-     * OpenIdController constructor.
-     */
     public function __construct(OidcService $oidcService)
     {
         $this->oidcService = $oidcService;
@@ -63,4 +60,12 @@ class OidcController extends Controller
 
         return redirect()->intended();
     }
+
+    /**
+     * Log the user out then start the OIDC RP-initiated logout process.
+     */
+    public function logout()
+    {
+        return redirect($this->oidcService->logout());
+    }
 }