Skip to content

Add oauth1 support #45

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

Merged
merged 3 commits into from
Dec 22, 2015
Merged

Add oauth1 support #45

merged 3 commits into from
Dec 22, 2015

Conversation

jsantos17
Copy link
Contributor

This adds support for OAuth1. Has only been tested with Twitter's API. I can add tests if there's interest in getting this merged.

@jsantos17
Copy link
Contributor Author

@bos Hey, sorry to bother you, but can you take a look at this to see if it's mergeable?

@juanpaucar
Copy link

@bos Hi, i would find these quite useful for project i'm working on right now, would you mind take a look please?
I think is useful because it makes a lot of sense to have OAuth 1.0 since it's quite popular among many services

@ExternalReality
Copy link

Hmm, I could actually make use of this... could someone make a fork with this... and put it on hackage.

@igraves
Copy link

igraves commented Feb 11, 2015

Bumping this. Was looking to add in OAuth1 support myself, but it looks like @jsantos17 has done it. Does any additional work need to be done on integration or is this pretty much ready to roll? Would appreciate a look if you get a chance, @bos. Thanks!

@@ -177,6 +177,7 @@ data Auth = BasicAuth S.ByteString S.ByteString
| AWSAuth AWSAuthVersion S.ByteString S.ByteString
-- ^ Amazon Web Services request signing
-- AWSAuthVersion key secret
| OAuth1 S.ByteString S.ByteString S.ByteString S.ByteString
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please document this field.

@bos
Copy link
Collaborator

bos commented Feb 18, 2015

Sorry for the slow response; I was on vacation. You'll see that I have a few comments, but otherwise this looks good.

@@ -117,8 +118,10 @@ prepare modify opts url = do
signRequest = maybe return f $ auth opts
where
f (AWSAuth versn key secret) = AWS.signRequest versn key secret
Copy link
Contributor

Choose a reason for hiding this comment

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

[bos wrote] While you're at it, please also fix that API mistake for the AWS code in a separate commit

We're not passing the auth record to AWS.signRequest, but only the constituent parts. What could I do better here?

@jsantos17
Copy link
Contributor Author

@bos thanks for the review. I'll get the changes done ASAP :)

@jsantos17
Copy link
Contributor Author

@bos I have made the requested changes. However, I'm not sure what you mean about the AWS API error, maybe @ret knows more about that?

@jsantos17
Copy link
Contributor Author

@bos any chance of getting this merged?

@jpvillaisaza
Copy link

👍

1 similar comment
@CristhianMotoche
Copy link

👍

@bos bos merged commit dceac69 into haskell:master Dec 22, 2015
@bos
Copy link
Collaborator

bos commented Dec 22, 2015

Applied, thanks!

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.

8 participants