ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
SubjectConfirmationResponseToMatches.php
Go to the documentation of this file.
1
<?php
2
3
namespace
SAML2\Assertion\Validation\ConstraintValidator
;
4
5
use
SAML2\Assertion\Validation\Result
;
6
use
SAML2\Assertion\Validation\SubjectConfirmationConstraintValidator
;
7
use
SAML2\Response
;
8
use
SAML2\XML\saml\SubjectConfirmation
;
9
10
class
SubjectConfirmationResponseToMatches
implements
11
SubjectConfirmationConstraintValidator
12
{
13
private
$response
;
14
15
public
function
__construct
(
Response
$response
)
16
{
17
$this->response =
$response
;
18
}
19
20
public
function
validate
(
21
SubjectConfirmation
$subjectConfirmation,
22
Result
$result
23
) {
24
$inResponseTo = $subjectConfirmation->SubjectConfirmationData->InResponseTo;
25
if
($inResponseTo && $this->
getInResponseTo
() && $this->
getInResponseTo
() !== $inResponseTo) {
26
$result->
addError
(sprintf(
27
'InResponseTo in SubjectConfirmationData ("%s") does not match the Response InResponseTo ("%s")'
,
28
$inResponseTo,
29
$this->
getInResponseTo
()
30
));
31
}
32
}
33
34
private
function
getInResponseTo
()
35
{
36
$inResponseTo = $this->response->getInResponseTo();
37
if
($inResponseTo === null) {
38
return
false
;
39
}
40
41
return
$inResponseTo;
42
}
43
}
SAML2\XML\saml\SubjectConfirmation
Definition:
SubjectConfirmation.php:13
$result
$result
Definition:
CleanUpTest.php:463
SAML2\Assertion\Validation\ConstraintValidator\SubjectConfirmationResponseToMatches\validate
validate(SubjectConfirmation $subjectConfirmation, Result $result)
Definition:
SubjectConfirmationResponseToMatches.php:20
SubjectConfirmationConstraintValidator
SAML2\Assertion\Validation\ConstraintValidator\SubjectConfirmationResponseToMatches\$response
$response
Definition:
SubjectConfirmationResponseToMatches.php:13
Result
SAML2\Assertion\Validation\ConstraintValidator\SubjectConfirmationResponseToMatches\__construct
__construct(Response $response)
Definition:
SubjectConfirmationResponseToMatches.php:15
SAML2\Response
SubjectConfirmation
SAML2\Assertion\Validation\Result
Simple Result object.
Definition:
Result.php:10
SAML2\Assertion\Validation\Result\addError
addError($message)
Definition:
Result.php:20
SAML2\Assertion\Validation\ConstraintValidator
Definition:
NotBefore.php:3
SAML2\Assertion\Validation\SubjectConfirmationConstraintValidator
Definition:
SubjectConfirmationConstraintValidator.php:7
SAML2\Response
Definition:
Response.php:10
SAML2\Assertion\Validation\ConstraintValidator\SubjectConfirmationResponseToMatches
Definition:
SubjectConfirmationResponseToMatches.php:10
SAML2\Assertion\Validation\ConstraintValidator\SubjectConfirmationResponseToMatches\getInResponseTo
getInResponseTo()
Definition:
SubjectConfirmationResponseToMatches.php:34
libs
composer
vendor
simplesamlphp
saml2
src
SAML2
Assertion
Validation
ConstraintValidator
SubjectConfirmationResponseToMatches.php
Generated on Sat Jan 18 2025 19:01:09 for ILIAS by
1.8.13 (using
Doxyfile
)