Partager via


PolicyServiceCollectionExtensions.AddAuthorization Méthode

Définition

Surcharges

AddAuthorization(IServiceCollection)

Ajoute des services de stratégie d’autorisation au spécifié IServiceCollection.

AddAuthorization(IServiceCollection, Action<AuthorizationOptions>)

Ajoute des services de stratégie d’autorisation au spécifié IServiceCollection.

AddAuthorization(IServiceCollection)

Source:
PolicyServiceCollectionExtensions.cs

Ajoute des services de stratégie d’autorisation au spécifié 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à

AddAuthorization(IServiceCollection, Action<AuthorizationOptions>)

Source:
PolicyServiceCollectionExtensions.cs

Ajoute des services de stratégie d’autorisation au spécifié 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

configure
Action<AuthorizationOptions>

Délégué d’action pour configurer le fourni AuthorizationOptions.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à