菜单设置
This commit is contained in:
@@ -46,6 +46,7 @@ builder.Services.AddAuthentication(options =>
|
||||
}).AddCookie()
|
||||
.AddJwtBearer(o =>
|
||||
{
|
||||
// 检查客户端和服务器的Token是否一样
|
||||
o.TokenValidationParameters = JwtUtil.ValidParameters();
|
||||
o.Events = new JwtBearerEvents
|
||||
{
|
||||
@@ -116,7 +117,9 @@ app.UseRouting();
|
||||
app.UseCors("Policy");//要放在app.UseEndpoints前。
|
||||
//app.UseHttpsRedirection();
|
||||
|
||||
//todo 认证
|
||||
app.UseAuthentication();
|
||||
//todo 授权
|
||||
app.UseAuthorization();
|
||||
|
||||
//开启缓存
|
||||
|
||||
Reference in New Issue
Block a user