Skip to content

Commit

Permalink
Merge pull request #759 from skodak/unsolicited
Browse files Browse the repository at this point in the history
set SESSION->saml2idp during unsolicited logins
  • Loading branch information
danmarsden authored Jun 18, 2024
2 parents 1d154ed + 9fedfa3 commit 974796e
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 974796e

Please sign in to comment.