+ /**
+ * Start the logout flow via SAML2.
+ */
+ public function logout()
+ {
+ $logoutDetails = $this->samlService->logout();
+
+ if ($logoutDetails['id']) {
+ session()->flash('saml2_logout_request_id', $logoutDetails['id']);
+ }
+
+ return redirect($logoutDetails['url']);
+ }
+