22 lines
593 B
Python
22 lines
593 B
Python
from datetime import timedelta
|
|
from redis import Redis
|
|
from pydantic import BaseModel
|
|
|
|
SECRET_KEY = "6323081020d8939e6385dd688a26cbca0bb34ed91997959167637319ba4f6f3e"
|
|
ALGORITHM = "HS256"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES = 30
|
|
|
|
|
|
redis_conn = Redis(host='localhost', port=6379, db=0, decode_responses=True)
|
|
|
|
|
|
class Settings(BaseModel):
|
|
authjwt_secret_key: str = SECRET_KEY
|
|
authjwt_denylist_enabled: bool = False
|
|
authjwt_denylist_token_checks: set = {"access", "refresh"}
|
|
access_expires: int = timedelta(minutes=15)
|
|
refresh_expires: int = timedelta(days=30)
|
|
|
|
|
|
settings = Settings()
|