From 99517b5ff959acde335a8b237b8a39cd9eade1e9 Mon Sep 17 00:00:00 2001 From: Jared Cugno Date: Sat, 8 Mar 2014 21:45:24 -0800 Subject: [PATCH 1/3] Added composer --- composer.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..838ae7fb --- /dev/null +++ b/composer.json @@ -0,0 +1,9 @@ +{ + "name": "onelogin/php-saml", + "description": "Simple SAML toolkit for PHP", + "license": "BSD-3-Clause", + "keywords": ["saml"], + "autoload": { + "classmap": ["src/", "ext/"] + } +} From 7f6251ea6b36ee2d36ea7e210555d07830be5c2a Mon Sep 17 00:00:00 2001 From: Jared Cugno Date: Sun, 9 Mar 2014 00:48:35 -0500 Subject: [PATCH 2/3] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 838ae7fb..01888c25 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "onelogin/php-saml", + "name": "jcugno/php-saml", "description": "Simple SAML toolkit for PHP", "license": "BSD-3-Clause", "keywords": ["saml"], From 6b6739ef36cb7f7bac7e4a9205f038a0261cbc69 Mon Sep 17 00:00:00 2001 From: Jared Cugno Date: Sat, 8 Mar 2014 23:20:03 -0800 Subject: [PATCH 3/3] Had to modify the query for mdr --- src/OneLogin/Saml/Response.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OneLogin/Saml/Response.php b/src/OneLogin/Saml/Response.php index a78a1d02..b64c3a0e 100644 --- a/src/OneLogin/Saml/Response.php +++ b/src/OneLogin/Saml/Response.php @@ -62,7 +62,7 @@ public function getNameId() * AuthnStatement element. * Using this attribute, the IdP suggests the local session expiration * time. - * + * * @return The SessionNotOnOrAfter as unix epoc or NULL if not present */ public function getSessionNotOnOrAfter() @@ -107,14 +107,14 @@ protected function _queryAssertion($assertionXpath) $xpath->registerNamespace('saml' , 'urn:oasis:names:tc:SAML:2.0:assertion'); $xpath->registerNamespace('ds' , 'http://www.w3.org/2000/09/xmldsig#'); - $signatureQuery = '/samlp:Response/saml:Assertion/ds:Signature/ds:SignedInfo/ds:Reference'; + $signatureQuery = '/samlp:Response//ds:Signature/ds:SignedInfo/ds:Reference'; $assertionReferenceNode = $xpath->query($signatureQuery)->item(0); if (!$assertionReferenceNode) { throw new Exception('Unable to query assertion, no Signature Reference found?'); } $id = substr($assertionReferenceNode->attributes->getNamedItem('URI')->nodeValue, 1); - $nameQuery = "/samlp:Response/saml:Assertion[@ID='$id']" . $assertionXpath; + $nameQuery = "/samlp:Response/saml:Assertion" . $assertionXpath; return $xpath->query($nameQuery); } }