Condividi tramite


AuthorizationEndpointConventionBuilderExtensions.RequireAuthorization Metodo

Definizione

Overload

RequireAuthorization<TBuilder>(TBuilder)

Aggiunge i criteri di autorizzazione predefiniti agli endpoint.

RequireAuthorization<TBuilder>(TBuilder, AuthorizationPolicy)

Aggiunge un criterio di autorizzazione agli endpoint.

RequireAuthorization<TBuilder>(TBuilder, IAuthorizeData[])

Aggiunge i criteri di autorizzazione con l'oggetto specificato IAuthorizeData agli endpoint.

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

Aggiunge un nuovo criterio di autorizzazione configurato da un callback agli endpoint.

RequireAuthorization<TBuilder>(TBuilder, String[])

Aggiunge i criteri di autorizzazione con i nomi specificati agli endpoint.

RequireAuthorization<TBuilder>(TBuilder)

Origine:
AuthorizationEndpointConventionBuilderExtensions.cs

Aggiunge i criteri di autorizzazione predefiniti agli endpoint.

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

Parametri di tipo

TBuilder

Parametri

builder
TBuilder

Generatore di convenzioni dell'endpoint.

Restituisce

TBuilder

Parametro del generatore di convenzioni originale.

Si applica a

RequireAuthorization<TBuilder>(TBuilder, AuthorizationPolicy)

Origine:
AuthorizationEndpointConventionBuilderExtensions.cs

Aggiunge un criterio di autorizzazione agli endpoint.

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

Parametri di tipo

TBuilder

Parametri

builder
TBuilder

Generatore di convenzioni dell'endpoint.

Restituisce

TBuilder

Parametro del generatore di convenzioni originale.

Si applica a

RequireAuthorization<TBuilder>(TBuilder, IAuthorizeData[])

Origine:
AuthorizationEndpointConventionBuilderExtensions.cs

Aggiunge i criteri di autorizzazione con l'oggetto specificato IAuthorizeData agli endpoint.

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

Parametri di tipo

TBuilder

Parametri

builder
TBuilder

Generatore di convenzioni dell'endpoint.

authorizeData
IAuthorizeData[]

Raccolta di authorizeData. Se vuoto, verranno usati i criteri di autorizzazione predefiniti.

Restituisce

TBuilder

Parametro del generatore di convenzioni originale.

Si applica a

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

Origine:
AuthorizationEndpointConventionBuilderExtensions.cs

Aggiunge un nuovo criterio di autorizzazione configurato da un callback agli endpoint.

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

Parametri di tipo

TBuilder

Parametri

builder
TBuilder

Generatore di convenzioni dell'endpoint.

configurePolicy
Action<AuthorizationPolicyBuilder>

Callback usato per configurare il criterio.

Restituisce

TBuilder

Parametro del generatore di convenzioni originale.

Si applica a

RequireAuthorization<TBuilder>(TBuilder, String[])

Origine:
AuthorizationEndpointConventionBuilderExtensions.cs

Aggiunge i criteri di autorizzazione con i nomi specificati agli endpoint.

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

Parametri di tipo

TBuilder

Parametri

builder
TBuilder

Generatore di convenzioni dell'endpoint.

policyNames
String[]

Raccolta di nomi di criteri. Se vuoto, verranno usati i criteri di autorizzazione predefiniti.

Restituisce

TBuilder

Parametro del generatore di convenzioni originale.

Si applica a