Documentation ¶
Overview ¶
Package digestauth is a minimal implementation of the HTTP digest access authentication protocol.
Basic example:
package main import ( "fmt" "github.com/cet001/digestauth" ) client := digestauth.NewDigestAuthClient(nil) response, err := client.Get("http://john:secret-passwd@example.com/some/resource")
Some major limitations:
- Currently only supports HTTP GET
- Username and password must be provided as part of the URL (e.g. "http://my-username:my-passwd@myhost.com")
- Does not support the "auth-int" QOP directive
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DigestAuthClient ¶
type DigestAuthClient struct {
// contains filtered or unexported fields
}
DigestAuthClient is an HTTP client that implements a subset of the HTTP Digest Access Authentication protocol.
See:
func NewDigestAuthClient ¶
func NewDigestAuthClient(client *http.Client) *DigestAuthClient
Creates a new DigestAuthClient that uses the provided http.Client object to send HTTP requests. If client is nil, a new http.Client is implicity created.
Click to show internal directories.
Click to hide internal directories.