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