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); }
public abstract void PreSignInAspect(WeiXinPassport passport, ClaimsPrincipal pricipal);