Update unit test malformed jwt error messages due to https://github.com/coreos/go-oidc/compare/v3.14.1...v3.15.0

This commit is contained in:
Joshua Casey
2025-07-30 09:21:18 -05:00
parent cd3f55c019
commit 17cb4c2ee5
2 changed files with 4 additions and 4 deletions

View File

@@ -187,7 +187,7 @@ func TestProviderConfig(t *testing.T) {
{
name: "invalid ID token",
returnIDTok: "invalid-jwt",
wantErr: "received invalid ID token: oidc: malformed jwt: oidc: malformed jwt, expected 3 parts got 1",
wantErr: "received invalid ID token: oidc: malformed jwt: go-jose/go-jose: compact JWS format must have three parts",
},
{
name: "invalid access token hash",
@@ -1009,7 +1009,7 @@ func TestProviderConfig(t *testing.T) {
requireIDToken: true,
rawClaims: []byte(`{"userinfo_endpoint": "not-empty"}`),
userInfo: forceUserInfoWithClaims("some-other-subject", `{"name": "Pinny TheSeal", "sub": "some-other-subject"}`),
wantErr: "received invalid ID token: oidc: malformed jwt: oidc: malformed jwt, expected 3 parts got 1",
wantErr: "received invalid ID token: oidc: malformed jwt: go-jose/go-jose: compact JWS format must have three parts",
},
{
name: "invalid nonce",
@@ -1145,7 +1145,7 @@ func TestProviderConfig(t *testing.T) {
name: "invalid ID token",
authCode: "valid",
returnIDTok: "invalid-jwt",
wantErr: "received invalid ID token: oidc: malformed jwt: oidc: malformed jwt, expected 3 parts got 1",
wantErr: "received invalid ID token: oidc: malformed jwt: go-jose/go-jose: compact JWS format must have three parts",
},
{
name: "invalid access token hash",

View File

@@ -2582,7 +2582,7 @@ func TestLogin(t *testing.T) { //nolint:gocyclo
`"level"=4 "msg"="Pinniped: Performing RFC8693 token exchange" "requestedAudience"="test-audience-produce-invalid-jwt"`,
`"level"=4 "msg"="Pinniped: Performing OIDC discovery" "issuer"="` + successServer.URL + `"`,
},
wantErr: `failed to exchange token: received invalid JWT: oidc: malformed jwt: oidc: malformed jwt, expected 3 parts got 1`,
wantErr: `failed to exchange token: received invalid JWT: oidc: malformed jwt: go-jose/go-jose: compact JWS format must have three parts`,
},
{
name: "with requested audience, session cache hit with valid access token, ID token has wrong audience, and token exchange request succeeds",