tenseleyflow/shithub / 5be109c

Browse files

S35: wire ratelimit.Limiter into auth Deps

Authored by espadonne
SHA
5be109c456c3c730bcfd5a99e31bf9839492087c
Parents
337355f
Tree
3b64d2f

1 changed file

StatusFile+-
M internal/web/auth_wiring.go 2 0
internal/web/auth_wiring.gomodified
@@ -22,6 +22,7 @@ import (
2222
 	"github.com/tenseleyFlow/shithub/internal/auth/throttle"
2323
 	"github.com/tenseleyFlow/shithub/internal/infra/config"
2424
 	"github.com/tenseleyFlow/shithub/internal/infra/storage"
25
+	"github.com/tenseleyFlow/shithub/internal/ratelimit"
2526
 	usersdb "github.com/tenseleyFlow/shithub/internal/users/sqlc"
2627
 	apih "github.com/tenseleyFlow/shithub/internal/web/handlers/api"
2728
 	authh "github.com/tenseleyFlow/shithub/internal/web/handlers/auth"
@@ -112,6 +113,7 @@ func buildAuthHandlers(
112113
 			KeyLen:  32,
113114
 		},
114115
 		Limiter:                  throttle.NewLimiter(),
116
+		RateLimiter:              ratelimit.New(pool),
115117
 		RequireEmailVerification: cfg.Auth.RequireEmailVerification,
116118
 		SecretBox:                box,
117119
 		Audit:                    audit.NewRecorder(),