示例#1
0
        public async Task <IActionResult> Login([FromBody] Host host)
        {
            var result = await _hostService.Login(host);

            var jwt = _jwtService.Generate(result.Id);

            Response.Cookies.Append("jwt", jwt, new CookieOptions
            {
                HttpOnly = true
            });
            return(Ok(new { message = "success" }));
        }