AuthorizationServiceCollectionExtensions.AddAuthorization AuthorizationServiceCollectionExtensions.AddAuthorization AuthorizationServiceCollectionExtensions.AddAuthorization AuthorizationServiceCollectionExtensions.AddAuthorization Method

Definition

Overloads

AddAuthorization(IServiceCollection) AddAuthorization(IServiceCollection) AddAuthorization(IServiceCollection) AddAuthorization(IServiceCollection)

Adds authorization services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

AddAuthorization(IServiceCollection, Action<AuthorizationOptions>) AddAuthorization(IServiceCollection, Action<AuthorizationOptions>) AddAuthorization(IServiceCollection, Action<AuthorizationOptions>) AddAuthorization(IServiceCollection, Action<AuthorizationOptions>)

Adds authorization services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

AddAuthorization(IServiceCollection) AddAuthorization(IServiceCollection) AddAuthorization(IServiceCollection) AddAuthorization(IServiceCollection)

Adds authorization services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddAuthorization(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
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
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.

AddAuthorization(IServiceCollection, Action<AuthorizationOptions>) AddAuthorization(IServiceCollection, Action<AuthorizationOptions>) AddAuthorization(IServiceCollection, Action<AuthorizationOptions>) AddAuthorization(IServiceCollection, Action<AuthorizationOptions>)

Adds authorization services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddAuthorization(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::Authorization::AuthorizationOptions ^> ^ configure);
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
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

configure
Action<AuthorizationOptions>

An action delegate to configure the provided AuthorizationOptions.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.

Applies to