Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for client_id and oauthlib PR #593 (Issue #585) #331

Closed
wants to merge 3 commits into from

Conversation

jvanasco
Copy link
Contributor

This PR updates requests_oauthlib support to oauthlib/oauthlib#585 and oauthlib/oauthlib#593

Of importance:

  • The logic in fetch_token was largely redone. The existing approach tried to support an array of different ways to provide client and user details which led to easily broken implementations. The new approach favors full RFC compliance by default, but still maintains ways to build broken clients and talk to broken servers.

  • New tests were added to ensure the above functionality works.

  • Some existing tests were changed. Notably calls to fetch_token in OAuth2SessionTest allowed the LegacyApplicationClient to invoke the endpoint without the required user credentials. The tests now ensure an exception is properly raised, and then retest with necessary arguments added in.

This PR is waterfalled against a #593 and should not be reviewed until that is accepted.

@skion
Copy link
Contributor

skion commented Sep 20, 2018

This PR is waterfalled against a #593 and should not be reviewed until that is accepted.

And in reverse, it would be great if someone here can review oauthlib/oauthlib#593 before we merge that.

raise ValueError('The required paramter `username` was supplied, '
'but `password` was not.')

# TODO:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in oauthlib/oauthlib#585 (comment), username and password are used only for LegacyApplicationClient. However, we should not restrict or try to remove them from the params, if they are present. But we should not do any processing either, since they are not described in the RFC (for those other grants!).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. so just remove the TODO line that I put in for code review - correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes IMHO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

the way i was notified of this by code-highlighting, I thought there may have been another issue or mis-interpretation. I just wanted to ensure we are both talking about the TODO line.

@JonathanHuot
Copy link
Contributor

LGTM, need to have a review from @requests-oauthlib team now ;-)

@singingwolfboy
Copy link
Member

This pull request can't be reviewed until all the automated tests pass on Travis CI.

@jvanasco
Copy link
Contributor Author

jvanasco commented Dec 27, 2018 via email

@singingwolfboy
Copy link
Member

I just merged #341 earlier today, which should restrict compatibility to versions of oauthlib below 3.0. Once oauthlib 3.0 is out, then it will be easier to ensure that requests-oauthlib is compatible with it.

@singingwolfboy
Copy link
Member

Can you guys take a look at #357, and tell me what you think?

@jvanasco
Copy link
Contributor Author

rescinding in favor of #357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants