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 | * @param string $originalRequestId |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function setRequestId($originalRequestId) |
||
50 | |||
51 | /** |
||
52 | * @return string|null |
||
53 | */ |
||
54 | public function getRequestId() |
||
58 | |||
59 | /** |
||
60 | * @param string $serviceProvider |
||
61 | * @return $this |
||
62 | */ |
||
63 | public function setRequestServiceProvider($serviceProvider) |
||
69 | |||
70 | /** |
||
71 | * @return string|null |
||
72 | */ |
||
73 | public function getRequestServiceProvider() |
||
77 | |||
78 | /** |
||
79 | * @param string $relayState |
||
80 | * @return $this |
||
81 | */ |
||
82 | public function setRelayState($relayState) |
||
88 | |||
89 | /** |
||
90 | * @return string|null |
||
91 | */ |
||
92 | public function getRelayState() |
||
96 | |||
97 | /** |
||
98 | * @param string $loaIdentifier |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function setRequiredLoaIdentifier($loaIdentifier) |
||
102 | { |
||
103 | $this->set('loa_identifier', $loaIdentifier); |
||
104 | |||
105 | return $this; |
||
106 | } |
||
107 | |||
108 | /** |
||
109 | * @return string|null |
||
110 | */ |
||
111 | public function getRequiredLoaIdentifier() |
||
112 | { |
||
113 | return $this->get('loa_identifier'); |
||
114 | } |
||
115 | |||
116 | /** |
||
117 | * @param string $requestId |
||
118 | * @return $this |
||
119 | */ |
||
120 | public function setGatewayRequestId($requestId) |
||
126 | |||
127 | /** |
||
128 | * @return string|null |
||
129 | */ |
||
130 | public function getGatewayRequestId() |
||
134 | |||
135 | /** |
||
136 | * @param string $assertionAsXmlString |
||
137 | * @return $this |
||
138 | */ |
||
139 | public function saveAssertion($assertionAsXmlString) |
||
145 | |||
146 | /** |
||
147 | * @return null|string |
||
148 | */ |
||
149 | public function getAssertion() |
||
153 | |||
154 | /** |
||
155 | * @param $nameId |
||
156 | * @return $this |
||
157 | */ |
||
158 | public function saveIdentityNameId($nameId) |
||
164 | |||
165 | /** |
||
166 | * @return null|string |
||
167 | */ |
||
168 | public function getIdentityNameId() |
||
172 | |||
173 | /** |
||
174 | * @param string $idpEntityId |
||
175 | * @return $this |
||
176 | */ |
||
177 | public function setAuthenticatingIdp($idpEntityId) |
||
183 | |||
184 | /** |
||
185 | * @return null|string |
||
186 | */ |
||
187 | public function getAuthenticatingIdp() |
||
191 | |||
192 | /** |
||
193 | * @param string|null $secondFactorId |
||
194 | * @return $this |
||
195 | */ |
||
196 | public function setSelectedSecondFactorId($secondFactorId) |
||
202 | |||
203 | /** |
||
204 | * @return null|string |
||
205 | */ |
||
206 | public function getSelectedSecondFactorId() |
||
210 | |||
211 | /** |
||
212 | * @param bool $verified |
||
213 | * @return $this |
||
214 | */ |
||
215 | public function setSecondFactorVerified($verified) |
||
221 | |||
222 | /** |
||
223 | * @return bool |
||
224 | */ |
||
225 | public function isSecondFactorVerified() |
||
229 | |||
230 | /** |
||
231 | * @param string $controllerName |
||
232 | * @return $this |
||
233 | */ |
||
234 | public function setResponseAction($controllerName) |
||
239 | /** |
||
240 | * @return string|null |
||
241 | */ |
||
242 | public function getResponseAction() |
||
246 | /** |
||
247 | * @param string $serviceId |
||
248 | * @return $this |
||
249 | */ |
||
250 | public function setResponseContextServiceId($serviceId) |
||
255 | /** |
||
256 | * @return string|null |
||
257 | */ |
||
258 | public function getResponseContextServiceId() |
||
262 | |||
263 | /** |
||
264 | * @param string $locale |
||
265 | * @return $this |
||
266 | */ |
||
267 | public function setPreferredLocale($locale) |
||
272 | |||
273 | /** |
||
274 | * @return string|null |
||
275 | */ |
||
276 | public function getPreferredLocale() |
||
280 | |||
281 | /** |
||
282 | * @param string $key |
||
283 | * @param mixed $value Any scalar |
||
284 | */ |
||
285 | protected function set($key, $value) |
||
289 | |||
290 | /** |
||
291 | * @param string $key |
||
292 | * @return mixed|null Any scalar |
||
293 | */ |
||
294 | protected function get($key) |
||
298 | } |
||
299 |