Partilhar via


AuthorizationBuilder.AddPolicy Método

Definição

Sobrecargas

AddPolicy(String, AuthorizationPolicy)

Adiciona um AuthorizationPolicy que pode ser usado por IAuthorizationService.

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Adicione uma política criada com base em um delegado com o nome fornecido.

AddPolicy(String, AuthorizationPolicy)

Origem:
AuthorizationBuilder.cs
Origem:
AuthorizationBuilder.cs
Origem:
AuthorizationBuilder.cs

Adiciona um AuthorizationPolicy que pode ser usado por 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

O nome da política.

policy
AuthorizationPolicy

O elemento de linguagem AuthorizationPolicy.>

Retornos

O construtor.

Aplica-se a

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Origem:
AuthorizationBuilder.cs
Origem:
AuthorizationBuilder.cs
Origem:
AuthorizationBuilder.cs

Adicione uma política criada com base em um delegado com o nome fornecido.

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

O nome da política.

configurePolicy
Action<AuthorizationPolicyBuilder>

O delegado que será usado para criar a política.

Retornos

O construtor.

Aplica-se a