public UserInfo GetUserInfo(HttpRequest request) { string token = request.Cookies[TOKEN_KEY]; if (string.IsNullOrEmpty(token)) { return(null); } try { return(GetUserInfo(token)); } catch (Exception e_) { HttpApiServer server = request.Server; if (server.EnableLog(LogType.Warring)) { server.Log(LogType.Warring, null, $"{request.RemoteIPAddress} get token error {e_.Message}"); } return(null); } }