MvcCoreMvcCoreBuilderExtensions.AddAuthorization 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddAuthorization(IMvcCoreBuilder) |
为 |
AddAuthorization(IMvcCoreBuilder, Action<AuthorizationOptions>) |
为 |
AddAuthorization(IMvcCoreBuilder)
为 builder
配置身份验证和授权服务。
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddAuthorization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder);
static member AddAuthorization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddAuthorization (builder As IMvcCoreBuilder) As IMvcCoreBuilder
参数
- builder
- IMvcCoreBuilder
返回
适用于
AddAuthorization(IMvcCoreBuilder, Action<AuthorizationOptions>)
为 builder
配置身份验证和授权服务。
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddAuthorization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.AspNetCore.Authorization.AuthorizationOptions> setupAction);
static member AddAuthorization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.AspNetCore.Authorization.AuthorizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddAuthorization (builder As IMvcCoreBuilder, setupAction As Action(Of AuthorizationOptions)) As IMvcCoreBuilder
参数
- builder
- IMvcCoreBuilder
- setupAction
- Action<AuthorizationOptions>
用于配置 AuthorizationOptions 的 Action。