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

Function get_current_active_user

docs_src/security/tutorial005_an_py310.py:143–148  ·  view source on GitHub ↗
(
    current_user: Annotated[User, Security(get_current_user, scopes=["me"])],
)

Source from the content-addressed store, hash-verified

141
142
143async def get_current_active_user(
144 current_user: Annotated[User, Security(get_current_user, scopes=["me"])],
145):
146 if current_user.disabled:
147 raise HTTPException(status_code=400, detail="Inactive user")
148 return current_user
149
150
151@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…