Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f073d3021d | ||
|
d8c0f204df | ||
|
45e36d9254 | ||
|
526c74ad21 | ||
|
1dc1a2b378 | ||
|
e3bd2a5fb2 | ||
|
331e1f8e16 | ||
|
d59e787694 | ||
|
42ddb5a83e |
@ -11,6 +11,11 @@ type BasicAuth struct {
|
|||||||
pw string
|
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
|
// Authorize the current request
|
||||||
func (b *BasicAuth) Authorize(c *http.Client, rq *http.Request, path string) error {
|
func (b *BasicAuth) Authorize(c *http.Client, rq *http.Request, path string) error {
|
||||||
rq.SetBasicAuth(b.user, b.pw)
|
rq.SetBasicAuth(b.user, b.pw)
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
d "github.com/studio-b12/gowebdav"
|
d "git.siteop.biz/shoopea/gowebdav"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user