Exemple #1
0
        public async Task <String> Handle(GetLoginQuery request, CancellationToken cancellationToken)
        {
            var user = await _userRepository.Login(request.Email, request.Password);

            if (user != null)
            {
                string token = await _tokenHelper.CreateJWTAsync(user);

                return(token);
            }
            else
            {
                return(string.Empty);
            }
        }