summaryrefslogtreecommitdiffstats
path: root/lib/SAML2/XML/md/PDPDescriptor.php
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2013-11-15 09:34:07 +0000
committerOlav Morken <olav.morken@uninett.no>2013-11-15 09:34:07 +0000
commit6f61aef12c6b1b02e32da6d1c696bee6d5f1e4dc (patch)
treef1d6c78ab5e2eec5f8b8121f9e1a838c28997fa6 /lib/SAML2/XML/md/PDPDescriptor.php
parente9c98e008ed7dbb5d642aa4788edd2510c952ca1 (diff)
downloadsimplesamlphp-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/PDPDescriptor.php')
-rw-r--r--lib/SAML2/XML/md/PDPDescriptor.php94
1 files changed, 0 insertions, 94 deletions
diff --git a/lib/SAML2/XML/md/PDPDescriptor.php b/lib/SAML2/XML/md/PDPDescriptor.php
deleted file mode 100644
index f09d054..0000000
--- a/lib/SAML2/XML/md/PDPDescriptor.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-/**
- * Class representing SAML 2 metadata PDPDescriptor.
- *
- * @package simpleSAMLphp
- * @version $Id$
- */
-class SAML2_XML_md_PDPDescriptor extends SAML2_XML_md_RoleDescriptor {
-
- /**
- * List of AuthzService endpoints.
- *
- * Array with EndpointType objects.
- *
- * @var array
- */
- public $AuthzService = array();
-
-
- /**
- * List of AssertionIDRequestService endpoints.
- *
- * Array with EndpointType objects.
- *
- * @var array
- */
- public $AssertionIDRequestService = array();
-
-
- /**
- * List of supported NameID formats.
- *
- * Array of strings.
- *
- * @var array
- */
- public $NameIDFormat = array();
-
-
- /**
- * Initialize an IDPSSODescriptor.
- *
- * @param DOMElement|NULL $xml The XML element we should load.
- */
- public function __construct(DOMElement $xml = NULL) {
- parent::__construct('md:PDPDescriptor', $xml);
-
- if ($xml === NULL) {
- return;
- }
-
- foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AuthzService') as $ep) {
- $this->AuthzService[] = new SAML2_XML_md_EndpointType($ep);
- }
- if (empty($this->AuthzService)) {
- throw new Exception('Must have at least one AuthzService in PDPDescriptor.');
- }
-
- foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AssertionIDRequestService') as $ep) {
- $this->AssertionIDRequestService[] = new SAML2_XML_md_EndpointType($ep);
- }
-
- $this->NameIDFormat = SAML2_Utils::extractStrings($xml, SAML2_Const::NS_MD, 'NameIDFormat');
- }
-
-
- /**
- * Add this PDPDescriptor to an EntityDescriptor.
- *
- * @param DOMElement $parent The EntityDescriptor we should append this IDPSSODescriptor to.
- */
- public function toXML(DOMElement $parent) {
- assert('is_array($this->AuthzService)');
- assert('!empty($this->AuthzService)');
- assert('is_array($this->AssertionIDRequestService)');
- assert('is_array($this->NameIDFormat)');
-
- $e = parent::toXML($parent);
-
- foreach ($this->AuthzService as $ep) {
- $ep->toXML($e, 'md:AuthzService');
- }
-
- foreach ($this->AssertionIDRequestService as $ep) {
- $ep->toXML($e, 'md:AssertionIDRequestService');
- }
-
- SAML2_Utils::addStrings($e, SAML2_Const::NS_MD, 'md:NameIDFormat', FALSE, $this->NameIDFormat);
-
- return $e;
- }
-
-}