public async Task <bool> Login(string email, string password) { if (!await CheckPassword(email, password)) { return(false); } var authenticator = _authenticatorProvider.Provide(HttpContext); await authenticator.SignIn(email); return(true); }
public async Task Buy(int stockId, int sharesCount, decimal maxShareValue) { var authenticator = _authenticatorProvider.Provide(HttpContext); var account = await _accountService.GetAccountByEmail("*****@*****.**"); await _stockService.BuyShares(account.Id, stockId, sharesCount, maxShareValue); }