18 lines
601 B
C#
18 lines
601 B
C#
using ExpenseTracker.Application.Common.Interfaces.Services;
|
|
using FluentValidation;
|
|
|
|
namespace ExpenseTracker.Application.Authentication.Commands.RenewAccessTokenWithCookie;
|
|
|
|
public class RenewAccessTokenWithCookieCommandValidator : AbstractValidator<RenewAccessTokenWithCookieCommand>
|
|
{
|
|
private readonly ISessionUserService _sessionUserService;
|
|
|
|
public RenewAccessTokenWithCookieCommandValidator(ISessionUserService sessionUserService)
|
|
{
|
|
_sessionUserService = sessionUserService;
|
|
|
|
RuleFor(e => e)
|
|
.Must(_ => _sessionUserService.RefreshToken != null);
|
|
}
|
|
}
|