MCPcopy
hub / github.com/fastapi/fastapi / get_current_active_user

Function get_current_active_user

docs_src/security/tutorial003_an_py310.py:69–74  ·  view source on GitHub ↗
(
    current_user: Annotated[User, Depends(get_current_user)],
)

Source from the content-addressed store, hash-verified

67
68
69async def get_current_active_user(
70 current_user: Annotated[User, Depends(get_current_user)],
71):
72 if current_user.disabled:
73 raise HTTPException(status_code=400, detail="Inactive user")
74 return current_user
75
76
77@app.post("/token")

Callers

nothing calls this directly

Calls 2

DependsClass · 0.90
HTTPExceptionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…