requests / requests-oauthlib

OAuthlib support for Python-Requests!
https://requests-oauthlib.readthedocs.org/
ISC License
1.72k stars 424 forks source link

validate_token_parameters Error Check #448

Open satiowadahc opened 3 years ago

satiowadahc commented 3 years ago

From Autodesk API an example error is: {'developerMessage': 'The required parameter(s) client_id not present in the request', 'errorCode': 'AUTH-008', 'more info': 'https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/'}

parameters.py :validate_token_parameters(params): if 'error' in params: raise_from_error(params.get('error'), params)

Never gets caught. This was a fair amount of debugging. May update if I find more information

satiowadahc commented 3 years ago

https://github.com/requests/requests-oauthlib/blob/46f886ccb74652fc9c850ece960edcf2bce765a5/requests_oauthlib/oauth2_session.py#L422

Since scope is sent the API rejects it. I guess I gotta make a PR if I want this fixed...

satiowadahc commented 3 years ago

I now realize that parameters.py isn't part of this repo, but the scope is. PR made #449