Compartir a través de


AuthorizationEndpointConventionBuilderExtensions.RequireAuthorization Método

Definición

Sobrecargas

RequireAuthorization<TBuilder>(TBuilder)

Agrega la directiva de autorización predeterminada a los puntos de conexión.

RequireAuthorization<TBuilder>(TBuilder, AuthorizationPolicy)

Agrega una directiva de autorización a los puntos de conexión.

RequireAuthorization<TBuilder>(TBuilder, IAuthorizeData[])

Agrega directivas de autorización con el especificado IAuthorizeData a los puntos de conexión.

RequireAuthorization<TBuilder>(TBuilder, Action<AuthorizationPolicyBuilder>)

Agrega una nueva directiva de autorización configurada por una devolución de llamada a los puntos de conexión.

RequireAuthorization<TBuilder>(TBuilder, String[])

Agrega directivas de autorización con los nombres especificados a los puntos de conexión.

RequireAuthorization<TBuilder>(TBuilder)

Source:
AuthorizationEndpointConventionBuilderExtensions.cs

Agrega la directiva de autorización predeterminada a los puntos de conexión.

public:
generic <typename TBuilder>
 where TBuilder : Microsoft::AspNetCore::Builder::IEndpointConventionBuilder[System::Runtime::CompilerServices::Extension]
 static TBuilder RequireAuthorization(TBuilder builder);
public static TBuilder RequireAuthorization<TBuilder> (this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireAuthorization : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireAuthorization(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder) As TBuilder

Parámetros de tipo

TBuilder

Parámetros

builder
TBuilder

Generador de convenciones de punto de conexión.

Devoluciones

TBuilder

Parámetro original del generador de convenciones.

Se aplica a

RequireAuthorization<TBuilder>(TBuilder, AuthorizationPolicy)

Source:
AuthorizationEndpointConventionBuilderExtensions.cs

Agrega una directiva de autorización a los puntos de conexión.

public static TBuilder RequireAuthorization<TBuilder> (this TBuilder builder, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireAuthorization : 'Builder * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireAuthorization(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, policy As AuthorizationPolicy) As TBuilder

Parámetros de tipo

TBuilder

Parámetros

builder
TBuilder

Generador de convenciones de punto de conexión.

Devoluciones

TBuilder

Parámetro original del generador de convenciones.

Se aplica a

RequireAuthorization<TBuilder>(TBuilder, IAuthorizeData[])

Source:
AuthorizationEndpointConventionBuilderExtensions.cs

Agrega directivas de autorización con el especificado IAuthorizeData a los puntos de conexión.

public:
generic <typename TBuilder>
 where TBuilder : Microsoft::AspNetCore::Builder::IEndpointConventionBuilder[System::Runtime::CompilerServices::Extension]
 static TBuilder RequireAuthorization(TBuilder builder, ... cli::array <Microsoft::AspNetCore::Authorization::IAuthorizeData ^> ^ authorizeData);
public static TBuilder RequireAuthorization<TBuilder> (this TBuilder builder, params Microsoft.AspNetCore.Authorization.IAuthorizeData[] authorizeData) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireAuthorization : 'Builder * Microsoft.AspNetCore.Authorization.IAuthorizeData[] -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireAuthorization(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, ParamArray authorizeData As IAuthorizeData()) As TBuilder

Parámetros de tipo

TBuilder

Parámetros

builder
TBuilder

Generador de convenciones de punto de conexión.

authorizeData
IAuthorizeData[]

Colección de authorizeData. Si está vacío, se usará la directiva de autorización predeterminada.

Devoluciones

TBuilder

Parámetro original del generador de convenciones.

Se aplica a

RequireAuthorization<TBuilder>(TBuilder, Action<AuthorizationPolicyBuilder>)

Source:
AuthorizationEndpointConventionBuilderExtensions.cs

Agrega una nueva directiva de autorización configurada por una devolución de llamada a los puntos de conexión.

public static TBuilder RequireAuthorization<TBuilder> (this TBuilder builder, Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> configurePolicy) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireAuthorization : 'Builder * Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireAuthorization(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, configurePolicy As Action(Of AuthorizationPolicyBuilder)) As TBuilder

Parámetros de tipo

TBuilder

Parámetros

builder
TBuilder

Generador de convenciones de punto de conexión.

configurePolicy
Action<AuthorizationPolicyBuilder>

Devolución de llamada usada para configurar la directiva.

Devoluciones

TBuilder

Parámetro original del generador de convenciones.

Se aplica a

RequireAuthorization<TBuilder>(TBuilder, String[])

Source:
AuthorizationEndpointConventionBuilderExtensions.cs

Agrega directivas de autorización con los nombres especificados a los puntos de conexión.

public:
generic <typename TBuilder>
 where TBuilder : Microsoft::AspNetCore::Builder::IEndpointConventionBuilder[System::Runtime::CompilerServices::Extension]
 static TBuilder RequireAuthorization(TBuilder builder, ... cli::array <System::String ^> ^ policyNames);
public static TBuilder RequireAuthorization<TBuilder> (this TBuilder builder, params string[] policyNames) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireAuthorization : 'Builder * string[] -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireAuthorization(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, ParamArray policyNames As String()) As TBuilder

Parámetros de tipo

TBuilder

Parámetros

builder
TBuilder

Generador de convenciones de punto de conexión.

policyNames
String[]

Colección de nombres de directiva. Si está vacío, se usará la directiva de autorización predeterminada.

Devoluciones

TBuilder

Parámetro original del generador de convenciones.

Se aplica a