SwiftClient.Cli.AuthManager.DoLogin C# (CSharp) Method

DoLogin() private method

private DoLogin ( ) : Task
return Task
        private async Task<bool> DoLogin()
        {
            bool ok = false;

            Console.WriteLine($"Connecting to {credentials.Endpoints.FirstOrDefault()} as {credentials.Username}");

            client = new Client(new SwiftAuthManager(credentials))
                .SetRetryCount(1)
                .SetLogger(new SwiftConsoleLog());

            var data = await client.Authenticate();

            if (data != null)
            {
                ok = true;
                Console.WriteLine($"Authentication token received from {data.StorageUrl}");
            }

            return ok;
        }
    }