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 $relayState |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function setRelayState($relayState) |
||
102 | |||
103 | /** |
||
104 | * @return string|null |
||
105 | */ |
||
106 | public function getRelayState() |
||
110 | |||
111 | /** |
||
112 | * @param string $loaIdentifier |
||
113 | * @return $this |
||
114 | */ |
||
115 | public function setRequiredLoaIdentifier($loaIdentifier) |
||
121 | |||
122 | /** |
||
123 | * @return string|null |
||
124 | */ |
||
125 | public function getRequiredLoaIdentifier() |
||
129 | |||
130 | /** |
||
131 | * @param string $requestId |
||
132 | * @return $this |
||
133 | */ |
||
134 | public function setGatewayRequestId($requestId) |
||
140 | |||
141 | /** |
||
142 | * @return string|null |
||
143 | */ |
||
144 | public function getGatewayRequestId() |
||
148 | |||
149 | /** |
||
150 | * @param string $assertionAsXmlString |
||
151 | * @return $this |
||
152 | */ |
||
153 | public function saveAssertion($assertionAsXmlString) |
||
159 | |||
160 | /** |
||
161 | * @return null|string |
||
162 | */ |
||
163 | public function getAssertion() |
||
167 | |||
168 | /** |
||
169 | * @param $nameId |
||
170 | * @return $this |
||
171 | */ |
||
172 | public function saveIdentityNameId($nameId) |
||
178 | |||
179 | /** |
||
180 | * @return null|string |
||
181 | */ |
||
182 | public function getIdentityNameId() |
||
186 | |||
187 | /** |
||
188 | * @param string $idpEntityId |
||
189 | * @return $this |
||
190 | */ |
||
191 | public function setAuthenticatingIdp($idpEntityId) |
||
197 | |||
198 | /** |
||
199 | * @return null|string |
||
200 | */ |
||
201 | public function getAuthenticatingIdp() |
||
205 | |||
206 | /** |
||
207 | * @param string|null $secondFactorId |
||
208 | * @return $this |
||
209 | */ |
||
210 | public function setSelectedSecondFactorId($secondFactorId) |
||
216 | |||
217 | /** |
||
218 | * @return null|string |
||
219 | */ |
||
220 | public function getSelectedSecondFactorId() |
||
224 | |||
225 | /** |
||
226 | * @param bool $verified |
||
227 | * @return $this |
||
228 | */ |
||
229 | public function setSecondFactorVerified($verified) |
||
235 | |||
236 | /** |
||
237 | * @return bool |
||
238 | */ |
||
239 | public function isSecondFactorVerified() |
||
243 | |||
244 | /** |
||
245 | * @param string $controllerName |
||
246 | * @return $this |
||
247 | */ |
||
248 | public function setResponseAction($controllerName) |
||
253 | /** |
||
254 | * @return string|null |
||
255 | */ |
||
256 | public function getResponseAction() |
||
260 | /** |
||
261 | * @param string $serviceId |
||
262 | * @return $this |
||
263 | */ |
||
264 | public function setResponseContextServiceId($serviceId) |
||
269 | |||
270 | /** |
||
271 | * @return string|null |
||
272 | */ |
||
273 | public function getResponseContextServiceId() |
||
277 | |||
278 | /** |
||
279 | * @param $organization |
||
280 | * @return $this |
||
281 | */ |
||
282 | public function setSchacHomeOrganization($organization) |
||
287 | |||
288 | /** |
||
289 | * @return string|null |
||
290 | */ |
||
291 | public function getSchacHomeOrganization() |
||
295 | |||
296 | /** |
||
297 | * @param string $locale |
||
298 | * @return $this |
||
299 | */ |
||
300 | public function setPreferredLocale($locale) |
||
305 | |||
306 | /** |
||
307 | * @return string|null |
||
308 | */ |
||
309 | public function getPreferredLocale() |
||
313 | |||
314 | /** |
||
315 | * @param string $key |
||
316 | * @param mixed $value Any scalar |
||
317 | */ |
||
318 | protected function set($key, $value) |
||
322 | |||
323 | /** |
||
324 | * @param string $key |
||
325 | * @return mixed|null Any scalar |
||
326 | */ |
||
327 | protected function get($key) |
||
331 | } |
||
332 |