mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-05 04:56:11 +00:00
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:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user