From 22f06227a6d0095fa406134b16a08a2e9130c943 Mon Sep 17 00:00:00 2001 From: Date: Wed, 14 May 2008 19:21:17 +0200 Subject: [PATCH] store the nameId of the request in the protocol object --- include/lassospkit_saml2.inc.php | 3 +++ include/lassospkit_saml_common.inc.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/lassospkit_saml2.inc.php b/include/lassospkit_saml2.inc.php index 728bfd5..3989a3f 100644 --- a/include/lassospkit_saml2.inc.php +++ b/include/lassospkit_saml2.inc.php @@ -144,5 +144,8 @@ class LassoSPKitSaml2 extends LassoSPKitSAMLCommon { LassoSPKitHelper::changeFederation($nidmanagement, $this->session, $nidmanagement->request->NewID); + if ($nidmanagement->nameIdentifier) { + $this->nameID = LassoSPKitHelper::profileGetNameID($nidmanagement); + } } } diff --git a/include/lassospkit_saml_common.inc.php b/include/lassospkit_saml_common.inc.php index c4c07a3..8895886 100644 --- a/include/lassospkit_saml_common.inc.php +++ b/include/lassospkit_saml_common.inc.php @@ -20,6 +20,7 @@ class LassoSPKitSAMLCommon { var $ret_str = ""; var $exception = null; var $relayState = null; + var $nameID = null; public function __construct(LassoSPKitGenericSession $session) { $this->session = $session; @@ -390,6 +391,9 @@ class LassoSPKitSAMLCommon { save them in the federations database. */ public function saveFederation(LassoProfile $profile) { LassoSPKitHelper::saveFederation($profile, $this->session); + if ($profile->nameIdentifier) { + $this->nameID = LassoSPKitHelper::prileGetNameID($profile); + } return 0; } /** Find a federation using as many hints as possible (maybe the nameid given in the request,