Added OAuth signature calculation code in com.ning.http.client.oauth package

101 views
Skip to first unread message

Tatu Saloranta

unread,
Oct 11, 2010, 8:19:34 PM10/11/10
to asyncht...@googlegroups.com
Quick note: I cleaned up OAuth client side signature calculation code
(from a project that will be published very soon), and added in
async-http-client.
Usage should be relatively simple; typically something like:

---
ConsumerKey cons = new ConsumerKey("...", "...");
RequestToken token = new RequestToken("...", "..."); // usually
accessed with a separate call
SignatureCalculator signatureCalculator = new
OAuthSignatureCalculator(cons, token);

// register with http client:
AsyncHttpClient client = ...;
client.setSignatureCalculator(signatureCalculator);
// and then authorization header gets added when request is built
---

and this has been tested with OAuth service that uses another OAuth
calculator implementation (that is: "works for me").
Implementation is not overly configurable in its current form, so
it'll use HMAC-SHA1, http headers.

-+ Tatu +-

jfarcand

unread,
Oct 12, 2010, 12:26:32 PM10/12/10
to asyncht...@googlegroups.com
Salut,

Thanks! In order to keep track, I've filled an RFE here

> http://github.com/AsyncHttpClient/async-http-client/issues/closed#issue/61

so next time if you can do that that makes the change log easier to build.

A+

-- Jeanfrancois


>
> -+ Tatu +-
>

Tatu Saloranta

unread,
Oct 12, 2010, 12:30:14 PM10/12/10
to asyncht...@googlegroups.com

Ah yes, sorry for forgetting this obvious part.

-+ Tatu +-

Reply all
Reply to author
Forward
0 new messages