Demo
This commit is contained in:
0
app/core/__init__.py
Normal file
0
app/core/__init__.py
Normal file
16
app/core/config.py
Normal file
16
app/core/config.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from pathlib import Path
|
||||
from pydantic import BaseModel
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
BASE_DIR = Path(__file__).parent.parent.parent
|
||||
|
||||
class AuthJWT(BaseModel):
|
||||
private_key_path: Path = BASE_DIR/"certs"/"jwt-private.pem"
|
||||
public_key_path: Path = BASE_DIR/"certs"/"jwt-public.pem"
|
||||
algorithm: str = "RS256"
|
||||
access_token_expire_minutes: int = 15
|
||||
|
||||
class Settings(BaseSettings):
|
||||
auth_jwt: AuthJWT = AuthJWT()
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user