1 | <?php |
||
23 | class ProxyStateHandler |
||
24 | { |
||
25 | const SESSION_PATH = 'surfnet/gateway/request'; |
||
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) |
||
39 | |||
40 | /** |
||
41 | * Clear the complete state, leaving other states intact. |
||
42 | */ |
||
43 | public function clear() |
||
53 | |||
54 | /** |
||
55 | * @param string $originalRequestId |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setRequestId($originalRequestId) |
||
64 | |||
65 | /** |
||
66 | * @return string|null |
||
67 | */ |
||
68 | public function getRequestId() |
||
72 | |||
73 | /** |
||
74 | * @param string $serviceProvider |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function setRequestServiceProvider($serviceProvider) |
||
83 | |||
84 | /** |
||
85 | * @return string|null |
||
86 | */ |
||
87 | public function getRequestServiceProvider() |
||
91 | |||
92 | /** |
||
93 | * @param string $url |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function setRequestAssertionConsumerServiceUrl($url) |
||
102 | |||
103 | /** |
||
104 | * WIP |
||
105 | * |
||
106 | * @return string|null |
||
107 | */ |
||
108 | public function getRequestAssertionConsumerServiceUrl() |
||
112 | |||
113 | /** |
||
114 | * @param string $relayState |
||
115 | * @return $this |
||
116 | */ |
||
117 | public function setRelayState($relayState) |
||
123 | |||
124 | /** |
||
125 | * @return string|null |
||
126 | */ |
||
127 | public function getRelayState() |
||
131 | |||
132 | /** |
||
133 | * @param string $loaIdentifier |
||
134 | * @return $this |
||
135 | */ |
||
136 | public function setRequiredLoaIdentifier($loaIdentifier) |
||
142 | |||
143 | /** |
||
144 | * @return string|null |
||
145 | */ |
||
146 | public function getRequiredLoaIdentifier() |
||
150 | |||
151 | /** |
||
152 | * @param string $requestId |
||
153 | * @return $this |
||
154 | */ |
||
155 | public function setGatewayRequestId($requestId) |
||
161 | |||
162 | /** |
||
163 | * @return string|null |
||
164 | */ |
||
165 | public function getGatewayRequestId() |
||
169 | |||
170 | /** |
||
171 | * @param string $assertionAsXmlString |
||
172 | * @return $this |
||
173 | */ |
||
174 | public function saveAssertion($assertionAsXmlString) |
||
180 | |||
181 | /** |
||
182 | * @return null|string |
||
183 | */ |
||
184 | public function getAssertion() |
||
188 | |||
189 | /** |
||
190 | * @param $nameId |
||
191 | * @return $this |
||
192 | */ |
||
193 | public function saveIdentityNameId($nameId) |
||
199 | |||
200 | /** |
||
201 | * @return null|string |
||
202 | */ |
||
203 | public function getIdentityNameId() |
||
207 | |||
208 | /** |
||
209 | * @param string $idpEntityId |
||
210 | * @return $this |
||
211 | */ |
||
212 | public function setAuthenticatingIdp($idpEntityId) |
||
218 | |||
219 | /** |
||
220 | * @return null|string |
||
221 | */ |
||
222 | public function getAuthenticatingIdp() |
||
226 | |||
227 | /** |
||
228 | * @param string|null $secondFactorId |
||
229 | * @return $this |
||
230 | */ |
||
231 | public function setSelectedSecondFactorId($secondFactorId) |
||
237 | |||
238 | /** |
||
239 | * @return null|string |
||
240 | */ |
||
241 | public function getSelectedSecondFactorId() |
||
245 | |||
246 | /** |
||
247 | * @param bool $verified |
||
248 | * @return $this |
||
249 | */ |
||
250 | public function setSecondFactorVerified($verified) |
||
256 | |||
257 | /** |
||
258 | * @return bool |
||
259 | */ |
||
260 | public function isSecondFactorVerified() |
||
264 | |||
265 | /** |
||
266 | * @param string $controllerName |
||
267 | * @return $this |
||
268 | */ |
||
269 | public function setResponseAction($controllerName) |
||
274 | /** |
||
275 | * @return string|null |
||
276 | */ |
||
277 | public function getResponseAction() |
||
281 | /** |
||
282 | * @param string $serviceId |
||
283 | * @return $this |
||
284 | */ |
||
285 | public function setResponseContextServiceId($serviceId) |
||
290 | |||
291 | /** |
||
292 | * @return string|null |
||
293 | */ |
||
294 | public function getResponseContextServiceId() |
||
298 | |||
299 | /** |
||
300 | * @param $organization |
||
301 | * @return $this |
||
302 | */ |
||
303 | public function setSchacHomeOrganization($organization) |
||
308 | |||
309 | /** |
||
310 | * @return string|null |
||
311 | */ |
||
312 | public function getSchacHomeOrganization() |
||
316 | |||
317 | /** |
||
318 | * @param string $locale |
||
319 | * @return $this |
||
320 | */ |
||
321 | public function setPreferredLocale($locale) |
||
326 | |||
327 | /** |
||
328 | * @return string|null |
||
329 | */ |
||
330 | public function getPreferredLocale() |
||
334 | |||
335 | /** |
||
336 | * @param string $key |
||
337 | * @param mixed $value Any scalar |
||
338 | */ |
||
339 | protected function set($key, $value) |
||
343 | |||
344 | /** |
||
345 | * @param string $key |
||
346 | * @return mixed|null Any scalar |
||
347 | */ |
||
348 | protected function get($key) |
||
352 | } |
||
353 |