Skip to content
Snippets Groups Projects
Commit e1af0450 authored by Olav Morken's avatar Olav Morken
Browse files

saml/IdP: Fix NameID error with encrypted assertion.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2111 44740490-163a-0410-bde0-09ae8108e29a
parent bcf357d4
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@ class sspmod_saml_IdP_SAML2 {
$assertion = sspmod_saml2_Message::buildAssertion($idpMetadata, $spMetadata, $attributes, $consumerURL);
$assertion->setInResponseTo($requestId);
$nameId = $assertion->getNameId();
/* Maybe encrypt the assertion. */
$assertion = sspmod_saml2_Message::encryptAssertion($idpMetadata, $spMetadata, $assertion);
......@@ -51,7 +53,7 @@ class sspmod_saml_IdP_SAML2 {
/* Add the session association (for logout). */
$session = SimpleSAML_Session::getInstance();
$session->add_sp_session($spEntityId);
$session->setSessionNameId('saml20-sp-remote', $spEntityId, $assertion->getNameId());
$session->setSessionNameId('saml20-sp-remote', $spEntityId, $nameId);
/* Send the response. */
$binding = new SAML2_HTTPPost();
......
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