コード例 #1
0
        public AuthorizationPolicyBuilder RequireClaim(string claimType, params string[] allowedValues)
        {
            var requirement = new ClaimAuthorizationRequirement(claimType, allowedValues);

            _requirements.Add(requirement);
            return(this);
        }
コード例 #2
0
        public AuthorizationPolicyBuilder RequireClaim(string claimType, IEnumerable <string> allowedValues, IEnumerable <string> displayValues)
        {
            var requirement = new ClaimAuthorizationRequirement(claimType, allowedValues, displayValues);

            _requirements.Add(requirement);
            return(this);
        }
コード例 #3
0
        public AuthorizationPolicyBuilder RequireClaim(string claimType)
        {
            var requirement = new ClaimAuthorizationRequirement(claimType);

            _requirements.Add(requirement);
            return(this);
        }