google: support AWS 3rd party credentials

Change-Id: I655b38f7fb8023866bb284c7ce80ab9888682e73
GitHub-Last-Rev: 648f0b3d45
GitHub-Pull-Request: golang/oauth2#471
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/287752
Reviewed-by: Cody Oss <codyoss@google.com>
Run-TryBot: Cody Oss <codyoss@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Tyler Bui-Palsulich <tbp@google.com>
Trust: Cody Oss <codyoss@google.com>
This commit is contained in:
Ryan Kohler
2021-02-01 16:26:06 +00:00
committed by Cody Oss
parent f9ce19ea30
commit 010130855d
5 changed files with 781 additions and 55 deletions

View File

@@ -56,7 +56,12 @@ func TestRetrieveFileSubjectToken(t *testing.T) {
tfc.CredentialSource = test.cs
t.Run(test.name, func(t *testing.T) {
out, err := tfc.parse(context.Background()).subjectToken()
base, err := tfc.parse(context.Background())
if err != nil {
t.Fatalf("parse() failed %v", err)
}
out, err := base.subjectToken()
if err != nil {
t.Errorf("Method subjectToken() errored.")
} else if test.want != out {