summaryrefslogtreecommitdiff
path: root/app/middleware/id_token_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/middleware/id_token_test.go')
-rw-r--r--app/middleware/id_token_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/middleware/id_token_test.go b/app/middleware/id_token_test.go
index 4f26cdf..607c028 100644
--- a/app/middleware/id_token_test.go
+++ b/app/middleware/id_token_test.go
@@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/xlgmokha/x/pkg/log"
"github.com/xlgmokha/x/pkg/x"
- "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/key"
+ xcfg "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg"
"gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/oidc"
"gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/test"
"gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/web"
@@ -47,7 +47,7 @@ func TestIDToken(t *testing.T) {
encoded := x.Must(tokens.ToBase64String())
server := middleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- token := key.IDToken.From(r.Context())
+ token := xcfg.IDToken.From(r.Context())
require.NotNil(t, token)
assert.Equal(t, user.Subject, token.Subject)
@@ -68,7 +68,7 @@ func TestIDToken(t *testing.T) {
t.Run("when an invalid session cookie is provided", func(t *testing.T) {
t.Run("forwards the request", func(t *testing.T) {
server := middleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- require.Nil(t, key.IDToken.From(r.Context()))
+ require.Nil(t, xcfg.IDToken.From(r.Context()))
w.WriteHeader(http.StatusTeapot)
}))
@@ -87,7 +87,7 @@ func TestIDToken(t *testing.T) {
t.Run("when no cookies are provided", func(t *testing.T) {
t.Run("forwards the request", func(t *testing.T) {
server := middleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- require.Nil(t, key.IDToken.From(r.Context()))
+ require.Nil(t, xcfg.IDToken.From(r.Context()))
w.WriteHeader(http.StatusTeapot)
}))