Partager via


AuthorizationBuilder.AddPolicy Méthode

Définition

Surcharges

AddPolicy(String, AuthorizationPolicy)

Ajoute un AuthorizationPolicy qui peut être utilisé par IAuthorizationService.

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Ajoutez une stratégie créée à partir d’un délégué avec le nom fourni.

AddPolicy(String, AuthorizationPolicy)

Source:
AuthorizationBuilder.cs
Source:
AuthorizationBuilder.cs
Source:
AuthorizationBuilder.cs

Ajoute un AuthorizationPolicy qui peut être utilisé par 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

Paramètres

name
String

Nom de cette stratégie.

policy
AuthorizationPolicy

L’élément de langage AuthorizationPolicy.>

Retours

Générateur.

S’applique à

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Source:
AuthorizationBuilder.cs
Source:
AuthorizationBuilder.cs
Source:
AuthorizationBuilder.cs

Ajoutez une stratégie créée à partir d’un délégué avec le nom fourni.

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

Paramètres

name
String

Nom de la stratégie.

configurePolicy
Action<AuthorizationPolicyBuilder>

Délégué qui sera utilisé pour générer la stratégie.

Retours

Générateur.

S’applique à