Beispiel #1
0
        private async Task <(string username, string password)> ReadCredentials(HttpUploadClient client)
        {
            string username;
            string password;

            System.Console.WriteLine("Authentication required");
            do
            {
                System.Console.Write("Username: "******"Password: ");

                password = await MaskedReadLine();

                password = password?.Substring(0, Math.Min(password.Length, client.MaxPasswordLength));
            } while (string.IsNullOrWhiteSpace(password));

            return(username, password);
        }
Beispiel #2
0
 public ConsoleAuthenticator(HttpUploadClient client, ConsoleKeyListener keyListener)
 {
     _client      = client;
     _keyListener = keyListener;
 }
 public AuthenticationDialogViewModel(HttpUploadClient client)
 {
     _client = client;
 }