main
¶
validate_dojo_auth
¶
Python
validate_dojo_auth(
credentials: HTTPBasicCredentials = Depends(security),
) -> str | None
Checks the provided credentials against the CLI-provided password. Username is ignored (or set to 'mojo'), we just care about the password.
Source code in src/mujoco_mojo/utils/layers/dojo/main.py
auth_exception_handler
async
¶
Catch 401 errors and render our custom HTML page. Crucial: We MUST include the 'WWW-Authenticate' header so the browser knows it should still try to show the login popup first.