1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the LightSAML-IDP 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\Idp\Builder\Action\Profile\SingleSignOn\Idp; |
13
|
|
|
|
14
|
|
|
use LightSaml\Idp\Action\Profile\Inbound\AuthnRequest\ACSUrlValidatorAction; |
15
|
|
|
use LightSaml\Action\Profile\Inbound\Message\DestinationValidatorAuthnRequestAction; |
16
|
|
|
use LightSaml\Action\Profile\Inbound\Message\EntityIdFromMessageIssuerAction; |
17
|
|
|
use LightSaml\Action\Profile\Inbound\Message\ResolvePartyEntityIdAction; |
18
|
|
|
use LightSaml\Action\Profile\Inbound\Message\MessageSignatureValidatorAction; |
19
|
|
|
use LightSaml\Action\Profile\Inbound\Message\ReceiveMessageAction; |
20
|
|
|
use LightSaml\Action\Profile\Inbound\Message\IssuerValidatorAction; |
21
|
|
|
use LightSaml\Action\Profile\Outbound\Message\ResolveEndpointSpAcsAction; |
22
|
|
|
use LightSaml\Builder\Action\Profile\AbstractProfileActionBuilder; |
23
|
|
|
use LightSaml\SamlConstants; |
24
|
|
|
|
25
|
|
|
class SsoIdpReceiveRequestActionBuilder extends AbstractProfileActionBuilder |
26
|
|
|
{ |
27
|
|
|
/** |
28
|
|
|
* @return void |
29
|
|
|
*/ |
30
|
|
|
protected function doInitialize() |
31
|
|
|
{ |
32
|
|
|
// Receive |
33
|
|
|
$this->add(new ReceiveMessageAction( |
34
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
35
|
|
|
$this->buildContainer->getServiceContainer()->getBindingFactory() |
36
|
|
|
), 100); |
37
|
|
|
|
38
|
|
|
// AuthnRequest validation |
39
|
|
|
$this->add(new EntityIdFromMessageIssuerAction( |
40
|
|
|
$this->buildContainer->getSystemContainer()->getLogger() |
41
|
|
|
), 200); |
42
|
|
|
$this->add(new ResolvePartyEntityIdAction( |
43
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
44
|
|
|
$this->buildContainer->getPartyContainer()->getSpEntityDescriptorStore(), |
45
|
|
|
$this->buildContainer->getPartyContainer()->getIdpEntityDescriptorStore(), |
46
|
|
|
$this->buildContainer->getPartyContainer()->getTrustOptionsStore() |
47
|
|
|
)); |
48
|
|
|
$this->add(new DestinationValidatorAuthnRequestAction( |
49
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
50
|
|
|
$this->buildContainer->getServiceContainer()->getEndpointResolver() |
51
|
|
|
)); |
52
|
|
|
$this->add(new IssuerValidatorAction( |
53
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
54
|
|
|
$this->buildContainer->getServiceContainer()->getNameIdValidator(), |
55
|
|
|
SamlConstants::NAME_ID_FORMAT_ENTITY |
56
|
|
|
)); |
57
|
|
|
$this->add(new ACSUrlValidatorAction( |
58
|
|
|
$this->buildContainer->getSystemContainer()->getLogger() |
59
|
|
|
)); |
60
|
|
|
$this->add(new MessageSignatureValidatorAction( |
61
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
62
|
|
|
$this->buildContainer->getServiceContainer()->getSignatureValidator() |
63
|
|
|
)); |
64
|
|
|
|
65
|
|
|
$this->add(new ResolveEndpointSpAcsAction( |
66
|
|
|
$this->buildContainer->getSystemContainer()->getLogger(), |
67
|
|
|
$this->buildContainer->getServiceContainer()->getEndpointResolver() |
68
|
|
|
), 300); |
69
|
|
|
} |
70
|
|
|
} |
71
|
|
|
|