1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

bump easy pkg upgrades; drop Go 1.6 (no httptest.NewRequest)

This fixes a test w request signing due to a content-length:0 header from Go 1.8
This commit is contained in:
Jehiah Czebotar
2017-03-22 23:18:34 -04:00
parent 951b5f325b
commit b884b36f26
3 changed files with 5 additions and 10 deletions

View File

@ -599,8 +599,7 @@ type SignatureAuthenticator struct {
auth hmacauth.HmacAuth
}
func (v *SignatureAuthenticator) Authenticate(
w http.ResponseWriter, r *http.Request) {
func (v *SignatureAuthenticator) Authenticate(w http.ResponseWriter, r *http.Request) {
result, headerSig, computedSig := v.auth.AuthenticateRequest(r)
if result == hmacauth.ResultNoSignature {
w.Write([]byte("no signature received"))
@ -688,10 +687,7 @@ func (st *SignatureTest) MakeRequestWithExpectedKey(method, body, key string) {
if body != "" {
bodyBuf = ioutil.NopCloser(&fakeNetConn{reqBody: body})
}
req, err := http.NewRequest(method, "/foo/bar", bodyBuf)
if err != nil {
panic(err)
}
req := httptest.NewRequest(method, "/foo/bar", bodyBuf)
req.Header = st.header
state := &providers.SessionState{