Add Input Validation for Elsa.Identity Login Endpoint (#4601)
* add validator for login request * login request: only require parameters to be not null (allow empty/whitespace)
This commit is contained in:
parent
883ca85753
commit
13e9e4fc65
|
|
@ -0,0 +1,15 @@
|
|||
using FastEndpoints;
|
||||
using FluentValidation;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Elsa.Identity.Endpoints.Login;
|
||||
|
||||
[PublicAPI]
|
||||
internal class RequestValidator : Validator<Request>
|
||||
{
|
||||
public RequestValidator()
|
||||
{
|
||||
RuleFor(x => x.Username).NotNull();
|
||||
RuleFor(x => x.Password).NotNull();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue