From 987ceea339d25fd6547340f1d432656f2127f011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Thu, 17 Jan 2008 20:11:58 +0000 Subject: [PATCH] Updating the SAML 2.0 authnresponse generation to use the new API in xmlseclibs for adding reference ID attribute... Basicly an updated needed to make the saml 2 part work with the new xmlseclib version git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@176 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Bindings/SAML20/HTTPPost.php | 9 +++++++-- lib/SimpleSAML/XML/SAML20/AuthnResponse.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php index 0482bb065..66a20bcf4 100644 --- a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php +++ b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php @@ -118,8 +118,13 @@ class SimpleSAML_Bindings_SAML20_HTTPPost { //$objXMLSecDSig->addReferenceList(array($responseroot), XMLSecurityDSig::SHA1, //array('http://www.w3.org/2000/09/xmldsig#enveloped-signature')); - $objXMLSecDSig->addReferenceList(array($firstassertionroot), XMLSecurityDSig::SHA1, array('http://www.w3.org/2000/09/xmldsig#enveloped-signature', - 'http://www.w3.org/2001/10/xml-exc-c14n#')); +// $objXMLSecDSig->addReferenceList(array($firstassertionroot), XMLSecurityDSig::SHA1, +// array('http://www.w3.org/2000/09/xmldsig#enveloped-signature', +// 'http://www.w3.org/2001/10/xml-exc-c14n#')); + + $objXMLSecDSig->addReferenceList(array($firstassertionroot), XMLSecurityDSig::SHA1, + array('http://www.w3.org/2000/09/xmldsig#enveloped-signature'), + array('id_name' => 'ID')); #$objXMLSecDSig->addRefInternal($responseroot, $responseroot, XMLSecurityDSig::SHA1); diff --git a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php index 6f7f51464..072cf9442 100644 --- a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php +++ b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php @@ -254,7 +254,7 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse { "/mysamlp:Response[" . $valididquery . "]/mysaml:Assertion/mysaml:AttributeStatement/mysaml:Attribute", "/mysamlp:Response/mysaml:Assertion[" . $valididquery . "]/mysaml:AttributeStatement/mysaml:Attribute") AS $query) { -// echo 'performing query : ' . $query; + //echo 'performing query : ' . $query; // $query = "/mysamlp:Response[" . $valididquery . "]/mysaml:Assertion/mysaml:AttributeStatement/mysaml:Attribute"; $nodelist = $xPath->query($query); -- GitLab