[Lift] Re: Lift Authentication

2009-03-25 Thread marius d.
Hi, Everything said here pretty much covers it. I just want to say the HTTP authentication has pretty much nothing to do with form based authentication. Lift HTTP authentication is based on RFC 2617. Form based authentication is something invented by J(2)EE JSR specs and J(2) EE containers use JA

[Lift] Re: Lift Authentication

2009-03-25 Thread Derek Chen-Becker
Generating a template form to do that in Lift is trivial. Assuming we had a default template for the Lift app already set up: Getting it to check for an existing cookie is something that you would have to do in your JAAS provider. Derek On Wed, Mar 25, 2009 at 11:29 AM, Chad Ski

[Lift] Re: Lift Authentication

2009-03-25 Thread Chad Skinner
Yes, on an ejb server you configure the authentication realm and then submit a form to a location that is handled by the container, i.e. On Wed, Mar 25, 2009 at 11:23 AM, Derek Chen-Becker wrote: > You're talking about JAAS, right? I think that the term "form-based > authenticatio

[Lift] Re: Lift Authentication

2009-03-25 Thread Chad Skinner
> > Ohh... Right my apologies. I saw the post with Tyler and presumed you > specifically wanted to know about HTTP auth. My bad! > You can do form-based authentication just perfectly in lift... Its no > problem at all. > No apologies required at all. I am reading a lot and am trying to wrap my

[Lift] Re: Lift Authentication

2009-03-25 Thread Derek Chen-Becker
You're talking about JAAS, right? I think that the term "form-based authentication" is a bit ambiguous. For those that aren't familiar, the EJB server can use an application-provided form and authtentication callback to go against an existing JAAS auth module. Derek On Wed, Mar 25, 2009 at 10:56

[Lift] Re: Lift Authentication

2009-03-25 Thread marius d.
On Mar 25, 6:00 pm, David Pollak wrote: > On Wed, Mar 25, 2009 at 8:56 AM, Chad Skinner wrote: > > > All of our applications are currently using form based authentication in > > the EJB container .. am I correct that this (Form based authentication) is > > not supported in Lift? > > You are inc

[Lift] Re: Lift Authentication

2009-03-25 Thread Timothy Perrett
Ohh... Right my apologies. I saw the post with Tyler and presumed you specifically wanted to know about HTTP auth. My bad! You can do form-based authentication just perfectly in lift... Its no problem at all. Thanks, Tim On 25/03/2009 16:00, "David Pollak" wrote: > > > On Wed, Mar 25, 2

[Lift] Re: Lift Authentication

2009-03-25 Thread David Pollak
On Wed, Mar 25, 2009 at 8:56 AM, Chad Skinner wrote: > All of our applications are currently using form based authentication in > the EJB container .. am I correct that this (Form based authentication) is > not supported in Lift? You are incorrect. Form-based authentication works just fine in L

[Lift] Re: Lift Authentication

2009-03-25 Thread Chad Skinner
All of our applications are currently using form based authentication in the EJB container .. am I correct that this (Form based authentication) is not supported in Lift? As I see it, After checking the users cookie against the Authentication server I would want to cache the returned User object fo

[Lift] Re: Lift Authentication

2009-03-25 Thread Timothy Perrett
Further to that example, no doubt someone will laugh at me for using database access on each request... However this is just an example! In reality I actually read from an LRU cache to save the database access. Cheers, Tim On 25/03/2009 15:08, "Timothy Perrett" wrote: > > Chad, > > We have

[Lift] Re: Lift Authentication

2009-03-25 Thread Timothy Perrett
Chad, We have HTTP Basic Auth and HTTP Digest Auth support in Lift. The authentication is implemented as a partial function that you implement like so: LiftRules.httpAuthProtectedResource.prepend { case (ParsePath("api" :: _, _, _, _)) => Full(AuthRole("admin")) } LiftRules.au

[Lift] Re: Lift Authentication

2009-03-25 Thread Chad Skinner
Humm, I am learning something about HttpBasicAuthentication and need to look into this more. Is this method called for every request ... even before the user fills out the login form? On Wed, Mar 25, 2009 at 9:26 AM, Derek Chen-Becker wrote: > Take a look at the HttpBasicAuthentication class: > >

[Lift] Re: Lift Authentication

2009-03-25 Thread Derek Chen-Becker
Take a look at the HttpBasicAuthentication class: http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/auth/HttpBasicAuthentication.html The constructor func you provide takes a (username : String, password : String, req : Req) and returns a boolean. You should