package constants

import "time"

// Misc constants.
const (
	// Password values
	PasswordMinLength = 8
	BcryptCost        = 14

	SessionCookieName     = "session_id"
	SessionRedisKeyFormat = "sessions/%s"
	SessionCookieMaxAge   = 60 * 60 * 24 * 30

	// Rate limits
	RateLimitRedisKey        = "rate-limit/%s/%s" // namespace, id
	LoginRateLimitWindow     = 1 * time.Hour
	LoginRateLimit           = 10 // 10 failed login attempts = locked for full hour
	LoginRateLimitCooldownAt = 3  // 3 failed attempts = start throttling
	LoginRateLimitCooldown   = 30 * time.Second
)
