Esempio n. 1
0
        public static WeiXinPassport GetWeiXinPassport(this ClaimsPrincipal User)
        {
            WeiXinPassport passport = new WeiXinPassport();

            passport.UserName = User.Claims.FirstOrDefault(m => m.Type == CissyClaimTypes.UserName)?.Value;
            passport.UserId   = User.Claims.FirstOrDefault(m => m.Type == CissyClaimTypes.UserId)?.Value;
            passport.NickName = User.Claims.FirstOrDefault(m => m.Type == CissyClaimTypes.NickName)?.Value;
            passport.OpenId   = User.Claims.FirstOrDefault(m => m.Type == CissyClaimTypes.WeiXinOpenId)?.Value;
            passport.UnionId  = User.Claims.FirstOrDefault(m => m.Type == CissyClaimTypes.WeiXinUnionId)?.Value;
            return(passport);
        }
Esempio n. 2
0
 public abstract void PreSignInAspect(WeiXinPassport passport, ClaimsPrincipal pricipal);