overworked has asked for the wisdom of the Perl Monks concerning the following question:
All powerful monks I seek some wisdom, I started to built a apache module to check if a cookie exist, if not it would check authentication against a custom database. if granted I would like to set/drop a encrypted cookie on the client. Then as the client moves through out the site I can check for the cookie and to make sure its valid.
So I'm at the point where I create a cookie and I have checked it and it is created, it seems I can never get it to drop on the clients browser. I have tried a number of ways but none work.
Here is some code
sub new_cookie {
my($product, $plaintext,$cipher) = @_;
my $ciphertext = $cipher->encrypt_hex($plaintext);
return new CGI::Cookie(
-name=>$product,
-value=>$ciphertext,
-path=>'/',
-expires=>''
);
}
$new_cookie_product = new_cookie($product,$plaintext,$cipher);
I have tried a number of things to drop the cookie on the client, but none of the examples I have worked.
- Comment on CGI:Cookie, Apache2, Mod_perl2
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI:Cookie, Apache2, Mod_perl2
by lihao (Monk) on Jun 13, 2008 at 18:33 UTC | |
|
Re: CGI:Cookie, Apache2, Mod_perl2
by almut (Canon) on Jun 13, 2008 at 18:15 UTC | |
by overworked (Novice) on Jun 13, 2008 at 19:29 UTC | |
by almut (Canon) on Jun 13, 2008 at 20:18 UTC | |
by overworked (Novice) on Jun 16, 2008 at 02:13 UTC | |
by almut (Canon) on Jun 16, 2008 at 09:01 UTC |