perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tosh Cooey <>
Subject Dynamically setting Domain during authentication while using Apache2::AuthCookieDBI
Date Wed, 16 Sep 2015 17:43:03 GMT
I need an auth cookie to be valid across all subdomains I have, so it 
makes sense to set the cookie domain to

However setting that in the Apache config via:

PerlSetVar MyDomain

Isn't what I need since I want to be able to use: etc depending on which domain $r->hostname returns.

I'm using Domain::PublicSuffix to accurately determine the suffix (root) 
domain so all good there.

My first attempt was to subclass Apache2::AuthCookieDBI and override one 
of the first functions with a call to $r->dir_config, like this:

my $auth_name = $r->auth_name;
my $hostname = $r->hostname;
... stuff with domain name ...
$r->dir_config("$auth_nameDomain", $suffix);

But it seems I am missing some way things work since uh... I'm still 
getting for my cookie domain.

Am I doing it all wrong?  Over-complicating?  Is there an easier way to 
do this?

Thanks for any guidance!


McIntosh Cooey - Twelve Hundred Group LLC -

View raw message