replace the custom ratelimiter strategy with a fixed window

This commit is contained in:
Gani Georgiev
2026-03-10 22:31:24 +02:00
parent 29c2e209f4
commit 70d8d1ee9d
5 changed files with 32 additions and 50 deletions

View File

@@ -45,6 +45,8 @@ func ParseJWT(token string, verificationKey string) (jwt.MapClaims, error) {
// NewJWT generates and returns new HS256 signed JWT.
func NewJWT(payload jwt.MapClaims, signingKey string, duration time.Duration) (string, error) {
claims := jwt.MapClaims{
// @todo consider with the refactoring to either remove the
// duration argument or make it always take precedent?
"exp": time.Now().Add(duration).Unix(),
}