Use oauth-clj for 2-legged oauth?
Closed this issue · 3 comments
dirtyvagabond commented
Hi Roman,
Is it possible to use oauth-clj for 2-legged oauth? If so, is there a demo or sample code I can take a look at?
All the best,
Aaron
r0man commented
Hi Aaron,
I haven't used 2-legged OAuth myself yet.
Roman
metajack commented
It is possible. Here is an example (note this won't work until issue #6 is fixed because of the query parameters.
(def c (oauth/make-consumer :oauth-consumer-key your-consumer-key
:oauth-consumer-secret your-consumer-secret))
(c {:method :get :url "http://api.v3.factual.com/t/global :query-params {:q "Starbucks"}})
Basically you just leave the token and token secret out of the request. There is no need to get a temporary token or an access token at all in 2-legged.
r0man commented
Hi Aaron,
thanks for the pull request. I merged it and
pushed "0.0.5-SNAPSHOT" to Clojars.
Roman.