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

Function get_current_active_user

docs_src/security/tutorial005_py310.py:142–147  ·  view source on GitHub ↗
(
    current_user: User = Security(get_current_user, scopes=["me"]),
)

Source from the content-addressed store, hash-verified

140
141
142async def get_current_active_user(
143 current_user: User = Security(get_current_user, scopes=["me"]),
144):
145 if current_user.disabled:
146 raise HTTPException(status_code=400, detail="Inactive user")
147 return current_user
148
149
150@app.post("/token")

Callers

nothing calls this directly

Calls 2

SecurityClass · 0.90
HTTPExceptionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…