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

RFC5849 support for section 3.5.2 #1

Open
ga083 opened this issue Sep 5, 2017 · 3 comments
Open

RFC5849 support for section 3.5.2 #1

ga083 opened this issue Sep 5, 2017 · 3 comments

Comments

@ga083
Copy link

ga083 commented Sep 5, 2017

Added support for sending the oauth parameters in the form-enconded body instead of just the 'authorization' header.

.diff file and changed OhhAuth.swift file attached in case you want to update the project:
form-encoded oauth parameters change.zip

@mw99
Copy link
Owner

mw99 commented Sep 5, 2017

Very nice, thanks.

In line 211 you just merge the two parameter dictionaries into one, so the resulting parameters would be in random order. However RFC5849 section 3.5.2 says they must appended.

The entity-body MAY include other request-specific parameters, in which case, the protocol parameters SHOULD be appended following the request-specific parameters, properly separated by an "&" character (ASCII code 38).

I have seen OAuth 1 servers to be very strict with parameter ordering before, so that could be a problem. However I have just glanced over your code, so I could be wrong. I will take a closer look when I have the time. Thanks!!

@ga083
Copy link
Author

ga083 commented Sep 5, 2017

Good catch, looks like my server is more permissive than others. I'll take a look.

@ga083
Copy link
Author

ga083 commented Sep 7, 2017

Updated the code to sort the oauth parameters according to 3.5.2.
sorted form-encoded oauth parameters change.zip

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

No branches or pull requests

2 participants