ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Base class for all SAML 2 messages. More...
Public Member Functions | |
addValidator ($function, $data) | |
Add a method for validating this message. More... | |
validate (XMLSecurityKey $key) | |
Validate this message against a public key. More... | |
getId () | |
Retrieve the identifier of this message. More... | |
setId ($id) | |
Set the identifier of this message. More... | |
getIssueInstant () | |
Retrieve the issue timestamp of this message. More... | |
setIssueInstant ($issueInstant) | |
Set the issue timestamp of this message. More... | |
getDestination () | |
Retrieve the destination of this message. More... | |
setDestination ($destination) | |
Set the destination of this message. More... | |
setConsent ($consent) | |
Set the given consent for this message. More... | |
getConsent () | |
Set the given consent for this message. More... | |
getIssuer () | |
Retrieve the issuer if this message. More... | |
setIssuer ($issuer) | |
Set the issuer of this message. More... | |
isMessageConstructedWithSignature () | |
Query whether or not the message contained a signature at the root level when the object was constructed. More... | |
getRelayState () | |
Retrieve the RelayState associated with this message. More... | |
setRelayState ($relayState) | |
Set the RelayState associated with this message. More... | |
toUnsignedXML () | |
Convert this message to an unsigned XML document. More... | |
toSignedXML () | |
Convert this message to a signed XML document. 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... | |
getExtensions () | |
Retrieve the Extensions. More... | |
setExtensions ($extensions) | |
Set the Extensions. More... | |
getSignatureMethod () | |
Static Public Member Functions | |
static | fromXML (\DOMElement $xml) |
Convert an XML element into a message. More... | |
Protected Member Functions | |
__construct ($tagName, \DOMElement $xml=null) | |
Initialize a message. More... | |
Protected Attributes | |
$extensions | |
$document | |
$messageContainedSignatureUponConstruction = false | |
Private Attributes | |
$tagName | |
$id | |
$issueInstant | |
$destination | |
$consent = Constants::CONSENT_UNSPECIFIED | |
$issuer | |
$relayState | |
$signatureKey | |
$certificates | |
$validators | |
$signatureMethod | |
Base class for all SAML 2 messages.
Implements what is common between the samlp:RequestAbstractType and samlp:StatusResponseType element types.
(PHPMD.ExcessiveClassComplexity)
Definition at line 18 of file Message.php.
|
protected |
Initialize a message.
This constructor takes an optional parameter with a . If this parameter is given, the message will be initialized with data from that XML element.
If no XML element is given, the message is initialized with suitable default values.
string | $tagName | The tag name of the root element |
\DOMElement | null | $xml | The input message |
Definition at line 136 of file Message.php.
References $issuer, $xml, and array.
SAML2\Message::addValidator | ( | $function, | |
$data | |||
) |
Add a method for validating this message.
This function is used by the HTTP-Redirect binding, to make it possible to check the signature against the one included in the query string.
callback | $function | The function which should be called |
mixed | $data | The data that should be included as the first parameter to the function |
Definition at line 225 of file Message.php.
References $data, $function, and array.
Referenced by SAML2\SOAPClient\addSSLValidator().
|
static |
Convert an XML element into a message.
\DOMElement | $xml | The root XML element |
Definition at line 562 of file Message.php.
SAML2\Message::getCertificates | ( | ) |
Retrieve the certificates that are included in the message.
Implements SAML2\SignedElement.
Definition at line 548 of file Message.php.
References $certificates.
SAML2\Message::getConsent | ( | ) |
Set the given consent for this message.
Most likely (though not required) a value of rn:oasis:names:tc:SAML:2.0:consent.
Definition at line 365 of file Message.php.
SAML2\Message::getDestination | ( | ) |
Retrieve the destination of this message.
Definition at line 323 of file Message.php.
References $destination.
Referenced by SAML2\SOAP\getOutputToSend(), SAML2\HTTPRedirect\getRedirectURL(), SAML2\HTTPArtifact\getRedirectURL(), SAML2\HTTPPost\send(), SAML2\SOAPClient\send(), and SAML2\Response\Validation\ConstraintValidator\DestinationMatches\validate().
SAML2\Message::getExtensions | ( | ) |
SAML2\Message::getId | ( | ) |
Retrieve the identifier of this message.
Definition at line 279 of file Message.php.
References $id.
Referenced by SAML2\Response\Processor\verifySignature().
SAML2\Message::getIssueInstant | ( | ) |
Retrieve the issue timestamp of this message.
Definition at line 301 of file Message.php.
SAML2\Message::getIssuer | ( | ) |
Retrieve the issuer if this message.
Definition at line 375 of file Message.php.
References $issuer.
Referenced by SAML2\HTTPArtifact\getRedirectURL(), and SAML2\SOAPClient\send().
SAML2\Message::getRelayState | ( | ) |
Retrieve the RelayState associated with this message.
Definition at line 411 of file Message.php.
References $relayState.
Referenced by SAML2\HTTPRedirect\getRedirectURL(), SAML2\HTTPArtifact\getRedirectURL(), and SAML2\HTTPPost\send().
SAML2\Message::getSignatureKey | ( | ) |
Retrieve the private key we should use to sign the message.
Implements SAML2\SignedElement.
Definition at line 514 of file Message.php.
Referenced by SAML2\HTTPRedirect\getRedirectURL().
SAML2\Message::getSignatureMethod | ( | ) |
SAML2\Message::isMessageConstructedWithSignature | ( | ) |
Query whether or not the message contained a signature at the root level when the object was constructed.
Definition at line 401 of file Message.php.
Referenced by SAML2\Response\Processor\verifySignature().
SAML2\Message::setCertificates | ( | array | $certificates | ) |
Set the certificates that should be included in the message.
The certificates should be strings with the PEM encoded data.
array | $certificates | An array of certificates |
Implements SAML2\SignedElement.
Definition at line 538 of file Message.php.
References $certificates.
SAML2\Message::setConsent | ( | $consent | ) |
Set the given consent for this message.
Most likely (though not required) a value of rn:oasis:names:tc:SAML:2.0:consent.
string | $consent |
Definition at line 349 of file Message.php.
SAML2\Message::setDestination | ( | $destination | ) |
Set the destination of this message.
string | null | $destination | The new destination of this message |
Definition at line 333 of file Message.php.
References $destination.
SAML2\Message::setExtensions | ( | $extensions | ) |
Set the Extensions.
array | null | $extensions | The Extensions |
Definition at line 603 of file Message.php.
SAML2\Message::setId | ( | $id | ) |
Set the identifier of this message.
string | $id | The new identifier of this message |
Definition at line 289 of file Message.php.
References $id.
SAML2\Message::setIssueInstant | ( | $issueInstant | ) |
Set the issue timestamp of this message.
int | $issueInstant | The new issue timestamp of this message, as an UNIX timestamp |
Definition at line 311 of file Message.php.
SAML2\Message::setIssuer | ( | $issuer | ) |
Set the issuer of this message.
string | \SAML2\XML\saml\Issuer | null | $issuer | The new issuer of this message |
Definition at line 389 of file Message.php.
References $issuer.
SAML2\Message::setRelayState | ( | $relayState | ) |
Set the RelayState associated with this message.
string | null | $relayState | The new RelayState |
Definition at line 421 of file Message.php.
References $relayState.
SAML2\Message::setSignatureKey | ( | XMLSecurityKey | $signatureKey = null | ) |
Set the private key we should use to sign the message.
If the key is null, the message will be sent unsigned.
XMLSecurityKey | null | $signatureKey |
Implements SAML2\SignedElement.
Definition at line 526 of file Message.php.
SAML2\Message::toSignedXML | ( | ) |
Convert this message to a signed XML document.
This method sign the resulting XML document if the private key for the signature is set.
Definition at line 481 of file Message.php.
Referenced by SAML2\SOAP\getOutputToSend(), SAML2\HTTPPost\send(), and SAML2\SOAPClient\send().
SAML2\Message::toUnsignedXML | ( | ) |
Convert this message to an unsigned XML document.
This method does not sign the resulting XML document.
Definition at line 435 of file Message.php.
Referenced by SAML2\HTTPRedirect\getRedirectURL(), and SAML2\HTTPArtifact\getRedirectURL().
SAML2\Message::validate | ( | XMLSecurityKey | $key | ) |
Validate this message against a public key.
true is returned on success, false is returned if we don't have any signature we can validate. An exception is thrown if the signature validation fails.
XMLSecurityKey | $key | The key we should check against |
Implements SAML2\SignedElement.
Definition at line 248 of file Message.php.
References $data, $exceptions, $function, and array.
Referenced by SAML2\HTTPArtifact\validateSignature().
|
private |
Definition at line 107 of file Message.php.
|
private |
Definition at line 62 of file Message.php.
|
private |
Definition at line 55 of file Message.php.
Referenced by SAML2\Response\Validation\ConstraintValidator\DestinationMatches\__construct(), and SAML2\Response\Validation\ConstraintValidator\DestinationMatches\validate().
|
protected |
Definition at line 86 of file Message.php.
|
protected |
Definition at line 25 of file Message.php.
|
private |
Definition at line 41 of file Message.php.
|
private |
Definition at line 48 of file Message.php.
|
private |
Definition at line 69 of file Message.php.
|
protected |
Definition at line 100 of file Message.php.
|
private |
Definition at line 76 of file Message.php.
|
private |
Definition at line 95 of file Message.php.
|
private |
Definition at line 119 of file Message.php.
|
private |
Definition at line 34 of file Message.php.
|
private |
Definition at line 114 of file Message.php.