develop #5

Merged
luolan merged 26 commits from develop into master 2025-08-05 12:45:26 +08:00
Showing only changes of commit 0589c29e5d - Show all commits

View File

@ -83,6 +83,17 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
ValidateIssuerSigningKey = true,
IssuerSigningKey = secKey
};
x.Events = new JwtBearerEvents
{
OnChallenge = context =>
{
context.HandleResponse();
context.Response.StatusCode = 200;
context.Response.ContentType = "application/json";
return context.Response.WriteAsJsonAsync(new ReturnTemplate(401,"你提供了一个错误的Token所以我们无法验证你的身份唔......",null));
}
};
})
.AddCookie("Identity.External").AddCookie("Identity.Application");