feat(app): implement RefreshCommand handler with token rotation and chain revocation
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace SIGCM2.Application.Auth.Refresh;
|
||||
|
||||
public sealed class RefreshCommandValidator : AbstractValidator<RefreshCommand>
|
||||
{
|
||||
public RefreshCommandValidator()
|
||||
{
|
||||
RuleFor(x => x.AccessToken)
|
||||
.NotEmpty().WithMessage("accessToken is required");
|
||||
|
||||
RuleFor(x => x.RefreshToken)
|
||||
.NotEmpty().WithMessage("refreshToken is required")
|
||||
.MinimumLength(20).WithMessage("refreshToken must be at least 20 characters");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user