MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / AuthUser

Class AuthUser

fastapi_app/dependencies/auth.py:37–49  ·  view source on GitHub ↗

Authenticated user information.

Source from the content-addressed store, hash-verified

35
36
37class AuthUser:
38 """Authenticated user information."""
39
40 def __init__(self, user_id: str, email: Optional[str], phone: Optional[str], is_anonymous: bool = False):
41 self.id = user_id
42 self.email = email
43 self.phone = phone
44 self.is_anonymous = is_anonymous
45
46 @property
47 def identifier(self) -> str:
48 """Get user identifier (email or user_id)."""
49 return self.email or self.id
50
51
52async def get_current_user(authorization: Optional[str] = Header(None)) -> AuthUser:

Calls

no outgoing calls