📜  asp.net 核心授权默认策略 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:13.837000             🧑  作者: Mango

代码示例1
services.AddAuthorization(options =>
            {
                options.DefaultPolicy = new AuthorizationPolicyBuilder()
                .RequireAuthenticatedUser()
                .AddAuthenticationSchemes(JwtBearerDefaults.AuthenticationScheme)
                .Build();
            });