-
-
Notifications
You must be signed in to change notification settings - Fork 489
Client id always included in body of token request #495
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
Oauth2 is a cluster; you can "follow the spec" and still get incompatible implementations... by design. I'm not sure what the original intent was here; the OAUTH2 spec explicitly states that the format of the token itself is out of scope yet in this case sending that may help with auth in some way; Still, if it's not used it shouldn't be sent. Does removing this break any of the big examples? |
Sorry to disappoint but I have absolutely no idea... I only started using oauthlib a few days ago in my specific scenario at work. I'm not sure how the |
Do you have a test suite that I could run to help speed things up on this matter? In any case, the unused parameter should be used instead of |
Just realized that the doc of this function is wrong but also doctests: >>> from oauthlib.oauth2 import WebApplicationClient
>>> client = WebApplicationClient('your_id')
>>> client.prepare_request_body(code='sh35ksdf09sf')
'grant_type=authorization_code&code=sh35ksdf09sf'
>>> client.prepare_request_body(code='sh35ksdf09sf', foo='bar')
'grant_type=authorization_code&code=sh35ksdf09sf&foo=bar' Here is when I run it: >>> from oauthlib.oauth2 import WebApplicationClient
>>> client = WebApplicationClient('your_id')
>>> client.prepare_request_body(code='sh35ksdf09sf')
'grant_type=authorization_code&client_id=your_id&code=sh35ksdf09sf'
>>> client.prepare_request_body(code='sh35ksdf09sf', foo='bar')
'grant_type=authorization_code&client_id=your_id&foo=bar&code=sh35ksdf09sf' |
When you modify that: Do the tests run successfully and all pass? |
It only failed on |
I use the WebApplication client and in
prepare_request_body
I noticed theclient_id
parameter is never used. Howeverself.client_id
is always passed down toprepare_token_request
and thus always included in the body.An unused parameter doesn't look good but maybe this is intended, I've only quickly read the RFC 6749. If this is the case it should at least be stated in the docstring.
The server here (I guess OpenAM) rejects queries when they contain the client_id in the body.
The text was updated successfully, but these errors were encountered: