added nats + worker modules

This commit is contained in:
2025-12-19 09:59:00 -05:00
parent b457c74d49
commit ca758cc708
12 changed files with 559 additions and 31 deletions

View File

@@ -2,6 +2,7 @@ package auth0
import (
"context"
"log/slog"
"net/http/httptest"
"strings"
"sync"
@@ -12,12 +13,6 @@ import (
"git.citc.tech/go/web/auth/auth0/authenticator"
)
type mockLogger struct{}
func (m *mockLogger) Debug(msg string, args ...any) {}
func (m *mockLogger) Info(msg string, args ...any) {}
func (m *mockLogger) Error(msg string, args ...any) {}
type mockSessionManager struct {
store map[string]any
mu sync.RWMutex
@@ -65,7 +60,7 @@ func TestHandleLogic(t *testing.T) {
}
d := &deps{
log: &mockLogger{},
log: slog.Default(),
sessions: mockSessions,
auth: &authenticator.Authenticator{
Config: oauth2.Config{