AuthorizationOptions.AddPolicy AuthorizationOptions.AddPolicy AuthorizationOptions.AddPolicy Method

Definition

Overloads

AddPolicy(String, AuthorizationPolicy) AddPolicy(String, AuthorizationPolicy) AddPolicy(String, AuthorizationPolicy)

Add an authorization policy with the provided name.

AddPolicy(String, Action<AuthorizationPolicyBuilder>) AddPolicy(String, Action<AuthorizationPolicyBuilder>) AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Add a policy that is built from a delegate with the provided name.

AddPolicy(String, AuthorizationPolicy) AddPolicy(String, AuthorizationPolicy) AddPolicy(String, AuthorizationPolicy)

Add an authorization policy with the provided name.

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)

Parameters

name
String String String

The name of the policy.

AddPolicy(String, Action<AuthorizationPolicyBuilder>) AddPolicy(String, Action<AuthorizationPolicyBuilder>) AddPolicy(String, Action<AuthorizationPolicyBuilder>)

Add a policy that is built from a delegate with the provided name.

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))

Parameters

name
String String String

The name of the policy.

configurePolicy
Action<AuthorizationPolicyBuilder>

The delegate that will be used to build the policy.

Applies to