-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Teju Nareddy <[email protected]>
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,17 +140,17 @@ func TestHttp1JWT(t *testing.T) { | |
wantedError: `{"code":404,"message":"The current request is not defined by this API."}`, | ||
}, | ||
{ | ||
desc: "Fail, without valid JWT token", | ||
desc: "Fail, with valid JWT token", | ||
httpMethod: "GET", | ||
httpPath: "/auth/info/googleservicecontrol.googleapis.com:443/", | ||
wantedError: `{"code":404,"message":"The current request is not defined by this API."}`, | ||
httpPath: "/auth/info/googlejwt", | ||
token: testdata.FakeBadToken, | ||
wantedError: "401 Unauthorized", | ||
}, | ||
{ | ||
desc: "Succeed, with valid JWT token, with allowed audience", | ||
httpMethod: "GET", | ||
httpPath: "/auth/info/auth0", | ||
token: testdata.FakeCloudTokenSingleAudience2, | ||
wantResp: `{"aud":"admin.cloud.goog","exp":4698318995,"iat":1544718995,"iss":"[email protected]","sub":"[email protected]"}`, | ||
desc: "Fail, without valid JWT token", | ||
httpMethod: "GET", | ||
httpPath: "/auth/info/googlejwt", | ||
wantedError: "401 Unauthorized", | ||
}, | ||
{ | ||
desc: "Fail, with valid JWT token, without allowed audience", | ||
|