Skip to content
Snippets Groups Projects
Commit e5c4b99d authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Take into account the NameIDFormat specified in idp-hosted metadata when no...

Take into account the NameIDFormat specified in idp-hosted metadata when no such option is configured for an SP.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3312 44740490-163a-0410-bde0-09ae8108e29a
parent ab156a4c
No related branches found
No related tags found
No related merge requests found
...@@ -865,7 +865,10 @@ class sspmod_saml_IdP_SAML2 { ...@@ -865,7 +865,10 @@ class sspmod_saml_IdP_SAML2 {
if ($nameIdFormat === NULL || !isset($state['saml:NameID'][$nameIdFormat])) { if ($nameIdFormat === NULL || !isset($state['saml:NameID'][$nameIdFormat])) {
/* Either not set in request, or not set to a format we supply. Fall back to old generation method. */ /* Either not set in request, or not set to a format we supply. Fall back to old generation method. */
$nameIdFormat = $spMetadata->getString('NameIDFormat', 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient'); $nameIdFormat = $spMetadata->getString('NameIDFormat', NULL);
if ($nameIdFormat === NULL) {
$nameIdFormat = $idpMetadata->getString('NameIDFormat', SAML2_Const::NAMEID_TRANSIENT);
}
} }
if (isset($state['saml:NameID'][$nameIdFormat])) { if (isset($state['saml:NameID'][$nameIdFormat])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment