All checks were successful
continuous-integration/drone/push Build is passing
And update all references including comments etc.
28 lines
536 B
C#
28 lines
536 B
C#
using FluentValidation;
|
|
|
|
namespace Vegasco.Server.Api.Authentication;
|
|
|
|
public class JwtOptions
|
|
{
|
|
public const string SectionName = "JWT";
|
|
|
|
public string ValidAudience { get; set; } = "";
|
|
|
|
public string MetadataUrl { get; set; } = "";
|
|
|
|
public string? NameClaimType { get; set; }
|
|
|
|
public bool AllowHttpMetadataUrl { get; set; }
|
|
}
|
|
|
|
public class JwtOptionsValidator : AbstractValidator<JwtOptions>
|
|
{
|
|
public JwtOptionsValidator()
|
|
{
|
|
RuleFor(x => x.ValidAudience)
|
|
.NotEmpty();
|
|
|
|
RuleFor(x => x.MetadataUrl)
|
|
.NotEmpty();
|
|
}
|
|
} |