Merge pull request #42 from vinceh121/fix/unsecure-dev-cookies

fix: allow unsecure authentication cookies in dev
This commit is contained in:
Maël Gangloff
2024-08-19 21:34:20 +02:00
committed by GitHub

View File

@@ -11,6 +11,7 @@ use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
@@ -21,6 +22,7 @@ class JWTAuthenticator implements AuthenticationSuccessHandlerInterface
public function __construct(
protected JWTTokenManagerInterface $jwtManager,
protected EventDispatcherInterface $dispatcher,
protected KernelInterface $kernel
) {
}
@@ -46,7 +48,7 @@ class JWTAuthenticator implements AuthenticationSuccessHandlerInterface
time() + 604800, // expiration
'/',
null,
true,
!$this->kernel->isDebug(),
true,
false,
'strict'