Add Redis-based one-time download token support
Integrate Redis as a backend for one-time download token validation, with in-memory fallback. Added RedisManager for connection lifecycle, TokenStore for atomic token usage checks, and related configuration via environment variables. Updated download flow to ensure tokens are single-use, and improved API robustness for batch operations. Updated dependencies to include redis and cachetools.
This commit is contained in:
@@ -9,6 +9,7 @@ dependencies = [
|
||||
"aiohttp>=3.13.2",
|
||||
"aiosqlite==0.22.1",
|
||||
"argon2-cffi>=25.1.0",
|
||||
"cachetools>=6.2.4",
|
||||
"fastapi[standard]>=0.122.0",
|
||||
"httpx>=0.27.0",
|
||||
"itsdangerous>=2.2.0",
|
||||
@@ -21,6 +22,7 @@ dependencies = [
|
||||
"pytest-xdist>=3.5.0",
|
||||
"python-dotenv>=1.2.1",
|
||||
"python-multipart>=0.0.20",
|
||||
"redis[hiredis]>=7.1.0",
|
||||
"sqlalchemy>=2.0.44",
|
||||
"sqlmodel>=0.0.27",
|
||||
"uvicorn>=0.38.0",
|
||||
|
||||
Reference in New Issue
Block a user