get_access_token() — fastapi Function Reference
Architecture documentation for the get_access_token() function in test_tutorial005.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 73cf2ed9_002b_77bd_5a4f_5029b98b7156["get_access_token()"] 132df24a_932a_c5a5_9fcb_bb38e95d696f["test_tutorial005.py"] 73cf2ed9_002b_77bd_5a4f_5029b98b7156 -->|defined in| 132df24a_932a_c5a5_9fcb_bb38e95d696f ff5f73d7_b2c2_f07d_ae2f_eaf07b16b2b5["test_token()"] ff5f73d7_b2c2_f07d_ae2f_eaf07b16b2b5 -->|calls| 73cf2ed9_002b_77bd_5a4f_5029b98b7156 bff070d6_5185_0d5a_7d9c_d1083d0ccce9["test_token_no_scope()"] bff070d6_5185_0d5a_7d9c_d1083d0ccce9 -->|calls| 73cf2ed9_002b_77bd_5a4f_5029b98b7156 8ba55d2f_621e_0ebc_90a9_4c61a0e76e69["test_token_inactive_user()"] 8ba55d2f_621e_0ebc_90a9_4c61a0e76e69 -->|calls| 73cf2ed9_002b_77bd_5a4f_5029b98b7156 4a56c9f7_b215_dbac_cf75_cd6ae2ace48c["test_read_items()"] 4a56c9f7_b215_dbac_cf75_cd6ae2ace48c -->|calls| 73cf2ed9_002b_77bd_5a4f_5029b98b7156 fa01caae_a995_dfc7_9092_8ec0963d3c59["test_read_system_status()"] fa01caae_a995_dfc7_9092_8ec0963d3c59 -->|calls| 73cf2ed9_002b_77bd_5a4f_5029b98b7156 style 73cf2ed9_002b_77bd_5a4f_5029b98b7156 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_security/test_tutorial005.py lines 26–35
def get_access_token(
*, username="johndoe", password="secret", scope=None, client: TestClient
):
data = {"username": username, "password": password}
if scope:
data["scope"] = scope
response = client.post("/token", data=data)
content = response.json()
access_token = content.get("access_token")
return access_token
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does get_access_token() do?
get_access_token() is a function in the fastapi codebase, defined in tests/test_tutorial/test_security/test_tutorial005.py.
Where is get_access_token() defined?
get_access_token() is defined in tests/test_tutorial/test_security/test_tutorial005.py at line 26.
What calls get_access_token()?
get_access_token() is called by 5 function(s): test_read_items, test_read_system_status, test_token, test_token_inactive_user, test_token_no_scope.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free