Merge pull request #5 from red734/master
Sending Username and Password in HTTP POST request
This commit is contained in:
commit
2afbf652dc
|
|
@ -46,7 +46,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
|
||||||
|
|
@ -66,7 +66,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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue