fix(types): importar Any y remover str redundante en dependencies.py
This commit is contained in:
@@ -3,7 +3,7 @@ FastAPI Security & Authentication Dependencies
|
|||||||
Handles JWT extraction from HttpOnly cookies and Bearer headers,
|
Handles JWT extraction from HttpOnly cookies and Bearer headers,
|
||||||
and implements declarative RBAC validation with app context.
|
and implements declarative RBAC validation with app context.
|
||||||
"""
|
"""
|
||||||
from typing import Optional, List, Callable
|
from typing import Optional, List, Callable, Any, Dict
|
||||||
from fastapi import Request, HTTPException, Depends, status
|
from fastapi import Request, HTTPException, Depends, status
|
||||||
import jwt
|
import jwt
|
||||||
|
|
||||||
@@ -130,6 +130,6 @@ async def get_request_payload(request: Request) -> dict[str, Any]:
|
|||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
form = await request.form()
|
form = await request.form()
|
||||||
return {str(k): str(v) for k, v in form.items()}
|
return {k: str(v) for k, v in form.items()}
|
||||||
except Exception:
|
except Exception:
|
||||||
return {}
|
return {}
|
||||||
|
|||||||
Reference in New Issue
Block a user