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

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


On Oct 10, 2005, at 3:37 AM, Cees Hek wrote:

So check out the docs for  CAP::Session and see how to change the
cookie name there.  I'll save you some time:

CGI::Session->name('MYCOOKIENAME');

Put that call somewhere in your code, and CGI::Session wll look for
this cookie name instead of the default one.

I stuck it in here...

 __PACKAGE__->authen->config(
        DRIVER => [ 'Generic', \&check_password ],
        STORE => ['Session',
        CGI::Session->name('Fox')],
        LOGOUT_RUNMODE => 'logout',
        LOGIN_RUNMODE => 'login');

Then I changed my "cgiapp_init" to this...

 sub cgiapp_init {
    my $self = shift;

    # Configure the session
    $self->session_config(
CGI_SESSION_OPTIONS => [ "driver:File", $self->query, {Directory=>$SetUp::session_path} ],
       DEFAULT_EXPIRY      => '+1w',
       COOKIE_PARAMS       => {
                                -expires => '+1m',
                                -path    => '/',
                              },
       SEND_COOKIE         => 1,
    );

  }

and now it works like a charm :)

Thanks a ton, Cees, for lifting me over this hump!

--
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.