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

Function get_current_user

tests/test_security_openid_connect.py:16–18  ·  view source on GitHub ↗
(oauth_header: str = Security(oid))

Source from the content-addressed store, hash-verified

14
15
16def get_current_user(oauth_header: str = Security(oid)):
17 user = User(username=oauth_header)
18 return user
19
20
21@app.get("/users/me")

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…