get_current_user() — fastapi Function Reference
Architecture documentation for the get_current_user() function in test_security_oauth2_optional_description.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 605ac862_c3a1_6de2_66f4_1cc46d7f18b6["get_current_user()"] 7e784b87_9cdf_528d_4ae2_09349aaf6e83["test_security_oauth2_optional_description.py"] 605ac862_c3a1_6de2_66f4_1cc46d7f18b6 -->|defined in| 7e784b87_9cdf_528d_4ae2_09349aaf6e83 style 605ac862_c3a1_6de2_66f4_1cc46d7f18b6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_security_oauth2_optional_description.py lines 28–32
def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)):
if oauth_header is None:
return None
user = User(username=oauth_header)
return user
Domain
Subdomains
Source
Frequently Asked Questions
What does get_current_user() do?
get_current_user() is a function in the fastapi codebase, defined in tests/test_security_oauth2_optional_description.py.
Where is get_current_user() defined?
get_current_user() is defined in tests/test_security_oauth2_optional_description.py at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free