diff options
author | Olav Morken <olav.morken@uninett.no> | 2013-11-15 09:34:07 +0000 |
---|---|---|
committer | Olav Morken <olav.morken@uninett.no> | 2013-11-15 09:34:07 +0000 |
commit | 6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc (patch) | |
tree | f1d6c78ab5e2eec5f8b8121f9e1a838c28997fa6 /lib/SAML2/XML/md/SPSSODescriptor.php | |
parent | e9c98e008ed7dbb5d642aa4788edd2510c952ca1 (diff) | |
download | simplesamlphp-6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc.zip simplesamlphp-6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc.tar.gz simplesamlphp-6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc.tar.bz2 |
Start using SAML2 library from GitHub.
This patch also starts using Composer for other dependencies
(i.e. php-openid and xmlseclibs).
Thanks to Boy Baukema for implementing this!
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3290 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SAML2/XML/md/SPSSODescriptor.php')
-rw-r--r-- | lib/SAML2/XML/md/SPSSODescriptor.php | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/lib/SAML2/XML/md/SPSSODescriptor.php b/lib/SAML2/XML/md/SPSSODescriptor.php deleted file mode 100644 index da7077e..0000000 --- a/lib/SAML2/XML/md/SPSSODescriptor.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php - -/** - * Class representing SAML 2 SPSSODescriptor. - * - * @package simpleSAMLphp - * @version $Id$ - */ -class SAML2_XML_md_SPSSODescriptor extends SAML2_XML_md_SSODescriptorType { - - /** - * Whether this SP signs authentication requests. - * - * @var bool|NULL - */ - public $AuthnRequestsSigned = NULL; - - - /** - * Whether this SP wants the Assertion elements to be signed. - * - * @var bool|NULL - */ - public $WantAssertionsSigned = NULL; - - - /** - * List of AssertionConsumerService endpoints for this SP. - * - * Array with IndexedEndpointType objects. - * - * @var array - */ - public $AssertionConsumerService = array(); - - - /** - * List of AttributeConsumingService descriptors for this SP. - * - * Array with SAML2_XML_md_AttribteConsumingService objects. - * - * @var array - */ - public $AttributeConsumingService = array(); - - - /** - * Initialize a SPSSODescriptor. - * - * @param DOMElement|NULL $xml The XML element we should load. - */ - public function __construct(DOMElement $xml = NULL) { - parent::__construct('md:SPSSODescriptor', $xml); - - if ($xml === NULL) { - return; - } - - $this->AuthnRequestsSigned = SAML2_Utils::parseBoolean($xml, 'AuthnRequestsSigned', NULL); - $this->WantAssertionsSigned = SAML2_Utils::parseBoolean($xml, 'WantAssertionsSigned', NULL); - - foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AssertionConsumerService') as $ep) { - $this->AssertionConsumerService[] = new SAML2_XML_md_IndexedEndpointType($ep); - } - - foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AttributeConsumingService') as $acs) { - $this->AttributeConsumingService[] = new SAML2_XML_md_AttributeConsumingService($acs); - } - } - - - /** - * Add this SPSSODescriptor to an EntityDescriptor. - * - * @param DOMElement $parent The EntityDescriptor we should append this SPSSODescriptor to. - */ - public function toXML(DOMElement $parent) { - assert('is_null($this->AuthnRequestsSigned) || is_bool($this->AuthnRequestsSigned)'); - assert('is_null($this->WantAssertionsSigned) || is_bool($this->WantAssertionsSigned)'); - assert('is_array($this->AssertionConsumerService)'); - assert('is_array($this->AttributeConsumingService)'); - - $e = parent::toXML($parent); - - if ($this->AuthnRequestsSigned === TRUE) { - $e->setAttribute('AuthnRequestsSigned', 'true'); - } elseif ($this->AuthnRequestsSigned === FALSE) { - $e->setAttribute('AuthnRequestsSigned', 'false'); - } - - if ($this->WantAssertionsSigned === TRUE) { - $e->setAttribute('WantAssertionsSigned', 'true'); - } elseif ($this->WantAssertionsSigned === FALSE) { - $e->setAttribute('WantAssertionsSigned', 'false'); - } - - - foreach ($this->AssertionConsumerService as $ep) { - $ep->toXML($e, 'md:AssertionConsumerService'); - } - - foreach ($this->AttributeConsumingService as $acs) { - $acs->toXML($e); - } - } - -} |