updates go-jose to new updated repo due to migration

- updated from /square/go-jose to /go-jose/go-jose
- updates to v2.6.3
- addresses CVE-2016-9123 and CVE-2016-9121
- fixes tests that were adjusting for a 1s delay
This commit is contained in:
Andrew Martinez 2024-08-02 16:38:26 -04:00 committed by Andrew
parent e8769ce896
commit 4f2e5bd88b
33 changed files with 36 additions and 36 deletions

View file

@ -4,7 +4,7 @@ import (
"context"
"net/http"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
httphelper "github.com/zitadel/oidc/v2/pkg/http"
"github.com/zitadel/oidc/v2/pkg/oidc"

View file

@ -9,7 +9,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
"github.com/zitadel/oidc/v2/pkg/op"

View file

@ -4,7 +4,7 @@ import (
"context"
"net/http"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
httphelper "github.com/zitadel/oidc/v2/pkg/http"
)

View file

@ -9,7 +9,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
"github.com/zitadel/oidc/v2/pkg/op"

View file

@ -6,7 +6,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/gorilla/schema"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
"github.com/zitadel/oidc/v2/pkg/op"

View file

@ -9,7 +9,7 @@ import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
jose "gopkg.in/square/go-jose.v2"
jose "gopkg.in/go-jose/go-jose.v2"
)
// MockDiscoverStorage is a mock of DiscoverStorage interface.

View file

@ -8,7 +8,7 @@ import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
jose "gopkg.in/square/go-jose.v2"
jose "gopkg.in/go-jose/go-jose.v2"
)
// MockSigningKey is a mock of SigningKey interface.

View file

@ -12,7 +12,7 @@ import (
gomock "github.com/golang/mock/gomock"
oidc "github.com/zitadel/oidc/v2/pkg/oidc"
op "github.com/zitadel/oidc/v2/pkg/op"
jose "gopkg.in/square/go-jose.v2"
jose "gopkg.in/go-jose/go-jose.v2"
)
// MockStorage is a mock of Storage interface.

View file

@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
"golang.org/x/text/language"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
httphelper "github.com/zitadel/oidc/v2/pkg/http"
"github.com/zitadel/oidc/v2/pkg/oidc"

View file

@ -214,7 +214,7 @@ func TestRoutes(t *testing.T) {
wantCode: http.StatusOK,
contains: []string{
`{"access_token":"`,
`","issued_token_type":"urn:ietf:params:oauth:token-type:refresh_token","token_type":"Bearer","expires_in":299,"scope":"openid offline_access","refresh_token":"`,
`","issued_token_type":"urn:ietf:params:oauth:token-type:refresh_token","token_type":"Bearer","expires_in":300,"scope":"openid offline_access","refresh_token":"`,
},
},
{
@ -227,7 +227,7 @@ func TestRoutes(t *testing.T) {
"scope": oidc.SpaceDelimitedArray{oidc.ScopeOpenID, oidc.ScopeOfflineAccess}.Encode(),
},
wantCode: http.StatusOK,
contains: []string{`{"access_token":"`, `","token_type":"Bearer","expires_in":299}`},
contains: []string{`{"access_token":"`, `","token_type":"Bearer","expires_in":300}`},
},
{
// This call will fail. A successfull test is already
@ -298,7 +298,7 @@ func TestRoutes(t *testing.T) {
contains: []string{
`{"access_token":"`,
`","token_type":"Bearer","refresh_token":"`,
`","expires_in":299,"id_token":"`,
`","expires_in":300,"id_token":"`,
},
},
{

View file

@ -3,7 +3,7 @@ package op
import (
"errors"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
var ErrSignerCreationFailed = errors.New("signer creation failed")

View file

@ -5,7 +5,7 @@ import (
"errors"
"time"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
)

View file

@ -6,7 +6,7 @@ import (
"fmt"
"time"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
)