Compare commits

..

4 Commits

Author SHA1 Message Date
3b4e0762c2 Merge pull request 'Ajout health path' (#23) from health into develop
Some checks reported warnings
Cadoles/hydra-sql/pipeline/head This commit is unstable
Reviewed-on: #23
2023-12-11 14:18:47 +01:00
df59f29fc2 ajout commentaire
Some checks reported warnings
Cadoles/hydra-sql/pipeline/pr-develop This commit is unstable
2023-12-11 14:13:35 +01:00
47917abafb typo
Some checks reported warnings
Cadoles/hydra-sql/pipeline/pr-develop This commit is unstable
2023-12-11 14:07:40 +01:00
d2925fbd49 Ajout health path
Some checks reported warnings
Cadoles/hydra-sql/pipeline/head This commit is unstable
Cadoles/hydra-sql/pipeline/pr-develop This commit is unstable
2023-12-11 13:57:15 +01:00
2 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,7 @@ security:
access_control: access_control:
- { path: ^/login, roles: PUBLIC_ACCESS } - { path: ^/login, roles: PUBLIC_ACCESS }
- { path: ^/connect, roles: ROLE_USER } - { path: ^/connect, roles: ROLE_USER }
- { path: ^/health, roles: PUBLIC_ACCESS }
# - { path: ^/connect, roles: [IS_AUTHENTICATED_FULLY, ROLE_USER] } # - { path: ^/connect, roles: [IS_AUTHENTICATED_FULLY, ROLE_USER] }
when@test: when@test:

View File

@ -8,6 +8,7 @@ use App\Hydra\HydraService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
@ -29,6 +30,14 @@ class MainController extends AbstractController
{ {
return $this->hydra->handleLoginRequest($request); return $this->hydra->handleLoginRequest($request);
} }
/*
* Route de Healthcheck (notament pour kubernetes)
*/
#[Route('/health', name: 'health')]
public function health(Request $request)
{
return new Response('healthy', 200);
}
#[Route('/connect/login-accept', name: 'app_login_accept')] #[Route('/connect/login-accept', name: 'app_login_accept')]
public function loginAccept(Request $request) public function loginAccept(Request $request)