MCPcopy Index your code
hub / github.com/fastapi/fastapi / get_current_user

Function get_current_user

tests/test_security_oauth2.py:25–27  ·  view source on GitHub ↗
(oauth_header: "str" = Security(reusable_oauth2))

Source from the content-addressed store, hash-verified

23
24# Here we use string annotations to test them
25def get_current_user(oauth_header: "str" = Security(reusable_oauth2)):
26 user = User(username=oauth_header)
27 return user
28
29
30@app.post("/login")

Callers

nothing calls this directly

Calls 2

SecurityClass · 0.90
UserClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…