|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the LightSAML-Logout package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Milos Tomic <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* This source file is subject to the GPL-3 license that is bundled |
|
9
|
|
|
* with this source code in the file LICENSE. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace LightSaml\Logout\Builder\Action\Profile\SingleLogout; |
|
13
|
|
|
|
|
14
|
|
|
use LightSaml\Action\Profile\FlushRequestStatesAction; |
|
15
|
|
|
use LightSaml\Action\Profile\Inbound\Message\EntityIdFromMessageIssuerAction; |
|
16
|
|
|
use LightSaml\Action\Profile\Inbound\Message\IssuerValidatorAction; |
|
17
|
|
|
use LightSaml\Action\Profile\Inbound\Message\MessageSignatureValidatorAction; |
|
18
|
|
|
use LightSaml\Action\Profile\Inbound\Message\ReceiveMessageAction; |
|
19
|
|
|
use LightSaml\Action\Profile\Inbound\Message\ResolvePartyEntityIdAction; |
|
20
|
|
|
use LightSaml\Action\Profile\Inbound\StatusResponse\InResponseToValidatorAction; |
|
21
|
|
|
use LightSaml\Action\Profile\Inbound\StatusResponse\StatusAction; |
|
22
|
|
|
use LightSaml\Builder\Action\Profile\AbstractProfileActionBuilder; |
|
23
|
|
|
use LightSaml\Logout\Action\Profile\Inbound\LogoutResponse\RemoveSsoSessionFromStoreAction; |
|
24
|
|
|
use LightSaml\SamlConstants; |
|
25
|
|
|
|
|
26
|
|
|
class SloResponseActionBuilder extends AbstractProfileActionBuilder |
|
27
|
|
|
{ |
|
28
|
|
|
protected function doInitialize() |
|
29
|
|
|
{ |
|
30
|
|
|
$this->add(new ReceiveMessageAction( |
|
31
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
|
32
|
|
|
$this->buildContainer->getServiceContainer()->getBindingFactory() |
|
33
|
|
|
), 100); |
|
34
|
|
|
|
|
35
|
|
|
// Response validation |
|
36
|
|
|
$this->add(new IssuerValidatorAction( |
|
37
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
|
38
|
|
|
$this->buildContainer->getServiceContainer()->getNameIdValidator(), |
|
39
|
|
|
SamlConstants::NAME_ID_FORMAT_ENTITY |
|
40
|
|
|
), 200); |
|
41
|
|
|
$this->add(new EntityIdFromMessageIssuerAction( |
|
42
|
|
|
$this->buildContainer->getSystemContainer()->getLogger() |
|
43
|
|
|
)); |
|
44
|
|
|
$this->add(new ResolvePartyEntityIdAction( |
|
45
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
|
46
|
|
|
$this->buildContainer->getPartyContainer()->getSpEntityDescriptorStore(), |
|
47
|
|
|
$this->buildContainer->getPartyContainer()->getIdpEntityDescriptorStore(), |
|
48
|
|
|
$this->buildContainer->getPartyContainer()->getTrustOptionsStore() |
|
49
|
|
|
)); |
|
50
|
|
|
$this->add(new InResponseToValidatorAction( |
|
51
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
|
52
|
|
|
$this->buildContainer->getStoreContainer()->getRequestStateStore() |
|
53
|
|
|
)); |
|
54
|
|
|
$this->add(new StatusAction( |
|
55
|
|
|
$this->buildContainer->getSystemContainer()->getLogger() |
|
56
|
|
|
)); |
|
57
|
|
|
$this->add(new MessageSignatureValidatorAction( |
|
58
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
|
59
|
|
|
$this->buildContainer->getServiceContainer()->getSignatureValidator() |
|
60
|
|
|
)); |
|
61
|
|
|
$this->add(new RemoveSsoSessionFromStoreAction( |
|
62
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
|
63
|
|
|
$this->buildContainer->getStoreContainer()->getRequestStateStore(), |
|
64
|
|
|
$this->buildContainer->getServiceContainer()->getLogoutSessionResolver() |
|
65
|
|
|
)); |
|
66
|
|
|
$this->add(new FlushRequestStatesAction( |
|
67
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
|
68
|
|
|
$this->buildContainer->getStoreContainer()->getRequestStateStore() |
|
69
|
|
|
)); |
|
70
|
|
|
} |
|
71
|
|
|
} |
|
72
|
|
|
|