This commit is contained in:
2026-03-07 18:59:30 -06:00
parent ab33b91b55
commit dfff343f96
+9 -2
View File
@@ -9,10 +9,17 @@ use Symfony\Component\HttpFoundation\Response;
class RefreshUserJwt
{
public function handle(Request $request, Closure $next, JwtService $jwtService): Response
protected JwtService $jwtService;
public function __construct(JwtService $jwtService)
{
$this->jwtService = $jwtService;
}
public function handle(Request $request, Closure $next): Response
{
if ($request->user()) {
$jwtService->refreshIfNeeded($request->user());
$this->jwtService->refreshIfNeeded($request->user());
}
return $next($request);