summaryrefslogtreecommitdiffstats
path: root/lib/SAML2/XML/ds
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/ds
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/ds')
-rw-r--r--lib/SAML2/XML/ds/KeyInfo.php94
-rw-r--r--lib/SAML2/XML/ds/KeyName.php45
-rw-r--r--lib/SAML2/XML/ds/X509Certificate.php45
-rw-r--r--lib/SAML2/XML/ds/X509Data.php74
4 files changed, 0 insertions, 258 deletions
diff --git a/lib/SAML2/XML/ds/KeyInfo.php b/lib/SAML2/XML/ds/KeyInfo.php
deleted file mode 100644
index 44b4b0d..0000000
--- a/lib/SAML2/XML/ds/KeyInfo.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-/**
- * Class representing a ds:KeyInfo element.
- *
- * @package simpleSAMLphp
- * @version $Id$
- */
-class SAML2_XML_ds_KeyInfo {
-
- /**
- * The Id attribute on this element.
- *
- * @var string|NULL
- */
- public $Id = NULL;
-
-
- /**
- * The various key information elements.
- *
- * Array with various elements describing this key.
- * Unknown elements will be represented by SAML2_XML_Chunk.
- *
- * @var array
- */
- public $info = array();
-
-
- /**
- * Initialize a KeyInfo element.
- *
- * @param DOMElement|NULL $xml The XML element we should load.
- */
- public function __construct(DOMElement $xml = NULL) {
-
- if ($xml === NULL) {
- return;
- }
-
- if ($xml->hasAttribute('Id')) {
- $this->Id = $xml->getAttribute('Id');
- }
-
- for ($n = $xml->firstChild; $n !== NULL; $n = $n->nextSibling) {
- if (!($n instanceof DOMElement)) {
- continue;
- }
-
- if ($n->namespaceURI !== XMLSecurityDSig::XMLDSIGNS) {
- $this->info[] = new SAML2_XML_Chunk($n);
- continue;
- }
- switch ($n->localName) {
- case 'KeyName':
- $this->info[] = new SAML2_XML_ds_KeyName($n);
- break;
- case 'X509Data':
- $this->info[] = new SAML2_XML_ds_X509Data($n);
- break;
- default:
- $this->info[] = new SAML2_XML_Chunk($n);
- break;
- }
- }
- }
-
-
- /**
- * Convert this KeyInfo to XML.
- *
- * @param DOMElement $parent The element we should append this KeyInfo to.
- */
- public function toXML(DOMElement $parent) {
- assert('is_null($this->Id) || is_string($this->Id)');
- assert('is_array($this->info)');
-
- $doc = $parent->ownerDocument;
-
- $e = $doc->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:KeyInfo');
- $parent->appendChild($e);
-
- if (isset($this->Id)) {
- $e->setAttribute('Id', $this->Id);
- }
-
- foreach ($this->info as $n) {
- $n->toXML($e);
- }
-
- return $e;
- }
-
-}
diff --git a/lib/SAML2/XML/ds/KeyName.php b/lib/SAML2/XML/ds/KeyName.php
deleted file mode 100644
index 6eae3a4..0000000
--- a/lib/SAML2/XML/ds/KeyName.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * Class representing a ds:KeyName element.
- *
- * @package simpleSAMLphp
- * @version $Id$
- */
-class SAML2_XML_ds_KeyName {
-
- /**
- * The key name.
- *
- * @var string
- */
- public $name;
-
-
- /**
- * Initialize a KeyName element.
- *
- * @param DOMElement|NULL $xml The XML element we should load.
- */
- public function __construct(DOMElement $xml = NULL) {
-
- if ($xml === NULL) {
- return;
- }
-
- $this->name = $xml->textContent;
- }
-
-
- /**
- * Convert this KeyName element to XML.
- *
- * @param DOMElement $parent The element we should append this KeyName element to.
- */
- public function toXML(DOMElement $parent) {
- assert('is_string($this->name)');
-
- return SAML2_Utils::addString($parent, XMLSecurityDSig::XMLDSIGNS, 'ds:KeyName', $this->name);
- }
-
-}
diff --git a/lib/SAML2/XML/ds/X509Certificate.php b/lib/SAML2/XML/ds/X509Certificate.php
deleted file mode 100644
index c4dcac1..0000000
--- a/lib/SAML2/XML/ds/X509Certificate.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * Class representing a ds:X509Certificate element.
- *
- * @package simpleSAMLphp
- * @version $Id$
- */
-class SAML2_XML_ds_X509Certificate {
-
- /**
- * The base64-encoded certificate.
- *
- * @var string
- */
- public $certificate;
-
-
- /**
- * Initialize an X509Certificate element.
- *
- * @param DOMElement|NULL $xml The XML element we should load.
- */
- public function __construct(DOMElement $xml = NULL) {
-
- if ($xml === NULL) {
- return;
- }
-
- $this->certificate = $xml->textContent;
- }
-
-
- /**
- * Convert this X509Certificate element to XML.
- *
- * @param DOMElement $parent The element we should append this X509Certificate element to.
- */
- public function toXML(DOMElement $parent) {
- assert('is_string($this->certificate)');
-
- return SAML2_Utils::addString($parent, XMLSecurityDSig::XMLDSIGNS, 'ds:X509Certificate', $this->certificate);
- }
-
-}
diff --git a/lib/SAML2/XML/ds/X509Data.php b/lib/SAML2/XML/ds/X509Data.php
deleted file mode 100644
index e6b3c06..0000000
--- a/lib/SAML2/XML/ds/X509Data.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * Class representing a ds:X509Data element.
- *
- * @package simpleSAMLphp
- * @version $Id$
- */
-class SAML2_XML_ds_X509Data {
-
- /**
- * The various X509 data elements.
- *
- * Array with various elements describing this certificate.
- * Unknown elements will be represented by SAML2_XML_Chunk.
- *
- * @var array
- */
- public $data = array();
-
-
- /**
- * Initialize a X509Data.
- *
- * @param DOMElement|NULL $xml The XML element we should load.
- */
- public function __construct(DOMElement $xml = NULL) {
-
- if ($xml === NULL) {
- return;
- }
-
- for ($n = $xml->firstChild; $n !== NULL; $n = $n->nextSibling) {
- if (!($n instanceof DOMElement)) {
- continue;
- }
-
- if ($n->namespaceURI !== XMLSecurityDSig::XMLDSIGNS) {
- $this->data[] = new SAML2_XML_Chunk($n);
- continue;
- }
- switch ($n->localName) {
- case 'X509Certificate':
- $this->data[] = new SAML2_XML_ds_X509Certificate($n);
- break;
- default:
- $this->data[] = new SAML2_XML_Chunk($n);
- break;
- }
- }
- }
-
-
- /**
- * Convert this X509Data element to XML.
- *
- * @param DOMElement $parent The element we should append this X509Data element to.
- */
- public function toXML(DOMElement $parent) {
- assert('is_array($this->data)');
-
- $doc = $parent->ownerDocument;
-
- $e = $doc->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:X509Data');
- $parent->appendChild($e);
-
- foreach ($this->data as $n) {
- $n->toXML($e);
- }
-
- return $e;
- }
-
-}