Documentation
¶
Index ¶
Constants ¶
View Source
const ( MsgAuth string = "auth" AlgMD5 string = "MD5" AlgSha256 string = "SHA-256" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
Username string
Password string
Transport http.RoundTripper
// ChallengeWithoutBody sends the unauthenticated challenge request with an
// empty body. Set it when every request to the host requires digest
// authentication. A server rejects an unauthenticated request before it reads
// the body, and a body still in flight when the connection closes fails with
// "write: broken pipe". The authenticated request always carries the full body.
// The package does not implement qop=auth-int.
ChallengeWithoutBody bool
}
Transport is an implementation of http.RoundTripper that takes care of http digest authentication.
func NewTransport ¶
NewTransport creates a new digest transport using the http.DefaultTransport.
func NewTransportWithHTTPRoundTripper ¶ added in v1.1.0
func NewTransportWithHTTPRoundTripper(username, password string, transport http.RoundTripper) *Transport
NewTransportWithHTTPRoundTripper creates a new digest transport using the supplied http.RoundTripper interface.
func NewTransportWithHTTPTransport ¶ added in v1.0.5
NewTransportWithHTTPTransport creates a new digest transport using the supplied http.Transport.
Click to show internal directories.
Click to hide internal directories.