public async Task <ApiResult <TokenSelectRequest> > Login(TokenRequest tokenRequest, CancellationToken cancellationToken)
        {
            //_logger.LogInformation("Login called with username: "******"password", StringComparison.OrdinalIgnoreCase))
            //    throw new Exception("OAuth flow is not password.");

            //var user = await _userManager.FindByNameAsync(tokenRequest.username);
            var response = await _loginHandler.Handle(tokenRequest, cancellationToken);

            return(response);
        }
예제 #2
0
        public async Task <LoginResponse> Login(LoginViewModel viewModel)
        {
            await _loginHandler.Handle(new LoginRequest(viewModel.Email, viewModel.Password, viewModel.RemoteIpAddress), _loginPresenter);

            return(_loginPresenter.data);
        }