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/IDPSSODescriptor.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/IDPSSODescriptor.php')
-rw-r--r-- | lib/SAML2/XML/md/IDPSSODescriptor.php | 145 |
1 files changed, 0 insertions, 145 deletions
diff --git a/lib/SAML2/XML/md/IDPSSODescriptor.php b/lib/SAML2/XML/md/IDPSSODescriptor.php deleted file mode 100644 index 0479d98..0000000 --- a/lib/SAML2/XML/md/IDPSSODescriptor.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -/** - * Class representing SAML 2 IDPSSODescriptor. - * - * @package simpleSAMLphp - * @version $Id$ - */ -class SAML2_XML_md_IDPSSODescriptor extends SAML2_XML_md_SSODescriptorType { - - /** - * Whether AuthnRequests sent to this IdP should be signed. - * - * @var bool|NULL - */ - public $WantAuthnRequestsSigned = NULL; - - - /** - * List of SingleSignOnService endpoints. - * - * Array with EndpointType objects. - * - * @var array - */ - public $SingleSignOnService = array(); - - - /** - * List of NameIDMappingService endpoints. - * - * Array with EndpointType objects. - * - * @var array - */ - public $NameIDMappingService = array(); - - - /** - * List of AssertionIDRequestService endpoints. - * - * Array with EndpointType objects. - * - * @var array - */ - public $AssertionIDRequestService = array(); - - - /** - * List of supported attribute profiles. - * - * Array with strings. - * - * @var array - */ - public $AttributeProfile = array(); - - - /** - * List of supported attributes. - * - * Array with SAML2_XML_saml_Attribute objects. - * - * @var array - */ - public $Attribute = array(); - - - /** - * Initialize an IDPSSODescriptor. - * - * @param DOMElement|NULL $xml The XML element we should load. - */ - public function __construct(DOMElement $xml = NULL) { - parent::__construct('md:IDPSSODescriptor', $xml); - - if ($xml === NULL) { - return; - } - - $this->WantAuthnRequestsSigned = SAML2_Utils::parseBoolean($xml, 'WantAuthnRequestsSigned', NULL); - - foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:SingleSignOnService') as $ep) { - $this->SingleSignOnService[] = new SAML2_XML_md_EndpointType($ep); - } - - foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:NameIDMappingService') as $ep) { - $this->NameIDMappingService[] = new SAML2_XML_md_EndpointType($ep); - } - - foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AssertionIDRequestService') as $ep) { - $this->AssertionIDRequestService[] = new SAML2_XML_md_EndpointType($ep); - } - - $this->AttributeProfile = SAML2_Utils::extractStrings($xml, SAML2_Const::NS_MD, 'AttributeProfile'); - - foreach (SAML2_Utils::xpQuery($xml, './saml_assertion:Attribute') as $a) { - $this->Attribute[] = new SAML2_XML_saml_Attribute($a); - } - } - - - /** - * Add this IDPSSODescriptor to an EntityDescriptor. - * - * @param DOMElement $parent The EntityDescriptor we should append this IDPSSODescriptor to. - */ - public function toXML(DOMElement $parent) { - assert('is_null($this->WantAuthnRequestsSigned) || is_bool($this->WantAuthnRequestsSigned)'); - assert('is_array($this->SingleSignOnService)'); - assert('is_array($this->NameIDMappingService)'); - assert('is_array($this->AssertionIDRequestService)'); - assert('is_array($this->AttributeProfile)'); - assert('is_array($this->Attribute)'); - - $e = parent::toXML($parent); - - if ($this->WantAuthnRequestsSigned === TRUE) { - $e->setAttribute('WantAuthnRequestsSigned', 'true'); - } elseif ($this->WantAuthnRequestsSigned === FALSE) { - $e->setAttribute('WantAuthnRequestsSigned', 'false'); - } - - foreach ($this->SingleSignOnService as $ep) { - $ep->toXML($e, 'md:SingleSignOnService'); - } - - foreach ($this->NameIDMappingService as $ep) { - $ep->toXML($e, 'md:NameIDMappingService'); - } - - foreach ($this->AssertionIDRequestService as $ep) { - $ep->toXML($e, 'md:AssertionIDRequestService'); - } - - SAML2_Utils::addStrings($e, SAML2_Const::NS_MD, 'md:AttributeProfile', FALSE, $this->AttributeProfile); - - foreach ($this->Attribute as $a) { - $a->toXML($e); - } - - return $e; - } - -} |