Aiohttp : Is any way to detect whether username is wrong or password is wrong in aiohttp?

699 Views Asked by At

I want different message for wrong password and wrong username?? How to detect from response whether wrong username or wrong password??

auth = aiohttp.BasicAuth(username, password)
with aiohttp.ClientSession(loop=loop, auth=auth) as client:
client.post(Some_data) as response
1

There are 1 best solutions below

0
CZoellner On

Odoo is not providing this information on login. Internally (backend resp. application server) it is just getting a user ID if login and password are both correct or False if something is wrong. So Odoo isn't even providing the information at the backend level.