AuthorizationBuilder.AddPolicy Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
AddPolicy(String, AuthorizationPolicy) |
Agrega un AuthorizationPolicy objeto que puede usar IAuthorizationService. |
AddPolicy(String, Action<AuthorizationPolicyBuilder>) |
Agregue una directiva que se compila a partir de un delegado con el nombre proporcionado. |
AddPolicy(String, AuthorizationPolicy)
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
Agrega un AuthorizationPolicy objeto que puede usar 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
Parámetros
- name
- String
Nombre de esta directiva.
- policy
- AuthorizationPolicy
El elemento de lenguaje AuthorizationPolicy.>
Devoluciones
Generador.
Se aplica a
AddPolicy(String, Action<AuthorizationPolicyBuilder>)
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
Agregue una directiva que se compila a partir de un delegado con el nombre proporcionado.
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
Parámetros
- name
- String
El nombre de la directiva.
- configurePolicy
- Action<AuthorizationPolicyBuilder>
Delegado que se usará para compilar la directiva.
Devoluciones
Generador.