[cgiapp] Saving Data From Authentication Phase
Rhesa Rozendaal
perl at rhesa.com
Tue Jan 8 13:42:59 EST 2008
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
More information about the cgiapp
mailing list