testing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user