示例#1
0
        public ClientReply Refresh()
        {
            var id = HttpContext.GetUserIDFromJWTHeader();

            Console.WriteLine($"{id} has requested refresh token");
            var sessionKey = _sessionKeyManager.RefreshSessionKey(id);

            if (string.IsNullOrEmpty(sessionKey))
            {
                return(new ClientReply
                {
                    token = "",
                    Error = (int)ErrorMessage.Unknown
                });
            }
            return(new ClientReply {
                token = sessionKey, Error = (int)ErrorMessage.NoError
            });
        }
 public string refreshToken(string UserID)
 {
     return(sessionKeyManager.RefreshSessionKey(UserID));
 }