Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use POST instead of GET when obtaining Live access_token
  • Loading branch information
antoineleclair committed Sep 10, 2016
commit d07b33bc2e8f4e5eb73a7c8be79cbbae23009c83
7 changes: 3 additions & 4 deletions velruse/providers/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,13 @@ def callback(self, request):
provider_type=self.type)

# Now retrieve the access token with the code
access_url = flat_url(
'https://oauth.live.com/token',
r = requests.post('https://oauth.live.com/token', dict(
client_id=self.consumer_key,
client_secret=self.consumer_secret,
redirect_uri=request.route_url(self.callback_route),
grant_type="authorization_code",
code=code)
r = requests.get(access_url)
code=code),
)
if r.status_code != 200:
raise ThirdPartyFailure("Status %s: %s" % (
r.status_code, r.content))
Expand Down