Dispatch Xauth

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dispatch Xauth

Most
How do you use xauth with Databinder dispatch?
Reply | Threaded
Open this post in threaded view
|

Re: Dispatch Xauth

Most
Here is what I'm using now but Twitter has given me about a week with xauth.

val twit = :/("twitter.com") / "oauth"
val consumer = Consumer("Consumer", "ConsumerSecret")
val h = new Http
val tok = h(Auth.request_token(consumer))
val twitsecure = twit.secure
val request_token = h(twitsecure / "request_token")
val done = h(Auth.access_token(consumer, tok, number))
Reply | Threaded
Open this post in threaded view
|

Re: Dispatch Xauth

n8han
Administrator
It should be pretty straightforward to build this up from the oauth signing primitives that dispatch gives you. It's most similar to the request token request, since it's only signed with the consumer credentials. In the standard flow:
http://sourced.implicit.ly/net.databinder/dispatch-twitter/0.7.6/dispatch/Twitter.scala.html#17912

Instead of the callback url you would post in the parameters that distinguish it as an xoauth request, and of course also use the access_token endpoint.

I'd like to add this to Dispatch if you make a working implementation; since xauth is not enabled by default it's not so easy to test it generally.

Nathan

On 9/24/10 10:20 PM, Most [via Databinder] wrote:
Here is what I'm using now but Twitter has given me about a week with xauth.

val twit = :/("twitter.com") / "oauth"
val consumer = Consumer("Consumer", "ConsumerSecret")
val h = new Http
val tok = h(Auth.request_token(consumer))
val twitsecure = twit.secure
val request_token = h(twitsecure / "request_token")
val done = h(Auth.access_token(consumer, tok, number))


View message @ http://databinder.3617998.n2.nabble.com/Dispatch-Xauth-tp5568934p5568970.html
To start a new topic under Databinder, email [hidden email]
To unsubscribe from Databinder, click here.