digest_auth_client

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2016 License: BSD-2-Clause Imports: 12 Imported by: 5

README

go-http-digest-auth-client

Golang Http Digest Authentication Client

This client implements RFC7616 HTTP Digest Access Authentication and by now the basic features should work.

Usage

// import
import dac "github.com/xinsnake/go-http-digest-auth-client"

// create a new digest authentication request
dr := dac.NewRequest(username, password, method, uri, payload)
response1, err := dr.Execute()

// check error, get response

// reuse the existing digest authentication request so no extra request is needed
dr.UpdateRequest(username, password, method, uri, payload)
response2, err := dr.Execute()

// check error, get response

Todos

  • Unit testing
  • Implement encoded username username*
  • Logging and debugging message

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DigestRequest

type DigestRequest struct {
	Body     string
	Method   string
	Password string
	Uri      string
	Username string
	Auth     *authorization
	Wa       *wwwAuthenticate
}

func NewRequest

func NewRequest(username string, password string, method string, uri string, body string) DigestRequest

func (*DigestRequest) Execute

func (dr *DigestRequest) Execute() (resp *http.Response, err error)

func (*DigestRequest) UpdateRequest

func (dr *DigestRequest) UpdateRequest(username string,
	password string, method string, uri string, body string) *DigestRequest

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL