ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SAML2\XML\md\PDPDescriptor Class Reference
+ Inheritance diagram for SAML2\XML\md\PDPDescriptor:
+ Collaboration diagram for SAML2\XML\md\PDPDescriptor:

Public Member Functions

 __construct (\DOMElement $xml=null)
 Initialize an IDPSSODescriptor. More...
 
 toXML (\DOMElement $parent)
 Add this PDPDescriptor to an EntityDescriptor. More...
 
- Public Member Functions inherited from SAML2\SignedElementHelper
 addValidator ($function, $data)
 Add a method for validating this element. More...
 
 validate (XMLSecurityKey $key)
 Validate this element against a public key. More...
 
 getSignatureKey ()
 Retrieve the private key we should use to sign the message. More...
 
 setSignatureKey (XMLSecurityKey $signatureKey=null)
 Set the private key we should use to sign the message. More...
 
 setCertificates (array $certificates)
 Set the certificates that should be included in the message. More...
 
 getCertificates ()
 Retrieve the certificates that are included in the message. More...
 
 getValidatingCertificates ()
 Retrieve certificates that sign this element. More...
 

Data Fields

 $AuthzService = array()
 
 $AssertionIDRequestService = array()
 
 $NameIDFormat = array()
 
- Data Fields inherited from SAML2\XML\md\RoleDescriptor
 $ID
 
 $validUntil
 
 $cacheDuration
 
 $protocolSupportEnumeration = array()
 
 $errorURL
 
 $Extensions = array()
 
 $KeyDescriptor = array()
 
 $Organization = null
 
 $ContactPerson = array()
 

Additional Inherited Members

- Protected Member Functions inherited from SAML2\XML\md\RoleDescriptor
 __construct ($elementName, \DOMElement $xml=null)
 Initialize a RoleDescriptor. More...
 
 toXML (\DOMElement $parent)
 Add this RoleDescriptor to an EntityDescriptor. More...
 
- Protected Member Functions inherited from SAML2\SignedElementHelper
 __construct (\DOMElement $xml=null)
 Initialize the helper class. More...
 
 signElement (\DOMElement $root, \DOMElement $insertBefore=null)
 Sign the given XML element. More...
 

Detailed Description

Definition at line 13 of file PDPDescriptor.php.

Constructor & Destructor Documentation

◆ __construct()

SAML2\XML\md\PDPDescriptor::__construct ( \DOMElement  $xml = null)

Initialize an IDPSSODescriptor.

Parameters
\DOMElement | null$xmlThe XML element we should load.
Exceptions

Definition at line 48 of file PDPDescriptor.php.

References $xml, SAML2\Utils\extractStrings(), SAML2\Constants\NS_MD, and SAML2\Utils\xpQuery().

49  {
50  parent::__construct('md:PDPDescriptor', $xml);
51 
52  if ($xml === null) {
53  return;
54  }
55 
56  foreach (Utils::xpQuery($xml, './saml_metadata:AuthzService') as $ep) {
57  $this->AuthzService[] = new EndpointType($ep);
58  }
59  if (empty($this->AuthzService)) {
60  throw new \Exception('Must have at least one AuthzService in PDPDescriptor.');
61  }
62 
63  foreach (Utils::xpQuery($xml, './saml_metadata:AssertionIDRequestService') as $ep) {
64  $this->AssertionIDRequestService[] = new EndpointType($ep);
65  }
66 
67  $this->NameIDFormat = Utils::extractStrings($xml, Constants::NS_MD, 'NameIDFormat');
68  }
static extractStrings(\DOMElement $parent, $namespaceURI, $localName)
Extract strings from a set of nodes.
Definition: Utils.php:610
$xml
Definition: metadata.php:240
const NS_MD
The namespace for the SAML 2 metadata.
Definition: Constants.php:225
static xpQuery(\DOMNode $node, $query)
Do an XPath query on an XML node.
Definition: Utils.php:191
+ Here is the call graph for this function:

Member Function Documentation

◆ toXML()

SAML2\XML\md\PDPDescriptor::toXML ( \DOMElement  $parent)

Add this PDPDescriptor to an EntityDescriptor.

Parameters
\DOMElement$parentThe EntityDescriptor we should append this IDPSSODescriptor to.
Returns

Definition at line 76 of file PDPDescriptor.php.

References SAML2\Utils\addStrings(), and SAML2\Constants\NS_MD.

77  {
78  assert(is_array($this->AuthzService));
79  assert(!empty($this->AuthzService));
80  assert(is_array($this->AssertionIDRequestService));
81  assert(is_array($this->NameIDFormat));
82 
83  $e = parent::toXML($parent);
84 
85  foreach ($this->AuthzService as $ep) {
86  $ep->toXML($e, 'md:AuthzService');
87  }
88 
89  foreach ($this->AssertionIDRequestService as $ep) {
90  $ep->toXML($e, 'md:AssertionIDRequestService');
91  }
92 
93  Utils::addStrings($e, Constants::NS_MD, 'md:NameIDFormat', false, $this->NameIDFormat);
94 
95  return $e;
96  }
static addStrings(\DOMElement $parent, $namespace, $name, $localized, array $values)
Append string elements.
Definition: Utils.php:659
const NS_MD
The namespace for the SAML 2 metadata.
Definition: Constants.php:225
+ Here is the call graph for this function:

Field Documentation

◆ $AssertionIDRequestService

SAML2\XML\md\PDPDescriptor::$AssertionIDRequestService = array()

Definition at line 31 of file PDPDescriptor.php.

◆ $AuthzService

SAML2\XML\md\PDPDescriptor::$AuthzService = array()

Definition at line 22 of file PDPDescriptor.php.

◆ $NameIDFormat

SAML2\XML\md\PDPDescriptor::$NameIDFormat = array()

Definition at line 40 of file PDPDescriptor.php.


The documentation for this class was generated from the following file: