From af22256c968e96452ca222801bf25ae1abb67e3e Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Wed, 23 Jul 2025 17:56:33 +0100 Subject: [PATCH] ... --- azure_oidc_test.go | 6 +++--- go.mod | 8 +++++++- go.sum | 10 ++++++++++ vendor/modules.txt | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/azure_oidc_test.go b/azure_oidc_test.go index 7ef8bb7..277250b 100644 --- a/azure_oidc_test.go +++ b/azure_oidc_test.go @@ -175,7 +175,7 @@ func TestAzureOIDCRegression(t *testing.T) { "sub": "user123", "email": "user@example.com", } - idToken, _ := createMockJWT(idTokenClaims) + idToken, _ := createAzureMockJWT(idTokenClaims) session.SetIDToken(idToken) // Mock the token verification to simulate Azure behavior @@ -318,8 +318,8 @@ func TestAzureOIDCRegression(t *testing.T) { }) } -// createMockJWT creates a basic JWT token for testing purposes -func createMockJWT(claims map[string]interface{}) (string, error) { +// createAzureMockJWT creates a basic JWT token for testing purposes +func createAzureMockJWT(claims map[string]interface{}) (string, error) { // For testing purposes, create a JWT with expired claims when needed // Use the test tokens infrastructure for most cases, but allow expired tokens for specific tests testTokens := NewTestTokens() diff --git a/go.mod b/go.mod index 0e2b4d9..68af272 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,13 @@ toolchain go1.23.1 require ( github.com/google/uuid v1.6.0 github.com/gorilla/sessions v1.3.0 + github.com/stretchr/testify v1.10.0 golang.org/x/time v0.7.0 ) -require github.com/gorilla/securecookie v1.1.2 // indirect +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gorilla/securecookie v1.1.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum index 2f28337..6ca8304 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -6,5 +8,13 @@ github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kX github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/sessions v1.3.0 h1:XYlkq7KcpOB2ZhHBPv5WpjMIxrQosiZanfoy1HLZFzg= github.com/gorilla/sessions v1.3.0/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/modules.txt b/vendor/modules.txt index ed56d4b..c867a1d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,3 +1,6 @@ +# github.com/davecgh/go-spew v1.1.1 +## explicit +github.com/davecgh/go-spew/spew # github.com/google/uuid v1.6.0 ## explicit github.com/google/uuid @@ -7,6 +10,17 @@ github.com/gorilla/securecookie # github.com/gorilla/sessions v1.3.0 ## explicit; go 1.20 github.com/gorilla/sessions +# github.com/pmezard/go-difflib v1.0.0 +## explicit +github.com/pmezard/go-difflib/difflib +# github.com/stretchr/testify v1.10.0 +## explicit; go 1.17 +github.com/stretchr/testify/assert +github.com/stretchr/testify/assert/yaml +github.com/stretchr/testify/require # golang.org/x/time v0.7.0 ## explicit; go 1.18 golang.org/x/time/rate +# gopkg.in/yaml.v3 v3.0.1 +## explicit +gopkg.in/yaml.v3