Compartir a través de


AuthorizationOptions.AddPolicy Método

Definición

Sobrecargas

AddPolicy(String, AuthorizationPolicy)

Agregue una directiva de autorización con el nombre proporcionado.

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Agregue una directiva que se compila a partir de un delegado con el nombre proporcionado.

AddPolicy(String, AuthorizationPolicy)

Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs

Agregue una directiva de autorización con el nombre proporcionado.

public:
 void AddPolicy(System::String ^ name, Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ policy);
public void AddPolicy (string name, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
member this.AddPolicy : string * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> unit
Public Sub AddPolicy (name As String, policy As AuthorizationPolicy)

Parámetros

name
String

El nombre de la directiva.

policy
AuthorizationPolicy

La directiva de autorización.

Se aplica a

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs
Source:
AuthorizationOptions.cs

Agregue una directiva que se compila a partir de un delegado con el nombre proporcionado.

public:
 void AddPolicy(System::String ^ name, Action<Microsoft::AspNetCore::Authorization::AuthorizationPolicyBuilder ^> ^ configurePolicy);
public void AddPolicy (string name, Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> configurePolicy);
member this.AddPolicy : string * Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> -> unit
Public Sub AddPolicy (name As String, configurePolicy As Action(Of AuthorizationPolicyBuilder))

Parámetros

name
String

El nombre de la directiva.

configurePolicy
Action<AuthorizationPolicyBuilder>

Delegado que se usará para compilar la directiva.

Se aplica a