Condividi tramite


AuthorizationBuilder.AddPolicy Metodo

Definizione

Overload

AddPolicy(String, AuthorizationPolicy)

Aggiunge un AuthorizationPolicy oggetto che può essere utilizzato da IAuthorizationService.

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Aggiungere un criterio creato da un delegato con il nome specificato.

AddPolicy(String, AuthorizationPolicy)

Origine:
AuthorizationBuilder.cs
Origine:
AuthorizationBuilder.cs
Origine:
AuthorizationBuilder.cs

Aggiunge un AuthorizationPolicy oggetto che può essere utilizzato da IAuthorizationService.

public virtual Microsoft.AspNetCore.Authorization.AuthorizationBuilder AddPolicy (string name, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
abstract member AddPolicy : string * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
override this.AddPolicy : string * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
Public Overridable Function AddPolicy (name As String, policy As AuthorizationPolicy) As AuthorizationBuilder

Parametri

name
String

Nome del criterio.

policy
AuthorizationPolicy

L'elemento language AuthorizationPolicy.>

Restituisce

Generatore.

Si applica a

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Origine:
AuthorizationBuilder.cs
Origine:
AuthorizationBuilder.cs
Origine:
AuthorizationBuilder.cs

Aggiungere un criterio creato da un delegato con il nome specificato.

public virtual Microsoft.AspNetCore.Authorization.AuthorizationBuilder AddPolicy (string name, Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> configurePolicy);
abstract member AddPolicy : string * Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
override this.AddPolicy : string * Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
Public Overridable Function AddPolicy (name As String, configurePolicy As Action(Of AuthorizationPolicyBuilder)) As AuthorizationBuilder

Parametri

name
String

Nome del criterio.

configurePolicy
Action<AuthorizationPolicyBuilder>

Delegato che verrà usato per compilare i criteri.

Restituisce

Generatore.

Si applica a