oauth2: use a JSON struct types instead of empty interface maps

Change-Id: Ifd66ea35c15dbd14acca0c945b533ec755de12e4
Reviewed-on: https://go-review.googlesource.com/1872
Reviewed-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
Brad Fitzpatrick
2014-12-19 16:20:30 +11:00
committed by Brad Fitzpatrick
parent 9abe144dd5
commit f5b40b26f1
4 changed files with 68 additions and 48 deletions

View File

@@ -117,10 +117,10 @@ func TestJWTFetch_BadResponseType(t *testing.T) {
TokenURL: ts.URL,
}
tok, err := conf.TokenSource(NoContext, nil).Token()
if err != nil {
t.Fatal(err)
}
if tok.AccessToken != "" {
t.Errorf("Unexpected access token, %#v.", tok.AccessToken)
if err == nil {
t.Error("got a token; expected error")
if tok.AccessToken != "" {
t.Errorf("Unexpected access token, %#v.", tok.AccessToken)
}
}
}