зеркало из https://github.com/github/oauth2_proxy.git
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:
Родитель
951b5f325b
Коммит
b884b36f26
|
@ -1,6 +1,5 @@
|
|||
language: go
|
||||
go:
|
||||
- 1.6.4
|
||||
- 1.7.5
|
||||
- 1.8
|
||||
script:
|
||||
|
|
6
Godeps
6
Godeps
|
@ -1,7 +1,7 @@
|
|||
github.com/18F/hmacauth 1.0.1
|
||||
github.com/BurntSushi/toml 3883ac1ce943878302255f538fce319d23226223
|
||||
github.com/bitly/go-simplejson 3378bdcb5cebedcbf8b5750edee28010f128fe24
|
||||
github.com/mreiferson/go-options 33795234b6f327f1be2d78a541893012362a4e06
|
||||
github.com/BurntSushi/toml d94612f9fc140360834f9742158c70b5c5b5535b
|
||||
github.com/bitly/go-simplejson da1a8928f709389522c8023062a3739f3b4af419
|
||||
github.com/mreiferson/go-options 77551d20752b54535462404ad9d877ebdb26e53d
|
||||
github.com/bmizerany/assert e17e99893cb6509f428e1728281c2ad60a6b31e3
|
||||
gopkg.in/fsnotify.v1 v1.2.0
|
||||
golang.org/x/oauth2 04e1573abc896e70388bd387a69753c378d46466
|
||||
|
|
|
@ -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{
|
||||
|
|
Загрузка…
Ссылка в новой задаче