Switch from gopkg.in/square/go-jose.v2 to github.com/go-jose/go-jose/v3

Made the switch wherever possible, but since fosite still uses the old
gopkg.in/square/go-jose.v2 there was one test where we still need to use
it as a direct dependency.
This commit is contained in:
Ryan Richard
2023-12-04 11:05:12 -08:00
parent 8296093beb
commit ca5ad85bbd
18 changed files with 27 additions and 27 deletions

View File

@@ -10,8 +10,8 @@ import (
"testing"
"time"
"github.com/go-jose/go-jose/v3/jwt"
"github.com/stretchr/testify/require"
jwtpkg "gopkg.in/square/go-jose.v2/jwt"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -209,10 +209,10 @@ func safeDerefStringPtr(s *string) string {
return *s
}
func getJWTSubAndGroupsClaims(t *testing.T, jwt string) (string, []string) {
func getJWTSubAndGroupsClaims(t *testing.T, jwtToken string) (string, []string) {
t.Helper()
token, err := jwtpkg.ParseSigned(jwt)
token, err := jwt.ParseSigned(jwtToken)
require.NoError(t, err)
var claims struct {