3

I've been starting to figure out how to use noir and I would now like to use http basic authentication.

I've stumbled upon https://github.com/adeel/ring-http-basic-auth . Though, the given examples seem to apply to compojure and not to noir.

I wonder if noir's abstraction level is too high to allow different auth for diferent pages?!

I also know that this could be the way do go: http://webnoir.org/tutorials/others , though, I am not yet confortable enough with the whole clojure ecosystem in order to be able to see how to fit these ring handlers as http authentication for specific routes.

Is there anyone who can give me a hint about how should I think about this problem?

Thank you,

Pedro Rolo
  • 28,273
  • 12
  • 60
  • 94
  • 1
    Likely you're going to be using `pre-route`[1] and `ring-request`[2] I haven't implemented basic auth yet, but you should be able to transcribe the library your found. [1] http://webnoir.org/autodoc/1.3.0/noir.core.html#var-pre-route [2] http://webnoir.org/autodoc/1.3.0/noir.request.html – Chris Biscardi Nov 26 '12 at 04:51
  • Note: noir is discontinued and compojure+libnoir should be used instead. – Pedro Rolo May 15 '13 at 10:24

1 Answers1

0

Check out Friend: https://github.com/cemerick/friend

It is a authorization/authentication library that works as ring middleware. Very easy to get up and going with.

solussd
  • 494
  • 5
  • 7