1 | <?php |
||
13 | class AuthenticationContext |
||
14 | { |
||
15 | const CTX_TARGET_PATH = '_target_path'; |
||
16 | const CTX_FAILURE_PATH = '_failure_path'; |
||
17 | |||
18 | /** |
||
19 | * Firewall options. |
||
20 | * |
||
21 | * @var ParameterBag |
||
22 | */ |
||
23 | private $options; |
||
24 | |||
25 | /** |
||
26 | * Options with a highest priority of firewall options. |
||
27 | * |
||
28 | * @var ParameterBag |
||
29 | */ |
||
30 | private $context; |
||
31 | |||
32 | /** |
||
33 | * Options to be proxied to IdP. |
||
34 | * |
||
35 | * @var ParameterBag |
||
36 | */ |
||
37 | private $extra; |
||
38 | |||
39 | /** |
||
40 | * Options to be proxied to IdP and come back to SP. |
||
41 | * |
||
42 | * @var ParameterBag |
||
43 | */ |
||
44 | private $proxy; |
||
45 | |||
46 | /** |
||
47 | * @param ParameterBag $options |
||
48 | */ |
||
49 | public function __construct(ParameterBag $options) |
||
56 | |||
57 | /** |
||
58 | * @param string $name |
||
59 | * @param string $value |
||
60 | * @param bool $proxy |
||
61 | */ |
||
62 | public function setServiceExtra($name, $value, $proxy = false) |
||
70 | |||
71 | /** |
||
72 | * @param string $name |
||
73 | * @param string $value |
||
74 | */ |
||
75 | public function setContext($name, $value) |
||
79 | |||
80 | /** |
||
81 | * @return string|null |
||
82 | */ |
||
83 | public function getService() |
||
87 | |||
88 | /** |
||
89 | * @return ParameterBag |
||
90 | */ |
||
91 | public function getServiceExtra() |
||
95 | |||
96 | /** |
||
97 | * @return ParameterBag |
||
98 | */ |
||
99 | public function getServiceProxy() |
||
103 | |||
104 | /** |
||
105 | * @return ParameterBag |
||
106 | */ |
||
107 | public function getOptions() |
||
111 | |||
112 | /** |
||
113 | * @param Request $request |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getTargetPath(Request $request) |
||
142 | |||
143 | /** |
||
144 | * @param Request $request |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getFailurePath(Request $request) |
||
165 | |||
166 | /** |
||
167 | * @param Request $request |
||
168 | * |
||
169 | * @return string |
||
170 | */ |
||
171 | public function getOtpValidationPath(Request $request) |
||
183 | } |
||
184 |