1313use  SimpleSAML \Module \drupalauth \ConfigHelper ;
1414use  SimpleSAML \Module \drupalauth \DrupalHelper ;
1515use  SimpleSAML \Utils \HTTP ;
16+ use  Symfony \Component \HttpFoundation \Request ;
17+ use  Symfony \Component \HttpFoundation \Response ;
1618
1719/** 
1820 * Drupal authentication source for SimpleSAMLphp using Drupal's login page. 
@@ -169,7 +171,7 @@ private function getUser()
169171     * 
170172     * @param array &$state  Information about the current authentication. 
171173     */ 
172-     public  function  authenticate (array  &$ statevoid 
174+     public  function  authenticate (Request   $ request ,  array  &$ state? Response 
173175    {
174176        assert (is_array ($ state
175177
@@ -182,7 +184,7 @@ public function authenticate(array &$state): void
182184             * to the authentication process. 
183185             */ 
184186            $ state'Attributes ' ] = $ attributes
185-             return ;
187+             return   null ;
186188        }
187189
188190        /* 
@@ -236,14 +238,9 @@ public function authenticate(array &$state): void
236238         * the real name of the parameter for the login page. 
237239         */ 
238240        $ http_utilsnew  HTTP ();
239-         $ http_utilsredirectTrustedURL ($ authPage
241+         return   $ http_utilsredirectTrustedURL ($ authPage
240242            'ReturnTo '  => $ returnTo
241243        ]);
242- 
243-         /* 
244-          * The redirect function never returns, so we never get this far. 
245-          */ 
246-         assert (false );
247244    }
248245
249246    /** 
@@ -328,7 +325,7 @@ public static function resume()
328325     * 
329326     * @param array &$state  The logout state array. 
330327     */ 
331-     public  function  logout (array  &$ statevoid 
328+     public  function  logout (array  &$ state? Response 
332329    {
333330        assert (is_array ($ state
334331
@@ -349,6 +346,6 @@ public function logout(array &$state): void
349346        }
350347
351348        $ http_utilsnew  HTTP ();
352-         $ http_utilsredirectTrustedURL ($ logout_url$ parameters
349+         return   $ http_utilsredirectTrustedURL ($ logout_url$ parameters
353350    }
354351}
0 commit comments