Bagikan melalui


AuthorizationBuilder.AddPolicy Metode

Definisi

Overload

AddPolicy(String, AuthorizationPolicy)

Menambahkan yang AuthorizationPolicy dapat digunakan oleh IAuthorizationService.

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Tambahkan kebijakan yang dibangun dari delegasi dengan nama yang disediakan.

AddPolicy(String, AuthorizationPolicy)

Sumber:
AuthorizationBuilder.cs
Sumber:
AuthorizationBuilder.cs
Sumber:
AuthorizationBuilder.cs

Menambahkan yang AuthorizationPolicy dapat digunakan oleh 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

Parameter

name
String

Nama kebijakan ini.

Mengembalikan

Pembangun.

Berlaku untuk

AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Sumber:
AuthorizationBuilder.cs
Sumber:
AuthorizationBuilder.cs
Sumber:
AuthorizationBuilder.cs

Tambahkan kebijakan yang dibangun dari delegasi dengan nama yang disediakan.

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

Parameter

name
String

Nama kebijakan.

configurePolicy
Action<AuthorizationPolicyBuilder>

Delegasi yang akan digunakan untuk membangun kebijakan.

Mengembalikan

Pembangun.

Berlaku untuk