Esempio n. 1
0
        public ClaimsPrincipal GetByUserName(string userName)
        {
            BLModel.UserIdentity user      = userQuery.GetBy(userName).ToBusinessModel <DLModel.UserIdentity, BLModel.UserIdentity>();
            ClaimsPrincipal      userClaim = new ClaimsPrincipal(user);

            return(userClaim);
        }
Esempio n. 2
0
        public ClaimsPrincipal GetBy(Guid apiKey)
        {
            BLModel.UserIdentity user      = apiUserQuery.GetBy(apiKey).ToBusinessModel <DLModel.UserIdentity, BLModel.UserIdentity>();
            ClaimsPrincipal      userClaim = new ClaimsPrincipal(user);

            return(userClaim);
        }
Esempio n. 3
0
        public IEnumerable <Claim> Resolve(DLModel.UserIdentity src, BLModel.UserIdentity des, IEnumerable <Claim> d, ResolutionContext context)
        {
            foreach (string c in src.Claims)
            {
                des.AddClaim(new Claim(c, c));
            }

            return(des.Claims);
        }