mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
test form data for POST
This commit is contained in:
@@ -6,6 +6,9 @@ from app.models.user import User
|
||||
|
||||
from fastapi import Request, HTTPException
|
||||
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
||||
from app.utils.logging import AppLogger
|
||||
|
||||
logger = AppLogger().get_logger()
|
||||
|
||||
|
||||
async def get_from_redis(request: Request, key: str):
|
||||
@@ -37,6 +40,7 @@ class AuthBearer(HTTPBearer):
|
||||
raise HTTPException(
|
||||
status_code=403, detail="Invalid token or expired token."
|
||||
)
|
||||
logger.info(f"Token verified: {credentials.credentials}")
|
||||
return credentials.credentials
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user