コード例 #1
0
        public static TestClaimsProvider WithMemberClaims()
        {
            var provider = new TestClaimsProvider();

            provider.Claims.Add(new Claim("Id", DefaultValues.MemberId.ToString()));
            provider.Claims.Add(new Claim(ClaimTypes.Email, "*****@*****.**"));
            provider.Claims.Add(new Claim(ClaimTypes.Role, "Member"));

            return(provider);
        }
コード例 #2
0
        public static TestClaimsProvider WithAdminClaims()
        {
            var provider = new TestClaimsProvider();

            provider.Claims.Add(new Claim("Id", DefaultValues.AdminId.ToString()));
            provider.Claims.Add(new Claim(ClaimTypes.Email, "*****@*****.**"));
            provider.Claims.Add(new Claim(ClaimTypes.Role, "Admin"));

            return(provider);
        }