99use StepupReadId \Infrastructure \Exception \NoActiveAuthnRequestException ;
1010use Surfnet \GsspBundle \Service \AuthenticationService ;
1111use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
12+ use Symfony \Component \HttpFoundation \RedirectResponse ;
1213use Symfony \Component \HttpFoundation \Response ;
1314use Symfony \Component \Messenger \HandleTrait ;
1415use Symfony \Component \Messenger \MessageBusInterface ;
1516use Symfony \Component \Routing \Annotation \Route ;
1617use Symfony \Component \Routing \Generator \UrlGeneratorInterface ;
18+ use function sprintf ;
1719
1820/**
1921 * @Route("/authentication", name="readid_authentication")
@@ -52,7 +54,7 @@ public function __invoke(): Response
5254 if ($ this ->authenticationService ->isAuthenticated ()) {
5355 $ this ->logger ->info ('Authentication is finalized returning to service provider ' );
5456
55- return $ this ->authenticationService -> replyToServiceProvider ();
57+ return $ this ->replyToServiceProvider ();
5658 }
5759
5860 $ readySession = $ this ->handle (new GetStoredReadySessionQuery ());
@@ -63,4 +65,12 @@ public function __invoke(): Response
6365 'returnUrl ' => $ this ->generateUrl ('readid_saml_sso_return ' , [], UrlGeneratorInterface::ABSOLUTE_URL ),
6466 ]);
6567 }
68+
69+ private function replyToServiceProvider (): RedirectResponse
70+ {
71+ $ url = $ this ->generateUrl ('readid_saml_sso_return ' );
72+ $ this ->logger ->notice (sprintf ('Created redirect response for sso return endpoint "%s" ' , $ url ));
73+
74+ return new RedirectResponse ($ url );
75+ }
6676}
0 commit comments