From 480e30eb20e273b9453dc6d2ba0af1db8cbe74cc Mon Sep 17 00:00:00 2001 From: Nicholas Amon <namon@xceedium.com> Date: Wed, 10 Sep 2014 09:40:35 -0400 Subject: [PATCH] Bug fix to include the subject nameid in the data returned from a SAML 1.0 SSO authentication. --- lib/SimpleSAML/Auth/Default.php | 2 +- modules/saml/www/sp/saml1-acs.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php index f577577fa..3a76906a5 100644 --- a/lib/SimpleSAML/Auth/Default.php +++ b/lib/SimpleSAML/Auth/Default.php @@ -98,7 +98,7 @@ class SimpleSAML_Auth_Default { } /* Add those that should always be included. */ - foreach (array('Attributes', 'Expire', 'LogoutState', 'AuthnInstant', 'RememberMe') as $a) { + foreach (array('Attributes', 'Expire', 'LogoutState', 'AuthnInstant', 'RememberMe', 'saml:sp:NameID') as $a) { if (isset($state[$a])) { $persistentAuthState[$a] = $state[$a]; } diff --git a/modules/saml/www/sp/saml1-acs.php b/modules/saml/www/sp/saml1-acs.php index 95cc91b58..b636854f0 100644 --- a/modules/saml/www/sp/saml1-acs.php +++ b/modules/saml/www/sp/saml1-acs.php @@ -85,6 +85,8 @@ $logoutState = array( ); $state['LogoutState'] = $logoutState; +$state['saml:sp:NameID'] = $response->getNameID(); + $source->handleResponse($state, $responseIssuer, $attributes); assert('FALSE'); -- GitLab