ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
DestinationMatches.php
Go to the documentation of this file.
1
<?php
2
3
namespace
SAML2\Response\Validation\ConstraintValidator
;
4
5
use
SAML2\Configuration\Destination
;
6
use
SAML2\Response
;
7
use
SAML2\Response\Validation\ConstraintValidator
;
8
use
SAML2\Response\Validation\Result
;
9
10
class
DestinationMatches
implements
11
ConstraintValidator
12
{
16
private
$expectedDestination
;
17
18
public
function
__construct
(
Destination
$destination
)
19
{
20
$this->expectedDestination =
$destination
;
21
}
22
23
public
function
validate
(
Response
$response
,
Result
$result
)
24
{
25
$destination
= $response->
getDestination
();
26
if
(!$this->expectedDestination->equals(
new
Destination
(
$destination
))) {
27
$result->
addError
(sprintf(
28
'Destination in response "%s" does not match the expected destination "%s"'
,
29
$destination
,
30
$this->expectedDestination
31
));
32
}
33
}
34
}
SAML2\Response\Validation\Result
Simple Result object.
Definition:
Result.php:10
$result
$result
Definition:
CleanUpTest.php:463
SAML2\Response\Validation\ConstraintValidator
Definition:
ConstraintValidator.php:7
SAML2\Response\Validation\ConstraintValidator\DestinationMatches\validate
validate(Response $response, Result $result)
Definition:
DestinationMatches.php:23
SAML2\Response
SAML2\Message\$destination
$destination
Definition:
Message.php:55
SAML2\Response\Validation\Result\addError
addError($message)
Definition:
Result.php:20
SAML2\Response
Definition:
Response.php:10
SAML2\Response\Validation\ConstraintValidator\DestinationMatches\$expectedDestination
$expectedDestination
Definition:
DestinationMatches.php:16
Result
SAML2\Response\Validation\ConstraintValidator\DestinationMatches\__construct
__construct(Destination $destination)
Definition:
DestinationMatches.php:18
SAML2\Response\Validation\ConstraintValidator\DestinationMatches
Definition:
DestinationMatches.php:10
SAML2\Configuration\Destination
Value Object representing the current destination.
Definition:
Destination.php:10
SAML2\Message\getDestination
getDestination()
Retrieve the destination of this message.
Definition:
Message.php:323
Destination
$response
$response
Definition:
proxy_ylocal.php:39
SAML2\Response\Validation\ConstraintValidator
Definition:
DestinationMatches.php:3
libs
composer
vendor
simplesamlphp
saml2
src
SAML2
Response
Validation
ConstraintValidator
DestinationMatches.php
Generated on Sat Jan 18 2025 19:01:09 for ILIAS by
1.8.13 (using
Doxyfile
)