Update compose to use
Some checks reported errors
Cadoles/hydra-sql/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
Cadoles/hydra-sql/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
4
.env
4
.env
@@ -14,7 +14,7 @@
|
|||||||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
||||||
|
|
||||||
###> symfony/framework-bundle ###
|
###> symfony/framework-bundle ###
|
||||||
APP_ENV=prod
|
APP_ENV=dev
|
||||||
APP_SECRET=406ccaa0c76a451fdcc2307ea146cbef
|
APP_SECRET=406ccaa0c76a451fdcc2307ea146cbef
|
||||||
URL_LINK="http://localhost"
|
URL_LINK="http://localhost"
|
||||||
|
|
||||||
@@ -44,3 +44,5 @@ ALTCHA_WORKERS=8
|
|||||||
ALTCHA_DELAY=100
|
ALTCHA_DELAY=100
|
||||||
ALTCHA_MOCK_ERROR=false
|
ALTCHA_MOCK_ERROR=false
|
||||||
ALTCHA_ENABLED=true
|
ALTCHA_ENABLED=true
|
||||||
|
|
||||||
|
ENABLED_2FA=true
|
14
compose.yml
14
compose.yml
@@ -59,7 +59,6 @@ services:
|
|||||||
- HASH_ALGO_LEGACY="sha256"
|
- HASH_ALGO_LEGACY="sha256"
|
||||||
- SECURITY_PATTERN=password,salt,pepper
|
- SECURITY_PATTERN=password,salt,pepper
|
||||||
- CADDY_HTTP_PORT=8071
|
- CADDY_HTTP_PORT=8071
|
||||||
|
|
||||||
oidc-test:
|
oidc-test:
|
||||||
image: bornholm/oidc-test:v0.0.0-1-g936a77e
|
image: bornholm/oidc-test:v0.0.0-1-g936a77e
|
||||||
environment:
|
environment:
|
||||||
@@ -158,6 +157,19 @@ services:
|
|||||||
image: reg.cadoles.com/cadoles/altcha:2024.10.29-develop.1213.22e038b
|
image: reg.cadoles.com/cadoles/altcha:2024.10.29-develop.1213.22e038b
|
||||||
environment:
|
environment:
|
||||||
ALTCHA_HMAC_KEY: 'change_me'
|
ALTCHA_HMAC_KEY: 'change_me'
|
||||||
|
hydra-2fa:
|
||||||
|
build:
|
||||||
|
context: ../hydra-2fa # Répertoire du sous-projet
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ../hydra-2fa:/app # Montage pour synchronisation en temps réel (ajuste si le WORKDIR change)
|
||||||
|
environment:
|
||||||
|
- APP_ENV=dev
|
||||||
|
- APP_DEBUG=1 # Pour mode debug en dev
|
||||||
|
ports:
|
||||||
|
- "8070:80" # Mappe le port 80 du conteneur sur 8081 de l'hôte
|
||||||
|
depends_on:
|
||||||
|
- mariadb # Si tu utilises la DB partagée
|
||||||
volumes:
|
volumes:
|
||||||
postgres:
|
postgres:
|
||||||
mariadb:
|
mariadb:
|
||||||
|
@@ -51,7 +51,9 @@ services:
|
|||||||
App\Hydra\HydraService:
|
App\Hydra\HydraService:
|
||||||
arguments:
|
arguments:
|
||||||
$baseUrl: '%base_url%'
|
$baseUrl: '%base_url%'
|
||||||
|
App\Controller\MainController:
|
||||||
|
arguments:
|
||||||
|
$enabled2fa: '%env(bool:ENABLED_2FA)%'
|
||||||
App\SQLLogin\SQLLoginRequest:
|
App\SQLLogin\SQLLoginRequest:
|
||||||
arguments:
|
arguments:
|
||||||
$config: []
|
$config: []
|
||||||
|
@@ -20,8 +20,9 @@ class MainController extends AbstractController
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly RequestStack $requestStack,
|
private readonly RequestStack $requestStack,
|
||||||
private readonly HydraService $hydra,
|
private readonly HydraService $hydra,
|
||||||
private readonly Client $client
|
private readonly Client $client,
|
||||||
){
|
private readonly bool $enabled2fa
|
||||||
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/', name: 'app_home')]
|
#[Route('/', name: 'app_home')]
|
||||||
@@ -42,6 +43,8 @@ class MainController extends AbstractController
|
|||||||
#[Route('/connect/login-accept', name: 'app_login_accept', methods: ['GET'])]
|
#[Route('/connect/login-accept', name: 'app_login_accept', methods: ['GET'])]
|
||||||
public function loginAccept(SQLLoginRequest $sqlLoginRequest): RedirectResponse
|
public function loginAccept(SQLLoginRequest $sqlLoginRequest): RedirectResponse
|
||||||
{
|
{
|
||||||
|
dd($this->enabled2fa);
|
||||||
|
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
|
|
||||||
if (!$user instanceof User) {
|
if (!$user instanceof User) {
|
||||||
|
Reference in New Issue
Block a user