fix: add get_user_from_token alias for backward compatibility
This commit is contained in:
@@ -165,6 +165,14 @@ def verify_token(token: str) -> Optional[str]:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
# Alias for backward compatibility
|
||||||
|
get_user_from_token = verify_token
|
||||||
|
|
||||||
|
|
||||||
|
def get_current_user(credentials: HTTPAuthorizationCredentials) -> dict:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def get_current_user(credentials: HTTPAuthorizationCredentials) -> dict:
|
def get_current_user(credentials: HTTPAuthorizationCredentials) -> dict:
|
||||||
"""Get current user from JWT token"""
|
"""Get current user from JWT token"""
|
||||||
token = credentials.credentials
|
token = credentials.credentials
|
||||||
|
|||||||
Reference in New Issue
Block a user