PolicyServiceCollectionExtensions.AddAuthorization Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddAuthorization(IServiceCollection) |
Adds authorization policy services to the specified IServiceCollection. |
AddAuthorization(IServiceCollection, Action<AuthorizationOptions>) |
Adds authorization policy services to the specified IServiceCollection. |
AddAuthorization(IServiceCollection)
Adds authorization policy services to the specified IServiceCollection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorization (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAuthorization : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAuthorization (services As IServiceCollection) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to add services to.
Returns
The IServiceCollection so that additional calls can be chained.
Applies to
AddAuthorization(IServiceCollection, Action<AuthorizationOptions>)
Adds authorization policy services to the specified IServiceCollection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorization (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Authorization.AuthorizationOptions> configure);
static member AddAuthorization : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Authorization.AuthorizationOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAuthorization (services As IServiceCollection, configure As Action(Of AuthorizationOptions)) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to add services to.
- configure
- Action<AuthorizationOptions>
An action delegate to configure the provided AuthorizationOptions.
Returns
The IServiceCollection so that additional calls can be chained.