示例#1
0
        public async Task <string> getUserSession(bool enforceRefresh = false)
        {
            if (enforceRefresh)
            {
                return(await renewUserSession());
            }

            string session = CookiesHandler.GetKTASession(HttpContext);

            if (session != null)
            {
                return(await KtaService.ValidateSessionAsync(session) ?
                       session : await renewUserSession());
            }
            else
            {
                return(await renewUserSession());
            }
        }