AuthorizationPolicyBuilder.RequireClaim AuthorizationPolicyBuilder.RequireClaim AuthorizationPolicyBuilder.RequireClaim Method

Definition

Overloads

RequireClaim(String) RequireClaim(String) RequireClaim(String)

Adds a ClaimsAuthorizationRequirement to the current instance.

RequireClaim(String, IEnumerable<String>) RequireClaim(String, IEnumerable<String>) RequireClaim(String, IEnumerable<String>)

Adds a ClaimsAuthorizationRequirement to the current instance.

RequireClaim(String, String[]) RequireClaim(String, String[]) RequireClaim(String, String[])

Adds a ClaimsAuthorizationRequirement to the current instance.

RequireClaim(String) RequireClaim(String) RequireClaim(String)

Adds a ClaimsAuthorizationRequirement to the current instance.

public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim (string claimType);
member this.RequireClaim : string -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireClaim (claimType As String) As AuthorizationPolicyBuilder
Parameters
claimType
String String String

The claim type required, which no restrictions on claim value.

Returns

A reference to this instance after the operation has completed.

RequireClaim(String, IEnumerable<String>) RequireClaim(String, IEnumerable<String>) RequireClaim(String, IEnumerable<String>)

Adds a ClaimsAuthorizationRequirement to the current instance.

public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim (string claimType, System.Collections.Generic.IEnumerable<string> requiredValues);
member this.RequireClaim : string * seq<string> -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireClaim (claimType As String, requiredValues As IEnumerable(Of String)) As AuthorizationPolicyBuilder
Parameters
claimType
String String String

The claim type required.

requiredValues
IEnumerable<String>

Values the claim must process one or more of for evaluation to succeed.

Returns

A reference to this instance after the operation has completed.

RequireClaim(String, String[]) RequireClaim(String, String[]) RequireClaim(String, String[])

Adds a ClaimsAuthorizationRequirement to the current instance.

public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim (string claimType, params string[] requiredValues);
member this.RequireClaim : string * string[] -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireClaim (claimType As String, ParamArray requiredValues As String()) As AuthorizationPolicyBuilder
Parameters
claimType
String String String

The claim type required.

requiredValues
String[]

Values the claim must process one or more of for evaluation to succeed.

Returns

A reference to this instance after the operation has completed.

Applies to