Updated mooncore.extended. Adjusted authentication config to support multiple schemes

This commit is contained in:
2025-03-01 17:35:21 +01:00
parent 45ccb6fc4c
commit 1f95577eb7
2 changed files with 4 additions and 9 deletions

View File

@@ -505,8 +505,8 @@ public class Startup
private Task RegisterAuth()
{
WebApplicationBuilder.Services
.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
.AddAuthentication("userAuthentication")
.AddJwtBearer("userAuthentication",options =>
{
options.TokenValidationParameters = new()
{
@@ -523,7 +523,7 @@ public class Startup
};
});
WebApplicationBuilder.Services.AddJwtInvalidation(options =>
WebApplicationBuilder.Services.AddJwtInvalidation("userAuthentication",options =>
{
options.InvalidateTimeProvider = async (provider, principal) =>
{