public async Task <GetLoginQueryResult> HandleAsync( GetLoginQueryParameters parameters, CancellationToken ct = default) { var authenticated = await _loginRepository.AuthenticateUserAsync(parameters.UserName, parameters.Password); if (!authenticated) { return(null); } var token = _jwtAuthenticationManager.GetToken(parameters.UserName); return(new GetLoginQueryResult(token)); }