Skip to content

Commit

Permalink
set SESSION->saml2idp during unsolicited logins
Browse files Browse the repository at this point in the history
This makes the IdP known in saml_login_complete()
and tenant callback.
  • Loading branch information
skodak committed Jun 13, 2024
1 parent 1d154ed commit 9fedfa3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .extlib/simplesamlphp/modules/saml/src/Auth/Source/SP.php
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,11 @@ public static function handleUnsolicitedAuth(string $authId, array $state, strin
// Moodle hack to handle IdP unsolicited logins.
$wantsurl = (new \moodle_url($redirectTo))->out(false);
$SESSION->wantsurl = $wantsurl;
if (!empty($state['saml:sp:IdP'])) {
$SESSION->saml2idp = md5($state['saml:sp:IdP']);
} else {
unset($SESSION->saml2idp);
}
$saml2auth->saml_login_complete($state['Attributes']);
// Should never get to here.

Expand Down

0 comments on commit 9fedfa3

Please sign in to comment.