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

Public Member Functions

 getRedirectURL (Message $message)
 Create the redirect URL for a message. More...
 
 send (Message $message)
 Send a SAML 2 message using the HTTP-Redirect binding. More...
 
 setSPMetadata (SimpleSAML_Configuration $sp)
 
- Public Member Functions inherited from SAML2\Binding
 getDestination ()
 Retrieve the destination of a message. More...
 
 setDestination ($destination)
 Override the destination of a message. More...
 
 send (Message $message)
 Send a SAML 2 message. More...
 
 receive ()
 Receive a SAML 2 message. More...
 

Static Public Member Functions

static validateSignature (ArtifactResponse $message, XMLSecurityKey $key)
 A validator which returns true if the ArtifactResponse was signed with the given key. More...
 
- Static Public Member Functions inherited from SAML2\Binding
static getBinding ($urn)
 Retrieve a binding with the given URN. More...
 
static getCurrentBinding ()
 Guess the current binding. More...
 

Private Attributes

 $spMetadata
 

Additional Inherited Members

- Protected Attributes inherited from SAML2\Binding
 $destination
 The destination of messages. More...
 

Detailed Description

Definition at line 20 of file HTTPArtifact.php.

Member Function Documentation

◆ getRedirectURL()

SAML2\HTTPArtifact::getRedirectURL ( Message  $message)

Create the redirect URL for a message.

Parameters
\SAML2\Message$messageThe message.
Returns
string The URL the user should be redirected to in order to send a message.
Exceptions

Exception

Definition at line 34 of file HTTPArtifact.php.

35 {
36 $store = SimpleSAML_Store::getInstance();
37 if ($store === false) {
38 throw new \Exception('Unable to send artifact without a datastore configured.');
39 }
40
42 $artifact = base64_encode("\x00\x04\x00\x00" . sha1($message->getIssuer(), true) . $generatedId) ;
43 $artifactData = $message->toUnsignedXML();
44 $artifactDataString = $artifactData->ownerDocument->saveXML($artifactData);
45
46 $store->set('artifact', $artifact, $artifactDataString, Temporal::getTime() + 15*60);
47
48 $params = array(
49 'SAMLart' => $artifact,
50 );
51 $relayState = $message->getRelayState();
52 if ($relayState !== null) {
53 $params['RelayState'] = $relayState;
54 }
55
57 }
static getTime()
Getter for getting the current timestamp.
Definition: Temporal.php:13
static stringToHex($bytes)
Definition: Utilities.php:370
static addURLparameter($url, $parameters)
Definition: Utilities.php:99
static generateRandomBytes($length)
Definition: Utilities.php:359
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
Definition: getUserInfo.php:11
catch(Exception $e) $message
$relayState
$params
Definition: disable.php:11

References $artifact, $message, $params, $relayState, $store, SimpleSAML_Utilities\addURLparameter(), SimpleSAML_Utilities\generateRandomBytes(), getTime(), and SimpleSAML_Utilities\stringToHex().

+ Here is the call graph for this function:

◆ send()

SAML2\HTTPArtifact::send ( Message  $message)

Send a SAML 2 message using the HTTP-Redirect binding.

Note: This function never returns.

Parameters
\SAML2\Message$messageThe message we should send.

Reimplemented from SAML2\Binding.

Definition at line 66 of file HTTPArtifact.php.

67 {
70 }
$destination
The destination of messages.
Definition: Binding.php:17
getRedirectURL(Message $message)
Create the redirect URL for a message.
static getContainer()
Definition: Utils.php:752

References $destination, and $message.

◆ setSPMetadata()

SAML2\HTTPArtifact::setSPMetadata ( SimpleSAML_Configuration  $sp)
Parameters
\SimpleSAML_Configuration$sp

Definition at line 154 of file HTTPArtifact.php.

155 {
156 $this->spMetadata = $sp;
157 }

◆ validateSignature()

static SAML2\HTTPArtifact::validateSignature ( ArtifactResponse  $message,
XMLSecurityKey  $key 
)
static

A validator which returns true if the ArtifactResponse was signed with the given key.

Parameters
\SAML2\ArtifactResponse$message
XMLSecurityKey$key
Returns
bool

Definition at line 166 of file HTTPArtifact.php.

167 {
168 return $message->validate($key);
169 }
$key
Definition: croninfo.php:18

References $key, and $message.

Field Documentation

◆ $spMetadata

SAML2\HTTPArtifact::$spMetadata
private

Definition at line 25 of file HTTPArtifact.php.


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