Compartir a través de


PolicyServiceCollectionExtensions.AddAuthorization Método

Definición

Sobrecargas

AddAuthorization(IServiceCollection)

Agrega servicios de directiva de autorización al especificado IServiceCollection.

AddAuthorization(IServiceCollection, Action<AuthorizationOptions>)

Agrega servicios de directiva de autorización al especificado IServiceCollection.

AddAuthorization(IServiceCollection)

Source:
PolicyServiceCollectionExtensions.cs

Agrega servicios de directiva de autorización al especificado 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a

AddAuthorization(IServiceCollection, Action<AuthorizationOptions>)

Source:
PolicyServiceCollectionExtensions.cs

Agrega servicios de directiva de autorización al especificado 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

configure
Action<AuthorizationOptions>

Delegado de acción para configurar el objeto proporcionado AuthorizationOptions.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a