baseUrl: modification pour la construction de l'url après acces, utilsation de baseUrl
This commit is contained in:
parent
84b72ccf18
commit
a21bff82bc
@ -48,6 +48,10 @@ services:
|
||||
arguments:
|
||||
$baseUrl: '%base_url%'
|
||||
|
||||
App\Hydra\HydraService:
|
||||
arguments:
|
||||
$baseUrl: '%base_url%'
|
||||
|
||||
App\SQLLogin\SQLLoginRequest:
|
||||
arguments:
|
||||
$config: []
|
||||
|
@ -15,12 +15,14 @@ class HydraService extends AbstractController
|
||||
public SessionInterface $session;
|
||||
public Client $client;
|
||||
public TokenStorageInterface $tokenStorage;
|
||||
public string $baseUrl;
|
||||
|
||||
public function __construct(Client $client, SessionInterface $session, TokenStorageInterface $tokenStorage)
|
||||
public function __construct(Client $client, SessionInterface $session, TokenStorageInterface $tokenStorage, string $baseUrl)
|
||||
{
|
||||
$this->session = $session;
|
||||
$this->client = $client;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
$this->baseUrl = $baseUrl;
|
||||
}
|
||||
|
||||
public function handleLoginRequest(Request $request)
|
||||
@ -40,7 +42,7 @@ class HydraService extends AbstractController
|
||||
// si le challenge est validé par hydra, on le stocke en session pour l'utiliser par la suite et on redirige vers une route interne protégée qui va déclencher l'identification FranceConnect
|
||||
$this->session->set('challenge', $loginRequestInfo['challenge']);
|
||||
|
||||
return $this->redirectToRoute('app_login');
|
||||
return new RedirectResponse($this->baseUrl.'/login');
|
||||
}
|
||||
|
||||
public function handleConsentRequest(Request $request)
|
||||
|
Loading…
Reference in New Issue
Block a user