Richard Jones writes:
 > George Hartzell wrote:
 > > Richard Jones writes:
 > >  > Anyone managing to get CAP::Authentication, CA::Dispatch and CA::Server 
 > >  > working together?
 > 
 > [..]
 > 
 > > What happens if you get rid of your check on the username, define a
 > > LOGIN_RUNMODE, and protect stuff using protected_runmodes?
 > 
 > OK, I tried removing the username check and just relying on the 
 > authen->protected_runmodes method and it seems to work properly now. 
 > Also, doing it the other way round also works - username check without 
 > protected_runmodes, and the advantage of this method is that I can use 
 > the redirect_after_login function to jump straight to the requested page 
 > after re-authenticating an expired session. Although at the moment this 
 > only seems to work with the default login page, but not if I specify the 
 > LOGIN_RUNMODE.
 > [...]

I mentioned this privately, but CAP::Authentication should
automagically take care of sending visitors to the login page if/when
it's necessary (they're new or their session's expired).  Check out
initialize() and prerun_callback() in C::A::P::Authentication.pm.

g.



#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to