You've already forked oauth2-proxy
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:
@ -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{
|
||||
|
Reference in New Issue
Block a user