-
-
Notifications
You must be signed in to change notification settings - Fork 420
Wrong Authorization header? #211
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
Comments
I think you're right: I think this is an error that was introduced in #206, which was insufficiently defensive against the possibility that neither if not auth and (username):
auth = requests.auth.HTTPBasicAuth(username, password) See if that change resolves your problem. |
Yes! Making this change on |
@chaosct Fantastic. =) Want to open a pull request with that change? |
You got it! |
I'm having trouble using requests-oauthlib against a flask-oauthlib provider. I'm using the reference implementation of flask-oauthlib provider and while using the same library for the client works, using requests-oauthlib fails.
What I do is:
This last line raises a
InvalidClientError
exception.It seems that in the header is passed like this:
u\'Authorization\': u\'Basic Tm9uZTpOb25l\'
, which is used by flask-oauthlib to retrieve the client id and secret, by deserializing this using base64 encoding, which results in"None:None"
. This triggers the HTTP 401 client error response.Am I doing something wrong here? It seems that requests-oauthib is creating faulty headers, but I am no expert in oauthlib2 and that may be also a wrong/restricted implementation of flask-oauthlib...
Versions:
The text was updated successfully, but these errors were encountered: