diff --git a/modules/exampleauth/lib/Auth/Source/External.php b/modules/exampleauth/lib/Auth/Source/External.php
index 5d703b8439c20b6d971d18222ae75768fa789aef..82216fdab76960bb00e99c93a10e01d588bc3c9a 100644
--- a/modules/exampleauth/lib/Auth/Source/External.php
+++ b/modules/exampleauth/lib/Auth/Source/External.php
@@ -183,16 +183,18 @@ class External extends Auth\Source
      * This function resumes the authentication process after the user has
      * entered his or her credentials.
      *
+     * @param \Symfony\Component\HttpFoundation\Request $request
+     *
      * @throws \SimpleSAML\Error\BadRequest
      * @throws \SimpleSAML\Error\Exception
      */
-    public static function resume(): void
+    public static function resume(Request $request): void
     {
         /*
          * First we need to restore the $state-array. We should have the identifier for
          * it in the 'State' request parameter.
          */
-        if (!isset($_REQUEST['State'])) {
+        if (!$request->has('State')) {
             throw new Error\BadRequest('Missing "State" parameter.');
         }
 
@@ -201,7 +203,7 @@ class External extends Auth\Source
          * match the string we used in the saveState-call above.
          */
         /** @var array $state */
-        $state = Auth\State::loadState($_REQUEST['State'], 'exampleauth:External');
+        $state = Auth\State::loadState($request->get('State'), 'exampleauth:External');
 
         /*
          * Now we have the $state-array, and can use it to locate the authentication
diff --git a/modules/exampleauth/lib/Controller/ExampleAuth.php b/modules/exampleauth/lib/Controller/ExampleAuth.php
index ada3e653bb301fa794e2968aa0dc4992f5ce96b4..bcbee53b2f62197adc686e85fd7b7420413ef86c 100644
--- a/modules/exampleauth/lib/Controller/ExampleAuth.php
+++ b/modules/exampleauth/lib/Controller/ExampleAuth.php
@@ -200,7 +200,7 @@ class ExampleAuth
      *
      * @return \SimpleSAML\HTTP\RunnableResponse
      */
-    public function resume(/** @scrutinizer ignore-unused */ Request $request): RunnableResponse
+    public function resume(Request $request): RunnableResponse
     {
         /**
          * This page serves as the point where the user's authentication
@@ -208,7 +208,6 @@ class ExampleAuth
          *
          * It simply passes control back to the class.
          */
-
-        return new RunnableResponse([External::class, 'resume'], []);
+        return new RunnableResponse([External::class, 'resume'], [$request]);
     }
 }