@@ -22,6 +22,7 @@ import ( |
| 22 | "github.com/tenseleyFlow/shithub/internal/auth/throttle" | 22 | "github.com/tenseleyFlow/shithub/internal/auth/throttle" |
| 23 | "github.com/tenseleyFlow/shithub/internal/infra/config" | 23 | "github.com/tenseleyFlow/shithub/internal/infra/config" |
| 24 | "github.com/tenseleyFlow/shithub/internal/infra/storage" | 24 | "github.com/tenseleyFlow/shithub/internal/infra/storage" |
| | 25 | + "github.com/tenseleyFlow/shithub/internal/ratelimit" |
| 25 | usersdb "github.com/tenseleyFlow/shithub/internal/users/sqlc" | 26 | usersdb "github.com/tenseleyFlow/shithub/internal/users/sqlc" |
| 26 | apih "github.com/tenseleyFlow/shithub/internal/web/handlers/api" | 27 | apih "github.com/tenseleyFlow/shithub/internal/web/handlers/api" |
| 27 | authh "github.com/tenseleyFlow/shithub/internal/web/handlers/auth" | 28 | authh "github.com/tenseleyFlow/shithub/internal/web/handlers/auth" |
@@ -112,6 +113,7 @@ func buildAuthHandlers( |
| 112 | KeyLen: 32, | 113 | KeyLen: 32, |
| 113 | }, | 114 | }, |
| 114 | Limiter: throttle.NewLimiter(), | 115 | Limiter: throttle.NewLimiter(), |
| | 116 | + RateLimiter: ratelimit.New(pool), |
| 115 | RequireEmailVerification: cfg.Auth.RequireEmailVerification, | 117 | RequireEmailVerification: cfg.Auth.RequireEmailVerification, |
| 116 | SecretBox: box, | 118 | SecretBox: box, |
| 117 | Audit: audit.NewRecorder(), | 119 | Audit: audit.NewRecorder(), |