From d8c0f204dfb3ad17692b9ce489f2814a6f8a8620 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 20 Jan 2024 12:18:22 +0100 Subject: [PATCH] test --- basicAuth.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/basicAuth.go b/basicAuth.go index 819707a..5dab829 100644 --- a/basicAuth.go +++ b/basicAuth.go @@ -12,6 +12,11 @@ type BasicAuth struct { pw string } +// NewDigestAuth creates a new instance of our Digest Authenticator +func NewBasicAuth(login, secret string) (Authenticator, error) { + return &BasicAuth{user: login, pw: secret}, nil +} + // Authorize the current request func (b *BasicAuth) Authorize(c *http.Client, rq *http.Request, path string) error { rq.SetBasicAuth(b.user, b.pw)