Rename WebApi project to Vegasco.Server.Api
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
And update all references including comments etc.
This commit is contained in:
28
src/Vegasco.Server.Api/Authentication/JwtOptions.cs
Normal file
28
src/Vegasco.Server.Api/Authentication/JwtOptions.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user