1
0
mirror of https://github.com/janLo/wallabag-kindle-consumer synced 2026-06-19 19:08:00 +00:00

Sending Username and Password in HTTP POST request

This commit is contained in:
red734
2021-10-24 18:21:55 +02:00
parent fdac477d09
commit e47276f833
+2 -2
View File
@@ -45,7 +45,7 @@ class Wallabag:
'password': passwd} 'password': passwd}
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.get(self._url('/oauth/v2/token'), params=params) as resp: async with session.post(self._url('/oauth/v2/token'), json=params) as resp:
if resp.status != 200: if resp.status != 200:
logger.warn("Cannot get token for user {user}", user=user.name) logger.warn("Cannot get token for user {user}", user=user.name)
return False return False
@@ -65,7 +65,7 @@ class Wallabag:
'username': user.name} 'username': user.name}
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.get(self._url('/oauth/v2/token'), params=params) as resp: async with session.post(self._url('/oauth/v2/token'), json=params) as resp:
if resp.status != 200: if resp.status != 200:
logger.warn("Cannot refresh token for user {user}", user=user.name) logger.warn("Cannot refresh token for user {user}", user=user.name)
return False return False