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

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


On 10/10/05, Bill Stephenson <suppressed> wrote:
> I stuck it in here...
>
>   __PACKAGE__->authen->config(
>          DRIVER => [ 'Generic', \&check_password ],
>          STORE => ['Session',
>          CGI::Session->name('Fox')],
>          LOGOUT_RUNMODE => 'logout',
>          LOGIN_RUNMODE => 'login');

Although that works, I am not sure if that is the cleanest way of
doing it.  I would stick with just  STORE => 'Session'  there, and
move the CGI::Session->name('Fox') call below

> Then I changed my "cgiapp_init" to this...
>
>   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} ],
>         DEFAULT_EXPIRY      => '+1w',
>         COOKIE_PARAMS       => {
>                                  -expires => '+1m',
>                                  -path    => '/',
>                                },
>         SEND_COOKIE         => 1,
>      );
>
>    }

Also, is there a reason why you set the session expiry to 1 week, but
the cookie expiry to 1 month?  If you leave off the cookie expiry,
then CAP::Session will automatically set the expiry on the cookie to
the expiry of the Session object.

> and now it works like a charm :)

Great.  Glad that you got things working.

Cheers,

Cees

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