ClaimPolicyBuilder.AddPolicy method (1 of 3)
Adds a prebuilt claim rule under a policy name.
public ClaimPolicyBuilder AddPolicy(string policyName, ClaimRule rule)
See Also
- record ClaimRule
- class ClaimPolicyBuilder
- namespace Kestrun.Claims
ClaimPolicyBuilder.AddPolicy method (2 of 3)
Adds a new policy with a required claim rule.
public ClaimPolicyBuilder AddPolicy(string policyName, string claimType,
params string[] allowedValues)
parameter | description |
---|---|
policyName | The name of the policy. |
claimType | The required claim type. |
allowedValues | Allowed values for the claim. |
Return Value
The current builder instance.
See Also
- class ClaimPolicyBuilder
- namespace Kestrun.Claims
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,
params string[] allowedValues)
parameter | description |
---|---|
policyName | The name of the policy. |
claimType | The required UserIdentityClaim type. |
allowedValues | Allowed values for the claim. |
Return Value
The current builder instance.
See Also
- enum UserIdentityClaim
- class ClaimPolicyBuilder
- namespace Kestrun.Claims