Add MetaData Table From ExistData
Change to use MySQL
This commit is contained in:
parent
89de09d213
commit
a0b3b13074
136 changed files with 3438 additions and 1237 deletions
|
|
@ -46,18 +46,18 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
// Authorization
|
||||
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(opt =>
|
||||
{
|
||||
opt.RequireHttpsMetadata = false; //false for dev
|
||||
opt.Authority = issuer;
|
||||
opt.TokenValidationParameters = new()
|
||||
{
|
||||
ValidateIssuer = false, //false for dev
|
||||
ValidateAudience = false, //false for dev
|
||||
ValidateLifetime = false, //false for dev
|
||||
ValidateIssuerSigningKey = true,
|
||||
ValidIssuer = issuer,
|
||||
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key))
|
||||
};
|
||||
});
|
||||
opt.RequireHttpsMetadata = false; //false for dev
|
||||
opt.Authority = issuer;
|
||||
opt.TokenValidationParameters = new()
|
||||
{
|
||||
ValidateIssuer = true,
|
||||
ValidateAudience = false,
|
||||
ValidateLifetime = true,
|
||||
ValidateIssuerSigningKey = true,
|
||||
ValidIssuer = issuer,
|
||||
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key))
|
||||
};
|
||||
});
|
||||
builder.Services.AddAuthorization();
|
||||
|
||||
// use serilog
|
||||
|
|
@ -79,8 +79,6 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
builder.Services.AddApplication();
|
||||
builder.Services.AddPersistence(builder.Configuration);
|
||||
|
||||
builder.Services.AddEmailSender(builder.Configuration);
|
||||
|
||||
builder.Services.AddControllers(options =>
|
||||
{
|
||||
options.SuppressAsyncSuffixInActionNames = false;
|
||||
|
|
@ -112,7 +110,7 @@ var app = builder.Build();
|
|||
|
||||
app.MapHealthChecks("/health");
|
||||
|
||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||
//app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||
app.UseHttpsRedirection();
|
||||
app.UseCors();
|
||||
app.UseAuthentication();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue