ClaimPolicyBuilder.AddPolicy method (1 of 3)

Adds a prebuilt claim rule under a policy name.

public ClaimPolicyBuilder AddPolicy(string policyName, ClaimRule rule, string? description = null)
parameter description
policyName The name of the policy.
rule The claim rule to associate with the policy.
description Description of the claim rule.

Return Value

The current builder instance.

See Also


ClaimPolicyBuilder.AddPolicy method (2 of 3)

Adds a new policy with a required claim rule.

public ClaimPolicyBuilder AddPolicy(string policyName, string claimType, string description, 
    params string[] allowedValues)
parameter description
policyName The name of the policy.
claimType The required claim type.
description Description of the claim rule.
allowedValues Allowed values for the claim.

Return Value

The current builder instance.

See Also


ClaimPolicyBuilder.AddPolicy method (3 of 3)

Adds a new policy with a required claim rule using a UserIdentityClaim.

public ClaimPolicyBuilder AddPolicy(string policyName, UserIdentityClaim claimType, 
    string? description, params string[] allowedValues)
parameter description
policyName The name of the policy.
claimType The required UserIdentityClaim type.
description Description of the claim rule.
allowedValues Allowed values for the claim.

Return Value

The current builder instance.

See Also