Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,33 +96,33 @@ public AuthorizationPolicyBuilder Combine(AuthorizationPolicy policy)
/// to the current instance.
/// </summary>
/// <param name="claimType">The claim type required.</param>
/// <param name="requiredValues">Values the claim must process one or more of for evaluation to succeed.</param>
/// <param name="allowedValues">Values the claim must process one or more of for evaluation to succeed.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public AuthorizationPolicyBuilder RequireClaim(string claimType, params string[] requiredValues)
public AuthorizationPolicyBuilder RequireClaim(string claimType, params string[] allowedValues)
{
if (claimType == null)
{
throw new ArgumentNullException(nameof(claimType));
}

return RequireClaim(claimType, (IEnumerable<string>)requiredValues);
return RequireClaim(claimType, (IEnumerable<string>)allowedValues);
}

/// <summary>
/// Adds a <see cref="ClaimsAuthorizationRequirement"/>
/// to the current instance.
/// </summary>
/// <param name="claimType">The claim type required.</param>
/// <param name="requiredValues">Values the claim must process one or more of for evaluation to succeed.</param>
/// <param name="allowedValues">Values the claim must process one or more of for evaluation to succeed.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public AuthorizationPolicyBuilder RequireClaim(string claimType, IEnumerable<string> requiredValues)
public AuthorizationPolicyBuilder RequireClaim(string claimType, IEnumerable<string> allowedValues)
{
if (claimType == null)
{
throw new ArgumentNullException(nameof(claimType));
}

Requirements.Add(new ClaimsAuthorizationRequirement(claimType, requiredValues));
Requirements.Add(new ClaimsAuthorizationRequirement(claimType, allowedValues));
return this;
}

Expand Down