Пример #1
0
 public ClaimValueMatchesParameterValueAssertion(string claimType, string parameterName, Grant grant)
 {
     _claimType     = claimType;
     _parameterName = parameterName;
     Grant          = grant;
     Information    = new AssertionInformation("match", $"{_claimType} : {_parameterName}", Grant);
 }
Пример #2
0
 public AndAssertion(params IAssertion[] assertions)
 {
     _assertions = assertions.OrderBy(x => x.Grant).ToArray();
     _failedToMatchAllSubAssertions = new AssertionInformation("and",
                                                               $"({string.Join(",", _assertions.Span.ToArray().Select(x => x.ToString()))})", Grant.Deny);
     Information = new AssertionInformation("and",
                                            $"({string.Join(",", _assertions.ToArray().Select(x => x.ToString()))})", Grant.Unknown);
 }
Пример #3
0
 public OrAssertion(params IAssertion[] assertions)
 {
     _assertions = assertions.OrderBy(x => x.Grant).ToArray();
     Information = new AssertionInformation("or", $"({string.Join(",", _assertions)})", Grant.Unknown);
 }
Пример #4
0
 public ClaimMatchAssertion(Grant grant, Claim claim)
 {
     _claim      = claim;
     Grant       = grant;
     Information = new AssertionInformation("equal", _claim.ToString(), grant);
 }
Пример #5
0
 public AssertionMatch(PolicyInformation policy, AssertionInformation assertion, IReadOnlyList <Claim> matches)
 {
     Policy    = policy;
     Assertion = assertion;
     Matches   = matches;
 }
Пример #6
0
 public AssertionMatch(PolicyInformation policy, AssertionInformation assertion, params Claim[] matches) : this(
         policy, assertion, (IReadOnlyList <Claim>)matches)
 {
 }