Authentication and Authorization

Started by BDunbar, March 04, 2012, 09:34:58 AM

Previous topic - Next topic

BDunbar

I have a need to authenticate and authorize users to an application.



Assume Application FOO.

Users Bob, Carol, Deke.



FOO will allow Bob, Carol, and Deke to login.

FOO will allow anyone to see stuff.



Bob can edit anyone's stuff.

Carol and Deke can write stuff, but only edit their own posts.



(I notice that I've just defined a blogging application.  Blogs are the new Hello World, I guess.)



So what I need, I guess, is a way to authenticate a user, and then to authorize them to do 'stuff'.



"Write your own" is a perfectly valid response.  But if someone else has done it already then I'd feel foolish re-inventing the wheel.



Also: tips, hints, or etc are welcome.  And thanks in advance.

joejoe

#1
I am not sure if your interests are covered here:



http://static.artfulcode.net/newlisp/web.lsp.html">http://static.artfulcode.net/newlisp/web.lsp.html

http://static.artfulcode.net/newlisp/index.html">http://static.artfulcode.net/newlisp/index.html



I think it covers sessions, which might help your auth's.



Other people know much more than I and will probably chime in too. ;0)

BDunbar

#2
This looks interesting ...



http://lisplets.sourceforge.net/">http://lisplets.sourceforge.net/


QuoteLisplets are Java Servlets that forward their requests, and gather their response headers, using s-expressions over sockets. They enable easy integration of Common Lisp or Scheme into a Java-based web environment.



The library consists of a single Java class which implements HTTPServlet. It packages the request header, parameters, cookies, session, application, and user info into an s-expression and sends it over a TCP socket that can be read from Lisp using read. The Lisp process returns status, headers, session and application state as an s-expression, followed by the document content. This servlet should work with any servlet container, such as Tomcat, Resin, Jetty, JRun and many others.


Reading between the lines it looks like Rich Hickey popped this out, then went out and released Clojure a year later.  If a google query is anything to go by it looks as if no one has really used it since.