From 39d2f28a40ea7060575986dcf48fe35569103914 Mon Sep 17 00:00:00 2001 From: Phil Taprogge Date: Thu, 9 May 2019 10:14:01 +0100 Subject: [PATCH] Add comment; update changelog --- CHANGELOG.md | 1 + oauthproxy_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 564f1d5..3893abd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Changes since v3.2.0 +- [#146](https://github.com/pusher/oauth2_proxy/pull/146) Use full email address as `User` if the auth response did not contains a `User` field (@gargath) - [#144](https://github.com/pusher/oauth2_proxy/pull/144) Use GO 1.12 for ARM builds (@kskewes) - [#142](https://github.com/pusher/oauth2_proxy/pull/142) ARM Docker USER fix (@kskewes) - [#52](https://github.com/pusher/oauth2_proxy/pull/52) Logging Improvements (@MisterWil) diff --git a/oauthproxy_test.go b/oauthproxy_test.go index 8409cd5..65a8fe1 100644 --- a/oauthproxy_test.go +++ b/oauthproxy_test.go @@ -334,6 +334,8 @@ func TestBasicAuthPassword(t *testing.T) { rw = httptest.NewRecorder() proxy.ServeHTTP(rw, req) + // The username in the basic auth credentials is expected to be equal to the email address from the + // auth response, so we use the same variable here. expectedHeader := "Basic " + base64.StdEncoding.EncodeToString([]byte(emailAddress+":"+opts.BasicAuthPassword)) assert.Equal(t, expectedHeader, rw.Body.String()) providerServer.Close()