using ExpenseTracker.Application.Common.Interfaces.Services; using MediatR; namespace ExpenseTracker.Application.Authentication.Commands.RenewAccessTokenWithCookie; public class RenewAccessTokenWithCookieCommandHandler : IRequestHandler { private readonly ISessionUserService _sessionUserService; private readonly IAuthenticationService _authenticationService; public RenewAccessTokenWithCookieCommandHandler( ISessionUserService sessionUserService, IAuthenticationService authenticationService) { _sessionUserService = sessionUserService; _authenticationService = authenticationService; } public async Task Handle(RenewAccessTokenWithCookieCommand request, CancellationToken cancellationToken) { return await _authenticationService.RenewAccessTokenAsync(_sessionUserService.RefreshToken, cancellationToken); } }