fix: missing expiration_time field isn't a problem for executables

Change-Id: Ib19e3d9dcd8a4c41afebf2a1fb97429617eef86b
GitHub-Last-Rev: 96eb2344de
GitHub-Pull-Request: golang/oauth2#576
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/418434
Reviewed-by: Leo Siracusa <leosiracusa@google.com>
Run-TryBot: Cody Oss <codyoss@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cody Oss <codyoss@google.com>
This commit is contained in:
Ryan Kohler
2022-08-05 21:01:37 +00:00
committed by Cody Oss
parent 128564f695
commit 8227340efa
2 changed files with 18 additions and 18 deletions

View File

@@ -388,19 +388,6 @@ var failureTests = []struct {
expectedErr: missingFieldError(executableSource, "token_type"),
},
{
name: "Missing Expiration",
testEnvironment: testEnvironment{
envVars: executablesAllowed,
jsonResponse: &executableResponse{
Success: Bool(true),
Version: 1,
TokenType: "urn:ietf:params:oauth:token-type:jwt",
},
},
expectedErr: missingFieldError(executableSource, "expiration_time"),
},
{
name: "Token Expired",
testEnvironment: testEnvironment{
@@ -564,6 +551,19 @@ var successTests = []struct {
},
},
},
{
name: "Missing Expiration",
testEnvironment: testEnvironment{
envVars: executablesAllowed,
jsonResponse: &executableResponse{
Success: Bool(true),
Version: 1,
TokenType: "urn:ietf:params:oauth:token-type:jwt",
IdToken: "tokentokentoken",
},
},
},
}
func TestRetrieveExecutableSubjectTokenSuccesses(t *testing.T) {