Skip to content

Commit 3fd3dfd

Browse files
mrdevontvdijen
authored andcommitted
SAML2: Add support for additional sp login hints (#2610)
* Add support from SPs for login_hint & LoginHint #2609 * docs: Add changelog for login_hint & LoginHint HTTP parameters
1 parent 0ec7187 commit 3fd3dfd

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

docs/simplesamlphp-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Released TBD
2929
* Fix override over errorURL
3030
* Introduced a new assets.salt to allow cache busting without leaking version information (#2490)
3131
* If session.check_function is set and can not be called an error is raised (#2498)
32+
* Add 'login_hint' and 'LoginHint' as additional supported username hints from SPs in HTTP parameters (#2609)
3233

3334
`authorize`
3435

modules/saml/src/IdP/SAML2.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ public static function receiveAuthnRequest(IdP $idp): void
399399

400400
if (isset($_REQUEST['username'])) {
401401
$username = (string) $_REQUEST['username'];
402+
} elseif (isset($_REQUEST['login_hint'])) {
403+
$username = (string) $_REQUEST['login_hint'];
404+
} elseif (isset($_REQUEST['LoginHint'])) {
405+
$username = (string) $_REQUEST['LoginHint'];
402406
}
403407

404408
$issuer = $request->getIssuer();

0 commit comments

Comments
 (0)