You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A WARNING is logged when sending a request to any endpoint operation that bases its authentication method on authenticated_partner_from_basic_auth_user (after the user provides correct credentials).
WARNING [database_name] odoo.addons.base.models.res_users: _check_credentials without 'interactive' env key, assuming interactive login. Check calls and overrides to ensure the 'interactive' key is properly set in all _check_credentials environments
To Reproduce
Affected versions: v15, v16, v17.
Steps to reproduce the behavior:
Make sure to install the module fastapi with demo data.
In Odoo, open the FastAPI app.
In the tree view, at the end of the entry corresponding to 'Fastapi Demo Endpoint', click the big "Sync Registry" button (or open the record and click the smart button at the top of that Form view).
In your browser, access the demo endpoint '/fastapi_demo/demo/who_ami'.
If a 'Sign In' pop-up appears, fill in a Username and Password of a known user of your database.
Expected behavior
A sole log message INFO [database_name] odoo.addons.base.models.res_users: Login successful for db:[database_name] login:[your_filled_in_username] from [IP]
But now, a WARNING as described above precedes this log message.
Additional context
This WARNING is logged whenever a request is sent to an API endpoint that depends on the provided standard method basic_auth_user, after the user provides correct credentials.
The issue is resolved if the keyword argument user_agent_env=None is replaced by a dict with some (bool) value assigned to the key "interactive", for example user_agent_env={"interactive": False}.
The text was updated successfully, but these errors were encountered:
denaux
changed the title
fastapi: Ensure the 'interactive' key is properly set in all _check_credentials environments.
FastAPI: Ensure the 'interactive' key is properly set in all _check_credentials environments.
Aug 13, 2024
denaux
changed the title
FastAPI: Ensure the 'interactive' key is properly set in all _check_credentials environments.
FastAPI: Ensure the 'interactive' key is properly set in all _check_credentials environments
Aug 13, 2024
Module
Odoo FastAPI (technical name: fastapi)
Describe the bug
A
WARNING
is logged when sending a request to any endpoint operation that bases its authentication method onauthenticated_partner_from_basic_auth_user
(after the user provides correct credentials).WARNING [database_name] odoo.addons.base.models.res_users: _check_credentials without 'interactive' env key, assuming interactive login. Check calls and overrides to ensure the 'interactive' key is properly set in all _check_credentials environments
To Reproduce
Affected versions: v15, v16, v17.
Steps to reproduce the behavior:
fastapi
with demo data.Expected behavior
A sole log message
INFO [database_name] odoo.addons.base.models.res_users: Login successful for db:[database_name] login:[your_filled_in_username] from [IP]
But now, a
WARNING
as described above precedes this log message.Additional context
This
WARNING
is logged whenever a request is sent to an API endpoint that depends on the provided standard methodbasic_auth_user
, after the user provides correct credentials.The issue is resolved if the keyword argument
user_agent_env=None
is replaced by adict
with some (bool
) value assigned to the key"interactive"
, for exampleuser_agent_env={"interactive": False}
.The text was updated successfully, but these errors were encountered: