refac: removed 7 direct and 12 indirect go modules for custom code instead

This commit is contained in:
Florian Sylvain committed 2026-10-21 23:13:46 +02:00
1 parent cfcf108488
commit c68e9a7858
73 files changed
+2455 -428

No files matched your search

+3 -3
View File
@@ -11,11 +11,11 @@ import (
"testing"
"time"
"RenewCMS/api/pkg/authtoken"
"github.com/go-chi/chi/v5"
"github.com/go-chi/jwtauth/v5"
)
func newLoginLogoutCookieRouter(userRepo *mockUserRepo, mailRepo *mockMailRepo, token *jwtauth.JWTAuth) *chi.Mux {
func newLoginLogoutCookieRouter(userRepo *mockUserRepo, mailRepo *mockMailRepo, token *authtoken.Auth) *chi.Mux {
hasher := &stubHasher{}
loginHandler := auth.NewLoginHandler(
token,
@@ -32,7 +32,7 @@ func newLoginLogoutCookieRouter(userRepo *mockUserRepo, mailRepo *mockMailRepo,
func TestLoginSetsA24HourJwtCookieAndLogoutClearsIt(t *testing.T) {
validator.InitValidator()
token := jwtauth.New("HS256", []byte("test-secret"), nil)
token := authtoken.New([]byte("test-secret"))
t.Run("Login sets a jwt cookie that expires about 24 hours from now", func(t *testing.T) {
repo := newMockUserRepo()