Merge branch 'feature-nxdev' of https://gitea.nxsir.cn/code/IM into feature-nxdev

This commit is contained in:
2025-11-27 16:56:02 +08:00
25 changed files with 479 additions and 83 deletions
+11 -1
View File
@@ -87,6 +87,15 @@ namespace IM_API
return Task.CompletedTask;
}
};
options.Events = new JwtBearerEvents
{
OnAuthenticationFailed = context =>
{
Console.WriteLine("Authentication failed: " + context.Exception.Message);
return Task.CompletedTask;
}
};
});
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
@@ -104,8 +113,9 @@ namespace IM_API
app.UseHttpsRedirection();
app.UseAuthorization();
app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();