git.iko.soy/typeable/oauth2-proxy
on master help sign in
Fixing linting errors: Making sure err is checked in azure_test and gofmt has been run
commit311f14c7ebac531c3c8aac7a0e56fe9874e45bfc authorleyshon <leyshon@gmail.com> dateThu 29 Aug 2019, 15:37 (7 years ago) parent0c541f6
2 files changed+6−5
providers/azure.go+4−4 providers/azure_test.go+2−1
providers/azure.go+4−4
@@ -1,13 +1,13 @@
11package providers
22
33import (
4+ "bytes"
5+ "encoding/json"
46 "errors"
57 "fmt"
8+ "io/ioutil"
69 "net/http"
710 "net/url"
8− "encoding/json"
9− "io/ioutil"
10− "bytes"
1111 "time"
1212
1313 "github.com/bitly/go-simplejson"
@@ -119,7 +119,7 @@ func (p *AzureProvider) Redeem(redirectURL, code string) (s *sessions.SessionSta
119119 if err != nil {
120120 return
121121 }
122−
122+
123123 s = &sessions.SessionState{
124124 AccessToken: jsonResponse.AccessToken,
125125 IDToken: jsonResponse.IDToken,
providers/azure_test.go+2−1
@@ -207,8 +207,9 @@ func TestAzureProviderGetEmailAddressIncorrectOtherMails(t *testing.T) {
207207
208208func TestAzureProviderRedeemReturnsIdToken(t *testing.T) {
209209 b := testAzureBackend(`{ "id_token": "testtoken1234", "expires_on": "1136239445", "refresh_token": "refresh1234" }`)
210− timestamp, err := time.Parse(time.RFC3339, "2006-01-02T22:04:05Z")
211210 defer b.Close()
211+ timestamp, err := time.Parse(time.RFC3339, "2006-01-02T22:04:05Z")
212+ assert.Equal(t, nil, err)
212213
213214 bURL, _ := url.Parse(b.URL)
214215 p := testAzureProvider(bURL.Host)