常用方法
常用方法
常用方法
常用方法
/// <summary> /// Get UserInfo from JWT token /// </summary> /// <param name="context"></param> /// <returns></returns> private bool GetUserModel(AuthorizationFilterContext context) { var jwt = JWT.GetUserInfoFromContext(context.HttpContext.User); if (jwt == null) { return(false); } _userModel = jwt; return(true); }