Skip to content

Commit

Permalink
Merge pull request #37 from tflori/2.0
Browse files Browse the repository at this point in the history
initialize saml.slo session with empty array
  • Loading branch information
upwebdesign authored Jan 7, 2021
2 parents 650cf30 + 68d048d commit 050035d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Http/Controllers/LogoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function index(Request $request)
$slo_redirect = $request->session()->get('saml.slo_redirect');
}

if (null === $request->session()->get('saml.slo')) {
$request->session()->put('saml.slo', []);
}

// Need to broadcast to our other SAML apps to log out!
// Loop through our service providers and "touch" the logout URL's
foreach (config('samlidp.sp') as $key => $sp) {
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/SamlLogout.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SamlLogout
public function handle(Logout $event)
{
// Make sure we are not in the process of SLO when handling the redirect
if (!session('saml.slo')) {
if (null === session('saml.slo')) {
abort(redirect('saml/logout'), 200);
}
}
Expand Down

0 comments on commit 050035d

Please sign in to comment.