Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
16
def
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
Security
Class · 0.90
User
Class · 0.70
Tested by
no test coverage detected