issue with request token and event machine

19 views
Skip to first unread message

Marcelo Diniz

unread,
Sep 16, 2011, 12:15:26 PM9/16/11
to OAuth Ruby
Hi all

I have to use oauth with event machine and I'm trying to figure out
how to do that. I see there's an extension to em-http-request
HttpClient, but the way I understood it I already have to have the
access token (possibly saved somewhere), so the extension just signs
the requests. Did I get it right?

In my case I don't have an access token, so I have to get a request
token first. I thought of using consumer.get_request_token, but it
seems it only uses Net:HTTP, that won't work with event machine. Would
it work if I try to somehow convert the Net:HTTP calls to em-http-
request? Or that would be just too much worthless work? Maybe an
easier approach is to get the request token without oauth library (a
normal em-http-request call), save it and then use the extension?

If I understood something wrong, please put me back on track
(hopefully with a tiny example).

I researched and found this thread, but it was open before the
transfer to Aaron so I don't think anyone updated it.
http://groups.google.com/group/oauth-ruby/browse_thread/thread/85081bb3f80c48e6/63f6b0ea994d7884

Thanks
Marcelo
Reply all
Reply to author
Forward
0 new messages