logo       
Google Custom Search
    AddThis Social Bookmark Button

CAP::Authentication Setup Help: msg#00062

Subject: CAP::Authentication Setup Help
I'm trying out CAP::Authentication. It seems to be working in that, when I attempt to access a protected runmode, it redirects me to my login.cgi which is defined in LOGIN_URL parameter. After a successful login, the login script redirects me back to the initial app script runmode using the destination hidden field. However, the destination script redirects me back to the login page? Can someone share a working authentication setup that uses and external login script defined using LOGIN_URL. Do I need to manage my own session data to make this work?

Here's my setup

My::App:

__PACKAGE__->authen->config(
   DRIVER => ['DBI',
   DBH    => Flat::DB::Users->db_Main(),
TABLE => 'wo_users', STORE => 'Session',
       CONSTRAINTS => {
           'user_name'                => 'authen_username',
           'MD5_base64:user_password' => 'authen_password',
       },
   ],

   LOGIN_URL => 'http://myserver.com/login.cgi',
);

__PACKAGE__->protected_runmode('myrunmode');



My login.cgi script:

sub login_form : Runmode {
        ...

       my $authen_ok = $self->process_login();
       if ($authen_ok) {
           $self->header_type('redirect');
           $self->header_props(-url => $q->param('destination'));

           return "Redirecting to ".$q->param('destination');

       }
       else {
           $tmpl->param('MESSAGE', 'Invalid Login. Try Again');

        ....
}


My questions:
1. If I'm using an external login script (URL), do I have to configure a DRIVER and handle my own session?
2. Does the login have to set/create the sessions?

Thanks,

-Carlos

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





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>