To clarify, that was an example of content negotiation middleware, not ACL.
If I were to tackle this, I would try to find or implement a pure ACL (not aware of web apps per se) library and then hook it up via Ring middleware. On Monday, January 13, 2014 12:45:23 PM UTC-8, Christopher Allen wrote: > > I might follow up with a more thorough reply, but I had to drop Friend for > the same reason I had to drop Liberator. Customizing the > assumptions/defaults the libraries made was too default. Relatively simple > content negotiation involved trying to do insane monkey-patches of > Liberator's protocols or vendoring and rewriting of the library. > > Whereas, plain ole' Ring middleware: > https://github.com/bitemyapp/berossus/blob/master/src/berossus/rocks/your/data/middleware.clj#L44-L51 > > has worked out just dandy. > > I don't mind leveraging other peoples' code at all, but Liberator and > Friend fall apart fairly quickly if you step outside their view of the > universe even a little bit. > > On Monday, January 13, 2014 12:16:56 PM UTC-8, Alexandr Kurilin wrote: >> >> Disclaimer: I think what Friend is trying to do is super important and >> cemerick rocks. >> >> However, I found Friend to be really difficult to grok the first time I >> took a stab at it many months ago, perhaps I'm more capable of getting into >> it now. My concern was that it is so broadly encompassing and there are too >> few examples of how to use it in scenarios similar to the ones I face every >> day. For example, I ended up rolling my own cookie-based role auth >> middleware (relying on Ring's cookie store) in about 15 lines of clj, >> significantly simpler for a basic scenario. >> >> By the way, it would be really neat if someone added a Friend chapter to >> the upcoming Clojure Cookbook. I created an issue for it over 6 months ago >> and nobody's taken it up so far, so I can't tell if most of the community >> has given up on the library or if it's just too much of a hassle to explain >> to others. >> >> >> On Sun, Jan 12, 2014 at 11:40 PM, Stefan Kamphausen <[email protected]>wrote: >> >>> >>> >>> On Monday, January 13, 2014 3:53:43 AM UTC+1, Sam Ritchie wrote: >>>> >>>> cemerick's Friend library is the way to do this: >>>> >>>> https://github.com/cemerick/friend >>>> >>>> I'm writing up a post on how to combine Friend with Liberator, for easy >>>> ACL management for RESTful APIs. Take a look and let us know what you >>>> think! >>>> >>>> >>> Can't wait to read that post. :) >>> >>> stefan >>> >>> -- >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to [email protected] >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> [email protected] >>> 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 [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> Alexandr Kurilin >> 206.687.8740 | @alex_kurilin <https://twitter.com/alex_kurilin> | >> blog<http://www.kurilin.net> >> > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
