Beispiel #1
0
 public ClaimValueMatchesParameterValueAssertion(string claimType, string parameterName, Grant grant)
 {
     _claimType     = claimType;
     _parameterName = parameterName;
     Grant          = grant;
     Information    = new AssertionInformation("match", $"{_claimType} : {_parameterName}", Grant);
 }
Beispiel #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);
 }
Beispiel #3
0
 public OrAssertion(params IAssertion[] assertions)
 {
     _assertions = assertions.OrderBy(x => x.Grant).ToArray();
     Information = new AssertionInformation("or", $"({string.Join(",", _assertions)})", Grant.Unknown);
 }
 public ClaimMatchAssertion(Grant grant, Claim claim)
 {
     _claim      = claim;
     Grant       = grant;
     Information = new AssertionInformation("equal", _claim.ToString(), grant);
 }
Beispiel #5
0
 public AssertionMatch(PolicyInformation policy, AssertionInformation assertion, IReadOnlyList <Claim> matches)
 {
     Policy    = policy;
     Assertion = assertion;
     Matches   = matches;
 }
Beispiel #6
0
 public AssertionMatch(PolicyInformation policy, AssertionInformation assertion, params Claim[] matches) : this(
         policy, assertion, (IReadOnlyList <Claim>)matches)
 {
 }