public async Task <IActionResult> Token([FromBody] TokenViewModel viewModel)
        {
            var account = await _jwtBearer.SignInByPassword(viewModel);

            if (account.IsValid)
            {
                return(WriteToken(account.Result));
            }
            return(BadRequest(account.ErrorsList));
        }
        public async Task Token([FromBody] TokenViewModel viewModel)
        {
            var account = await _jwtBearer.SignInByPassword(viewModel);

            if (account.IsValid)
            {
                await HttpContext.WriteToken(account.Result);

                return;
            }
            await HttpContext.BadRequest(account.ErrorsList);
        }