On Wed, 2003-06-11 at 03:32, Frank Maas wrote:
> > The session stuff could be done in a separate phase before the content
> > handler, or it could be done on demand when your script calls some
> > utility method that knows how to get the current session.  Same with
> > the user. 
> 
> Isn't this more a matter of 'niceness'?

I'm not sure what you mean.

> Putting the session/user stuff
> in AuthenHandler and then setting the $r->user makes it clear where the
> authentication takes place. All other handlers just check if $r->user is
> set and need not to bother with sessions and stuff?

Are you asking why anyone would get this on demand instead of always
doing it in an auth handler?  One reason might be that fetching the
session and user is expensive, and you don't know if you'll need it or
not just based on the URL.

> Or is there something against this and would you be a supporter of having
> it all in the same handler?

If using a separate handler makes sense for your app and you like it
that way, then do it.

- Perrin

Reply via email to