[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] CA::Plugin::Authentication



On Oct 10, 2005, at 6:23 PM, Cees Hek wrote:

If you plan to use the CAP::Authentication plugin that I released a
few weeks ago, then you can just give it a LOGIN_SESSION_TIMEOUT
value, and the user will need to re-authentication after that amount
of idle time.


Your module will work perfect from me, but I must still be confused on the proper set-up. Here's what I'm trying now, but it doesn't "timeout" the user...


===============================================================
package MyApp;

$VERSION = '0.02';

use base 'CGI::Application';
use CGI::Application::Plugin::AutoRunmode;
use CGI::Application::Plugin::Session;
use CGI::Application::Plugin::Authentication;

__PACKAGE__->authen->config(
      DRIVER => [ 'Generic', \&check_password ],
      STORE => 'Session',
      LOGIN_SESSION_TIMEOUT => '60s',
      LOGOUT_RUNMODE => 'logout',
      LOGIN_RUNMODE => 'login');

__PACKAGE__->authen->protected_runmodes(qw(start
  									 home_screen
  									 contacts_screen
  									 reports_screen));

sub cgiapp_init {
  my $self = shift;

  # Set the CGI::Session cookie name
  CGI::Session->name('Fox');

  # Configure the session
  $self->session_config(
CGI_SESSION_OPTIONS => [ "driver:File", $self->query, {Directory=>$SetUp::session_path} ]
     );

  $self->session->param('my_session_option', 'a quick brown fox');

}
===============================================================

Continuing where the user left off is sometimes tricky, especially
when a user has just submitted a form.

Well, even if it works on some of the stuff I'm doing it will improve the app for the end user.

Thanks again Cees,

--
Bill Stephenson


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.