public async Task <AuthenticateResponse> Handle(AuthenticateUserCommand request, CancellationToken cancellationToken) { var user = _userQuery.Get(request.AuthenticateRequest.Username); if (user == null || user.Count() == 0) { return(null); } return(new AuthenticateResponse(user.First(), GenerateJwtToken(user.First()))); }
public IActionResult GetAll() { var users = _userQuery.Get(string.Empty); return(Ok(users)); }