Skip to content

About

OAuth Consumer support for Clojure

Resources

Stars

9 stars

Watchers

2 watching

Forks

 
 

Latest commit

 

History

148 Commits

Folders and files

Repository files navigation

OAuth support for Ring server applications in Clojure

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.

Building

lein jar

The server support is implemented as Ring middleware. It depends on params middleware already having been run upstream.

Use

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.

Authors

I forked this from clj-oauth.

About

OAuth Consumer support for Clojure

Resources

Stars

9 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages