File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -183,16 +183,18 @@ public function authenticate(array &$state): void
183183 * This function resumes the authentication process after the user has
184184 * entered his or her credentials.
185185 *
186+ * @param \Symfony\Component\HttpFoundation\Request $request
187+ *
186188 * @throws \SimpleSAML\Error\BadRequest
187189 * @throws \SimpleSAML\Error\Exception
188190 */
189- public static function resume (): void
191+ public static function resume (Request $ request ): void
190192 {
191193 /*
192194 * First we need to restore the $state-array. We should have the identifier for
193195 * it in the 'State' request parameter.
194196 */
195- if (!isset ( $ _REQUEST [ 'State ' ] )) {
197+ if (!$ request -> has ( 'State ' )) {
196198 throw new Error \BadRequest ('Missing "State" parameter. ' );
197199 }
198200
@@ -201,7 +203,7 @@ public static function resume(): void
201203 * match the string we used in the saveState-call above.
202204 */
203205 /** @var array $state */
204- $ state = Auth \State::loadState ($ _REQUEST [ 'State ' ] , 'exampleauth:External ' );
206+ $ state = Auth \State::loadState ($ request -> get ( 'State ' ) , 'exampleauth:External ' );
205207
206208 /*
207209 * Now we have the $state-array, and can use it to locate the authentication
Original file line number Diff line number Diff line change @@ -200,15 +200,14 @@ public function redirect(Request $request): RunnableResponse
200200 *
201201 * @return \SimpleSAML\HTTP\RunnableResponse
202202 */
203- public function resume (/** @scrutinizer ignore-unused */ Request $ request ): RunnableResponse
203+ public function resume (Request $ request ): RunnableResponse
204204 {
205205 /**
206206 * This page serves as the point where the user's authentication
207207 * process is resumed after the login page.
208208 *
209209 * It simply passes control back to the class.
210210 */
211-
212- return new RunnableResponse ([External::class, 'resume ' ], []);
211+ return new RunnableResponse ([External::class, 'resume ' ], [$ request ]);
213212 }
214213}
You can’t perform that action at this time.
0 commit comments