[cgiapp] Saving Data From Authentication Phase

adam at spatialsystems.org adam at spatialsystems.org
Tue Jan 8 14:45:35 EST 2008


I figured it out.  My subroutine needed to be declared in my setup.  It was being declared in the Webapp namespace and not the Webapp::setup namespace.  That's why $self wasn't available for storing it into the session.

Thanks,
Adam


>-------- Original Message --------
>Subject: Re: [cgiapp] Saving Data From Authentication Phase
>From: Rhesa Rozendaal <perl at rhesa.com>
>Date: Tue, January 08, 2008 12:42 pm
>To: CGI Application <cgiapp at lists.openlib.org>
>
>adam at spatialsystems.org wrote:
>> How can I save this hashref ( $users_hash_ref = $ad_auth->getUserInfo ) of user info and keep it in my Session for all requests where the user is logged in?
>
>Isn't that the usual:
>
># store it inside &my_login
>$self->session->param( ad_auth_userinfo => $ad_auth->getUserInfo );
>
># use it elsewhere
>my $userinfo = $self->session->param( 'ad_auth_userinfo' );
>
>
>> Here is some of my code:
>>
>> sub setup {
>>
>> # setup authentication
>> $self->authen->config(
>> DRIVER => [ 'Generic', \&my_login ],
>> STORE => 'Session',
>> LOGIN_RUNMODE => 'login',
>> POST_LOGIN_RUNMODE => 'main',
>> LOGOUT_RUNMODE => 'login',
>> );
>>
>> }
>
>CAP::Authentication also has a authen->username method that you might be able
>to use. It won't have all your AD info, of course, but it might be enough for
>your application.
>
>HTH,
>Rhesa
>




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





More information about the cgiapp mailing list