Ali2206 commited on
Commit
e1b006f
·
verified ·
1 Parent(s): 033aad7

Update core/security.py

Browse files
Files changed (1) hide show
  1. core/security.py +3 -2
core/security.py CHANGED
@@ -33,8 +33,9 @@ def create_access_token(data: dict, expires_delta: timedelta = None):
33
  return jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
34
 
35
  # Get the current user from the JWT token
36
- async def get_current_user(token: str = Depends(oauth2_scheme)):
37
- print("🔐 Token received:", token)
 
38
 
39
  if not token:
40
  print("❌ No token received")
 
33
  return jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
34
 
35
  # Get the current user from the JWT token
36
+ async def get_current_user(request: Request, token: str = Depends(oauth2_scheme)):
37
+ print("🧪 Request headers:", dict(request.headers))
38
+ print("🔐 Raw token received:", token)
39
 
40
  if not token:
41
  print("❌ No token received")