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

Re: [cgiapp] Saving Data From Authentication Phase


suppressed 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://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.