remove all debug

This commit is contained in:
shoopea
2024-01-20 12:33:07 +01:00
parent d8c0f204df
commit f073d3021d
4 changed files with 0 additions and 74 deletions

View File

@@ -2,7 +2,6 @@ package gowebdav
import (
"fmt"
"log"
"net/http"
)
@@ -20,13 +19,11 @@ func NewBasicAuth(login, secret string) (Authenticator, error) {
// Authorize the current request
func (b *BasicAuth) Authorize(c *http.Client, rq *http.Request, path string) error {
rq.SetBasicAuth(b.user, b.pw)
log.Printf("BasicAuth.Authorize : SetBasicAuth(%s, %s)", b.user, b.pw)
return nil
}
// Verify verifies if the authentication
func (b *BasicAuth) Verify(c *http.Client, rs *http.Response, path string) (redo bool, err error) {
log.Printf("BasicAuth.Verify : StatusCode = %d", rs.StatusCode)
if rs.StatusCode == 401 {
err = NewPathError("Authorize", path, rs.StatusCode)
}
@@ -35,19 +32,16 @@ func (b *BasicAuth) Verify(c *http.Client, rs *http.Response, path string) (redo
// Close cleans up all resources
func (b *BasicAuth) Close() error {
log.Printf("BasicAuth.Close")
return nil
}
// Clone creates a Copy of itself
func (b *BasicAuth) Clone() Authenticator {
log.Printf("BasicAuth.Clone")
// no copy due to read only access
return b
}
// String toString
func (b *BasicAuth) String() string {
log.Printf("BasicAuth.String")
return fmt.Sprintf("BasicAuth login: %s", b.user)
}