I am trying to integrate a compojure application with those OAuth2 providers: LinkedIn, Facebook, Google, and Twitter, using an all in one solution. I am aware of some existing java libraries such as scribe-java or spring-social that can help. But they suck when used from clojure. Is there a more clojure friendly solution to my goal? Or can anyone point me to a working sample / tutorial on how to reach my goal?
Asked
Active
Viewed 3,198 times
2 Answers
4
For OAuth 2.0, there's https://github.com/DerGuteMoritz/clj-oauth2
Disclaimer: I haven't tried it, but I'm just about to. I'll come back and report on my experiences, and if I get a sample app up on GitHub.
OK - I can report that clj-oauth2, while lacking in documentation, does actually work. I submitted a pull request for OAuth 2.0 Draft 10 support (required for use with Force.com, and probably Google, too). I'll also post an example app sometime soon to my fork at https://github.com/metadaddy-sfdc/clj-oauth2

metadaddy
- 4,234
- 1
- 22
- 46
-
How was it? Did you find it easy to use? My experiences using oauth2 libs in ruby and javascript have been atrocious. – Wilhelm Mar 02 '12 at 20:04
-
Well, it was version 0.2.0, so my expectations were not high. Documentation - almost non-existent, so I had to read the source quite a bit to get it working successfully, and make a few changes to get it to support salesforce.com's OAuth 2.0 Draft 10 implementation. I have a sample app that I'll post to my GitHub repo soon https://github.com/metadaddy-sfdc – metadaddy Mar 03 '12 at 16:50
-
Does clj-oauth2 work for Twitter? I can't figure out if Twitter supports OAuth 2 or not, despite conflicting token URLs. – Petrus Theron Sep 27 '14 at 09:01
-
Twitter supports OAuth 2.0 for [Application-only authentication](https://dev.twitter.com/oauth/application-only) only; OAuth 1.0a is still required to issue requests on behalf of users. – metadaddy Sep 27 '14 at 18:16
2
https://github.com/mattrepl/clj-oauth
Disclaimer: I haven't tried this one, I just found it in clojure-libraries.

ivant
- 3,909
- 1
- 25
- 39