1 | <?php |
||
23 | class ProxyStateHandler |
||
24 | { |
||
25 | private $sessionPath; |
||
26 | |||
27 | /** |
||
28 | * @var \Symfony\Component\HttpFoundation\Session\SessionInterface |
||
29 | */ |
||
30 | private $session; |
||
31 | |||
32 | /** |
||
33 | * @param SessionInterface $session |
||
34 | */ |
||
35 | public function __construct(SessionInterface $session, $sessionPath) |
||
40 | |||
41 | /** |
||
42 | * Clear the complete state, leaving other states intact. |
||
43 | */ |
||
44 | public function clear() |
||
54 | |||
55 | /** |
||
56 | * @param string $originalRequestId |
||
57 | * @return $this |
||
58 | */ |
||
59 | public function setRequestId($originalRequestId) |
||
65 | |||
66 | /** |
||
67 | * @return string|null |
||
68 | */ |
||
69 | public function getRequestId() |
||
73 | |||
74 | /** |
||
75 | * @param string $serviceProvider |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setRequestServiceProvider($serviceProvider) |
||
84 | |||
85 | /** |
||
86 | * @return string|null |
||
87 | */ |
||
88 | public function getRequestServiceProvider() |
||
92 | |||
93 | /** |
||
94 | * @param string $url |
||
95 | * @return $this |
||
96 | */ |
||
97 | public function setRequestAssertionConsumerServiceUrl($url) |
||
103 | |||
104 | /** |
||
105 | * @return string|null |
||
106 | */ |
||
107 | public function getRequestAssertionConsumerServiceUrl() |
||
111 | |||
112 | /** |
||
113 | * @param string $relayState |
||
114 | * @return $this |
||
115 | */ |
||
116 | public function setRelayState($relayState) |
||
122 | |||
123 | /** |
||
124 | * @return string|null |
||
125 | */ |
||
126 | public function getRelayState() |
||
130 | |||
131 | /** |
||
132 | * @param string $loaIdentifier |
||
133 | * @return $this |
||
134 | */ |
||
135 | public function setRequiredLoaIdentifier($loaIdentifier) |
||
141 | |||
142 | /** |
||
143 | * @return string|null |
||
144 | */ |
||
145 | public function getRequiredLoaIdentifier() |
||
149 | |||
150 | /** |
||
151 | * @param string $requestId |
||
152 | * @return $this |
||
153 | */ |
||
154 | public function setGatewayRequestId($requestId) |
||
160 | |||
161 | /** |
||
162 | * @return string|null |
||
163 | */ |
||
164 | public function getGatewayRequestId() |
||
168 | |||
169 | /** |
||
170 | * @param string $assertionAsXmlString |
||
171 | * @return $this |
||
172 | */ |
||
173 | public function saveAssertion($assertionAsXmlString) |
||
179 | |||
180 | /** |
||
181 | * @return null|string |
||
182 | */ |
||
183 | public function getAssertion() |
||
187 | |||
188 | /** |
||
189 | * @param $nameId |
||
190 | * @return $this |
||
191 | */ |
||
192 | public function saveIdentityNameId($nameId) |
||
198 | |||
199 | /** |
||
200 | * @return null|string |
||
201 | */ |
||
202 | public function getIdentityNameId() |
||
206 | |||
207 | /** |
||
208 | * @param string $idpEntityId |
||
209 | * @return $this |
||
210 | */ |
||
211 | public function setAuthenticatingIdp($idpEntityId) |
||
217 | |||
218 | /** |
||
219 | * @return null|string |
||
220 | */ |
||
221 | public function getAuthenticatingIdp() |
||
225 | |||
226 | /** |
||
227 | * @param string|null $secondFactorId |
||
228 | * @return $this |
||
229 | */ |
||
230 | public function setSelectedSecondFactorId($secondFactorId) |
||
236 | |||
237 | /** |
||
238 | * @return null|string |
||
239 | */ |
||
240 | public function getSelectedSecondFactorId() |
||
244 | |||
245 | /** |
||
246 | * @param bool $verified |
||
247 | * @return $this |
||
248 | */ |
||
249 | public function setSecondFactorVerified($verified) |
||
255 | |||
256 | /** |
||
257 | * @return bool |
||
258 | */ |
||
259 | public function isSecondFactorVerified() |
||
263 | |||
264 | /** |
||
265 | * @param string $controllerName |
||
266 | * @return $this |
||
267 | */ |
||
268 | public function setResponseAction($controllerName) |
||
273 | /** |
||
274 | * @return string|null |
||
275 | */ |
||
276 | public function getResponseAction() |
||
280 | /** |
||
281 | * @param string $serviceId |
||
282 | * @return $this |
||
283 | */ |
||
284 | public function setResponseContextServiceId($serviceId) |
||
289 | |||
290 | /** |
||
291 | * @return string|null |
||
292 | */ |
||
293 | public function getResponseContextServiceId() |
||
297 | |||
298 | /** |
||
299 | * @param $organization |
||
300 | * @return $this |
||
301 | */ |
||
302 | public function setSchacHomeOrganization($organization) |
||
307 | |||
308 | /** |
||
309 | * @return string|null |
||
310 | */ |
||
311 | public function getSchacHomeOrganization() |
||
315 | |||
316 | /** |
||
317 | * @param string $locale |
||
318 | * @return $this |
||
319 | */ |
||
320 | public function setPreferredLocale($locale) |
||
325 | |||
326 | /** |
||
327 | * @return string|null |
||
328 | */ |
||
329 | public function getPreferredLocale() |
||
333 | |||
334 | /** |
||
335 | * note that the authentication mode is stored outside the session path, to enable other state handlers |
||
336 | * to retrieve the Authentication state for a given authentication request id. |
||
337 | * |
||
338 | * @param $requestId |
||
339 | * @param $authenticationMode |
||
340 | */ |
||
341 | public function markAuthenticationModeForRequest($requestId, $authenticationMode) |
||
345 | |||
346 | public function getAuthenticationModeForRequestId($requestId) |
||
350 | |||
351 | /** |
||
352 | * @param string $key |
||
353 | * @param mixed $value Any scalar |
||
354 | */ |
||
355 | protected function set($key, $value) |
||
359 | |||
360 | /** |
||
361 | * @param string $key |
||
362 | * @return mixed|null Any scalar |
||
363 | */ |
||
364 | protected function get($key) |
||
368 | } |
||
369 |