Closed
Description
After trying to get django-all-access to work with the OAuth2 server of FIWARE lab, I found out that it was expecting an Authorization
key in the header of the POST request that gets the access token (I was getting a 405 error). I managed to get it working by passing the following header to the request made in get_access_token
in OAuth2Client
:
headers = {'Authorization' : 'Basic ' + base64.b64encode(str(self.provider.consumer_key) + ':' + str(self.provider.consumer_secret))}
response = self.request('post', self.provider.access_token_url, data=args, headers=headers)
Not sure how it would be the best way to patch the code to make it more general (I have no idea if this may cause problems with other providers or if more kinds of authorizations should be included). I hope this helps.
Metadata
Metadata
Assignees
Labels
No labels