Using OAuth2 to call one web app from another

74 views
Skip to first unread message

Jonathon McKitrick

unread,
Jun 20, 2016, 7:30:32 PM6/20/16
to Clojure
I'm looking for the simplest way possible to get OAuth2 working so I can call an API which has recently switched from username/password to OAuth2.

Any suggestions? Most of what I've found so far is server implemenation, rather than web app to web app.

Denis Laprise

unread,
Jun 20, 2016, 8:13:49 PM6/20/16
to Clojure
You can pass the OAuth token in the request options if you're using httpkit or clj-http (both use the :oauth-token parameter).

Jonathon McKitrick

unread,
Jun 20, 2016, 8:34:19 PM6/20/16
to Clojure
Right! But what's the easiest way to do the initial handshake with the public/private bits to *get* the token?

Karl Blomström

unread,
Jun 20, 2016, 8:51:08 PM6/20/16
to clo...@googlegroups.com

Hi Jonathon! I am working on a client library for retrieving oauth2 tokens. Have a look here: https://github.com/blmstrm/loudmoauth and here for example usage: https://github.com/blmstrm/loudmoauth-examples/blob/master/src/loudmoauth_examples/core.clj

The library is not polished yet but it seems to work (fingers crossed).

Maybe it can give you some inspiration or you might find it useful.

I am not at my development machine now but I can upload the latest version to clojars tomorrow and at the same time expand the readme.

Regards,

Blmstrm

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jmcki...@gmail.com

unread,
Jun 20, 2016, 8:56:40 PM6/20/16
to clo...@googlegroups.com
Great! I'll give it a try!

You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/oVZ34MMg0XM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Jonathon McKitrick

jmcki...@gmail.com

unread,
Jun 20, 2016, 8:58:24 PM6/20/16
to clo...@googlegroups.com
It would be great if you'd upload it to clojars. I'll start working with it immediately after that, and hopefully it will do the trick.
--
Jonathon McKitrick
Reply all
Reply to author
Forward
0 new messages