AuthorizationBuilder.AddDefaultPolicy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddDefaultPolicy(String, AuthorizationPolicy) |
Add a policy that is built from a delegate with the provided name and used as the default policy. |
AddDefaultPolicy(String, Action<AuthorizationPolicyBuilder>) |
Add a policy that is built from a delegate with the provided name and used as the DefaultPolicy. |
AddDefaultPolicy(String, AuthorizationPolicy)
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
Add a policy that is built from a delegate with the provided name and used as the default policy.
public virtual Microsoft.AspNetCore.Authorization.AuthorizationBuilder AddDefaultPolicy (string name, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
abstract member AddDefaultPolicy : string * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
override this.AddDefaultPolicy : string * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
Public Overridable Function AddDefaultPolicy (name As String, policy As AuthorizationPolicy) As AuthorizationBuilder
Parameters
- name
- String
The name of the default policy.
- policy
- AuthorizationPolicy
The default AuthorizationPolicy.>
Returns
The builder.
Applies to
AddDefaultPolicy(String, Action<AuthorizationPolicyBuilder>)
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
- Source:
- AuthorizationBuilder.cs
Add a policy that is built from a delegate with the provided name and used as the DefaultPolicy.
public virtual Microsoft.AspNetCore.Authorization.AuthorizationBuilder AddDefaultPolicy (string name, Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> configurePolicy);
abstract member AddDefaultPolicy : string * Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
override this.AddDefaultPolicy : string * Action<Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder> -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
Public Overridable Function AddDefaultPolicy (name As String, configurePolicy As Action(Of AuthorizationPolicyBuilder)) As AuthorizationBuilder
Parameters
- name
- String
The name of the DefaultPolicy.
- configurePolicy
- Action<AuthorizationPolicyBuilder>
The delegate that will be used to build the DefaultPolicy.
Returns
The builder.