示例#1
0
        public IActionResult GetApiKey()
        {
            if (HttpContext.User.Identity.AuthenticationType != TokenScope.UserLogin)
            {
                return(Unauthorized());
            }

            return(Ok(UserDatabase.GetApiToken(Int32.Parse(HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value))));
        }