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

Public Member Functions

 __construct (\DOMElement $xml=null)
 Initialize a SPSSODescriptor. More...
 
 toXML (\DOMElement $parent)
 Add this SPSSODescriptor 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

 $AuthnRequestsSigned = null
 
 $WantAssertionsSigned = null
 
 $AssertionConsumerService = array()
 
 $AttributeConsumingService = array()
 
- Data Fields inherited from SAML2\XML\md\SSODescriptorType
 $ArtifactResolutionService = array()
 
 $SingleLogoutService = array()
 
 $ManageNameIDService = 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\SSODescriptorType
 __construct ($elementName, \DOMElement $xml=null)
 Initialize a SSODescriptor. More...
 
 toXML (\DOMElement $parent)
 Add this SSODescriptorType to an EntityDescriptor. More...
 
- 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 12 of file SPSSODescriptor.php.

Constructor & Destructor Documentation

◆ __construct()

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

Initialize a SPSSODescriptor.

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

Definition at line 51 of file SPSSODescriptor.php.

References $xml, SAML2\Utils\parseBoolean(), and SAML2\Utils\xpQuery().

52  {
53  parent::__construct('md:SPSSODescriptor', $xml);
54 
55  if ($xml === null) {
56  return;
57  }
58 
59  $this->AuthnRequestsSigned = Utils::parseBoolean($xml, 'AuthnRequestsSigned', null);
60  $this->WantAssertionsSigned = Utils::parseBoolean($xml, 'WantAssertionsSigned', null);
61 
62  foreach (Utils::xpQuery($xml, './saml_metadata:AssertionConsumerService') as $ep) {
63  $this->AssertionConsumerService[] = new IndexedEndpointType($ep);
64  }
65 
66  foreach (Utils::xpQuery($xml, './saml_metadata:AttributeConsumingService') as $acs) {
67  $this->AttributeConsumingService[] = new AttributeConsumingService($acs);
68  }
69  }
$xml
Definition: metadata.php:240
static parseBoolean(\DOMElement $node, $attributeName, $default=null)
Parse a boolean attribute.
Definition: Utils.php:276
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\SPSSODescriptor::toXML ( \DOMElement  $parent)

Add this SPSSODescriptor to an EntityDescriptor.

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

Definition at line 77 of file SPSSODescriptor.php.

78  {
79  assert(is_null($this->AuthnRequestsSigned) || is_bool($this->AuthnRequestsSigned));
80  assert(is_null($this->WantAssertionsSigned) || is_bool($this->WantAssertionsSigned));
81  assert(is_array($this->AssertionConsumerService));
82  assert(is_array($this->AttributeConsumingService));
83 
84  $e = parent::toXML($parent);
85 
86  if ($this->AuthnRequestsSigned === true) {
87  $e->setAttribute('AuthnRequestsSigned', 'true');
88  } elseif ($this->AuthnRequestsSigned === false) {
89  $e->setAttribute('AuthnRequestsSigned', 'false');
90  }
91 
92  if ($this->WantAssertionsSigned === true) {
93  $e->setAttribute('WantAssertionsSigned', 'true');
94  } elseif ($this->WantAssertionsSigned === false) {
95  $e->setAttribute('WantAssertionsSigned', 'false');
96  }
97 
98  foreach ($this->AssertionConsumerService as $ep) {
99  $ep->toXML($e, 'md:AssertionConsumerService');
100  }
101 
102  foreach ($this->AttributeConsumingService as $acs) {
103  $acs->toXML($e);
104  }
105  }

Field Documentation

◆ $AssertionConsumerService

SAML2\XML\md\SPSSODescriptor::$AssertionConsumerService = array()

Definition at line 35 of file SPSSODescriptor.php.

◆ $AttributeConsumingService

SAML2\XML\md\SPSSODescriptor::$AttributeConsumingService = array()

Definition at line 44 of file SPSSODescriptor.php.

◆ $AuthnRequestsSigned

SAML2\XML\md\SPSSODescriptor::$AuthnRequestsSigned = null

Definition at line 19 of file SPSSODescriptor.php.

◆ $WantAssertionsSigned

SAML2\XML\md\SPSSODescriptor::$WantAssertionsSigned = null

Definition at line 26 of file SPSSODescriptor.php.


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