func NewBasicClient(config *Config, username, password string) (*Client, error) {
	if username == "" {
		return nil, ErrBasicAuthNoUsername
	}
	if password == "" {
		return nil, ErrBasicAuthNoPassword
	}
	authMethod := &authBasic{
		username: username,
		password: password,
	}
	client, err := newWinRMClient(config, authMethod)
	return &Client{
		Client: client,
		auth:   authMethod,
		config: config,
	}, err
}
NewBasicClient returns a Client with basic authentication using username and password.
This validates if a proper username and password is given.
It uses a authBasic implementation for authMethod.
package winrm
import (
	"bytes"
	"crypto/sha1"
	"crypto/tls"
	"crypto/x509"
	"encoding/hex"
	"encoding/pem"
	"fmt"
	"io"
	"net/http"
	"github.com/secrethub/secrethub-cli/internals/cli/ui"
	"github.com/secrethub/secrethub-go/internals/errio"
	"github.com/masterzen/winrm"
)
var (
	errWinRM = errio.Namespace("winrm")
	ErrCannotReachHost   = errWinRM.Code("cannot_reach_host").ErrorPref("Cannot reach the Client host: %s")
	ErrNoPeerCertificate = errWinRM.Code("no_peer_cert").Error("Could not get the peer certificate")
	ErrCertNotTrusted    = errWinRM.Code("peer_not_trusted").Error("Peer certificate is not trusted")
	ErrExecutingCommand  = errWinRM.Code("executing_command").ErrorPref("An error occurred while executing the command : %s")
	ErrCertAuthNoClientKey  = errWinRM.Code("no_client_key_certificate_authentication").Error("No client key was supplied to use for certificate authentication")
	ErrCertAuthNoClientCert = errWinRM.Code("no_client_certificate_certificate_authentication").Error("No client certificate was supplied to use for certificate authentication")
	ErrBasicAuthNoUsername = errWinRM.Code("no_username_basic_authentication").Error("No username was supplied to use for basic authentication")
	ErrBasicAuthNoPassword = errWinRM.Code("no_password_basic_authentication").Error("No password was supplied to use for basic authentication")
)
type Config struct {
	Host string
	Port int
	HTTPS bool
	SkipVerifyCert bool
	CaCert         []byte
}
type authMethod interface {
	getClientCert() ([]byte, []byte)
	getBasic() (string, string)
}
type authBasic struct {
	username string
	password string
}
func (ab *authBasic) getClientCert() ([]byte, []byte) {
	return []byte{}, []byte{}
}
func (ab *authBasic) getBasic() (string, string) {
	return ab.username, ab.password
}