예제 #1
0
        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())));
        }
예제 #2
0
        public IActionResult GetAll()
        {
            var users = _userQuery.Get(string.Empty);

            return(Ok(users));
        }