Merge pull request #1 from tatsumi33/fix-httpresponse-errorcheck

Add error check for HTTP response
tree: 6ec48b67612b591b6b5d0b3a00fb864f5fa7fa0e
  1. authorization.go
  2. digest_auth_client.go
  5. www_authenticate.go


Golang Http Digest Authentication Client

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


// import
import dac ""

// 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


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