fix linter errors caused by the upgrade to go-jose/v4 v4.1.8

Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
Ryan Richard committed 2026-11-03 11:28:53 -08:00
1 parent 250b6a52f2
commit 792ebc4537
4 files changed
+6 -6

No files matched your search

@@ -1916,7 +1916,7 @@ func TestTokenEndpointTokenExchange(t *testing.T) { // tests for grant_type "urn
// Parse the returned token.
actualIDToken := parsedResponseBody["access_token"].(string)
parsedJWT, err := jose.ParseSigned(actualIDToken, []jose.SignatureAlgorithm{jose.ES256})
parsedJWT, err := jose.ParseSignedCompact(actualIDToken, []jose.SignatureAlgorithm{jose.ES256})
require.NoError(t, err)
var tokenClaims map[string]any
require.NoError(t, json.Unmarshal(parsedJWT.UnsafePayloadWithoutVerification(), &tokenClaims))
@@ -1,4 +1,4 @@
// Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package oidctestutil
@@ -24,7 +24,7 @@ func newStaticKeySet(publicKey crypto.PublicKey) coreosoidc.KeySet {
}
func (s *staticKeySet) VerifySignature(_ context.Context, jwt string) ([]byte, error) {
jws, err := jose.ParseSigned(jwt, []jose.SignatureAlgorithm{jose.ES256})
jws, err := jose.ParseSignedCompact(jwt, []jose.SignatureAlgorithm{jose.ES256})
if err != nil {
return nil, fmt.Errorf("oidc: malformed jwt: %w", err)
}
+1 -1
View File
@@ -1532,7 +1532,7 @@ func mockVerifier() *coreosoidc.IDTokenVerifier {
mockKeySet.EXPECT().VerifySignature(gomock.Any(), gomock.Any()).
AnyTimes().
DoAndReturn(func(ctx context.Context, jwt string) ([]byte, error) {
jws, err := jose.ParseSigned(jwt, []jose.SignatureAlgorithm{jose.ES256, jose.RS256})
jws, err := jose.ParseSignedCompact(jwt, []jose.SignatureAlgorithm{jose.ES256, jose.RS256})
if err != nil {
return nil, err
}
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
// Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package integration
@@ -194,7 +194,7 @@ func TestCLILoginOIDC_Browser(t *testing.T) {
// Assert some properties about the token, which should be a valid JWT.
require.NotEmpty(t, credOutput.Status.Token)
jws, err := jose.ParseSigned(credOutput.Status.Token, []jose.SignatureAlgorithm{jose.ES256, jose.RS256})
jws, err := jose.ParseSignedCompact(credOutput.Status.Token, []jose.SignatureAlgorithm{jose.ES256, jose.RS256})
require.NoError(t, err)
claims := map[string]any{}
require.NoError(t, json.Unmarshal(jws.UnsafePayloadWithoutVerification(), &claims))