clj-oauth-server
provides OAuth Server support for Clojure programs.
The server support makes it simple to add OAuth support to any Ring based web applications such as Compojure.
lein jar
The server support is implemented as Ring middleware. It depends on params middleware already having been run upstream.
clj-oauth-server
is in Clojars. Use it with Leiningen by addit to project.clj
[clj-oauth-server "1.0.0"]
Add it to your application. Ensure that ring parameter middleware is before clj-oauth-server
.
(def app (-> routes
(oauth/wrap-oauth token-finder)
handler/api))
token-finder
is a function that looks up consumer secret and token secret given consumer key and token.
(defn token-finder [consumer token]
["consumer_secret" "token_secret"])
This would always match.
I forked this from clj-oauth.