Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /verifiable_token_based_authentication /ParisNeo_lollms.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends the main-app JWT to the oauth2_scheme dependency: the frontend/webui folder is not in the clone, and examples/ (sso_client_app_example, lollmsbot) are samples/outbound clients. The caller is outside the repo." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "get_current_db_user_from_token", | |
| "file": "backend/session.py", | |
| "lines": "80", | |
| "notes": "FastAPI dependency taking the bearer token via Depends(oauth2_scheme) (OAuth2PasswordBearer, backend/security.py:35); calls decode_main_access_token at backend/session.py:92 and raises 401 when payload/sub is missing, user not found or token issued before password change. Wired into routes via get_current_active_user (backend/session.py:156) e.g. backend/routers/auth.py:573." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "decode_main_access_token", | |
| "file": "backend/security.py", | |
| "lines": "712", | |
| "notes": "Reached from Enforcer at backend/session.py:92. Calls jose jwt.decode with SECRET_KEY/HS256 (signature + exp check) and returns the claims payload or None on JWTError; the Enforcer then extracts 'sub' and does the DB/password-change checks." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "SECRET_KEY", | |
| "file": "backend/config.py", | |
| "lines": "183", | |
| "notes": "The Verifier uses SECRET_KEY directly (imported at backend/security.py:27, used at backend/security.py:715) with no retrieving method, so the config constant is cited. It is loaded from env; _ensure_secure_secret_key (backend/config.py:78, called at :130) generates and persists a strong key at startup if missing/weak. ALGORITHM='HS256' at backend/config.py:248." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "decode", | |
| "file": "backend/security.py", | |
| "lines": "715", | |
| "notes": "Verifier decode_main_access_token (backend/security.py:712) calls python-jose jwt.decode (imported at backend/security.py:24), which verifies the HS256 HMAC signature and expiry. Generation side is jwt.encode in create_access_token (backend/security.py:347)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "get_my_details", | |
| "file": "backend/routers/auth.py", | |
| "lines": "573", | |
| "notes": "GET /api/auth/me handler (auth_router included at main.py:610) reached only after Depends(get_current_active_user) -> get_current_db_user_from_token passes; returns the authenticated principal's details. Many other routers use the same dependency." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.79 kB
- Xet hash:
- 5098ca15956e1d30d4e2c65b77f09ed38ec079dc050ab6f38f7a454333ab1f47
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.