mirror of
https://github.com/mgeeky/decode-spam-headers.git
synced 2026-10-26 19:11:26 +01:00
MAESTRO: add captcha verification flow
This commit is contained in:
1 parent
28658c4a87
commit
98f2f8a656
8 files changed
+352
-6
No files matched your search
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import secrets
|
||||
from functools import lru_cache
|
||||
from typing import Any
|
||||
|
||||
@@ -30,6 +31,20 @@ class Settings(BaseSettings):
|
||||
ge=1,
|
||||
description="Rate limit window in seconds.",
|
||||
)
|
||||
captcha_secret: str = Field(
|
||||
default_factory=lambda: secrets.token_urlsafe(32),
|
||||
description="Secret used to sign CAPTCHA bypass tokens.",
|
||||
)
|
||||
captcha_challenge_ttl_seconds: int = Field(
|
||||
default=300,
|
||||
ge=60,
|
||||
description="Seconds until CAPTCHA challenges expire.",
|
||||
)
|
||||
captcha_bypass_ttl_seconds: int = Field(
|
||||
default=300,
|
||||
ge=60,
|
||||
description="Seconds until CAPTCHA bypass tokens expire.",
|
||||
)
|
||||
analysis_timeout_seconds: int = Field(
|
||||
default=30,
|
||||
ge=1,
|
||||
|
||||
Reference in new issue
Block a user