Skip to content

Commit

Permalink
chore(go): use maintained go-jose v4
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Jan 18, 2025
1 parent 422f0aa commit dbd8750
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ require (
github.com/fluxcd/pkg/ssa v0.43.0
github.com/fluxcd/source-controller/api v1.4.1
github.com/go-git/go-git/v5 v5.13.1
github.com/go-jose/go-jose/v4 v4.0.4
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/go-resty/resty/v2 v2.16.3
Expand Down Expand Up @@ -50,7 +51,6 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422
google.golang.org/grpc v1.69.4
google.golang.org/protobuf v1.36.3
gopkg.in/go-jose/go-jose.v2 v2.6.3
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.32.1
k8s.io/apiextensions-apiserver v0.32.1
Expand Down Expand Up @@ -81,7 +81,6 @@ require (
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
gopkg.in/go-jose/go-jose.v2 v2.6.3 h1:nt80fvSDlhKWQgSWyHyy5CfmlQr+asih51R8PTWNKKs=
gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
Expand Down
6 changes: 3 additions & 3 deletions pkg/testutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (

kustomizev2 "github.com/fluxcd/kustomize-controller/api/v1"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
"github.com/go-jose/go-jose/v4"
"github.com/go-jose/go-jose/v4/jwt"
"github.com/go-logr/logr"
"github.com/onsi/gomega"
"gopkg.in/go-jose/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2/jwt"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand Down Expand Up @@ -209,7 +209,7 @@ func MakeJWToken(t *testing.T, key *rsa.PrivateKey, email string, opts ...func(m
opt(extraClaims)
}

signed, err := jwt.Signed(signer).Claims(claims).Claims(extraClaims).CompactSerialize()
signed, err := jwt.Signed(signer).Claims(claims).Claims(extraClaims).Serialize()
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit dbd8750

Please sign in to comment.