AIS-client
view release on metacpan or search on metacpan
redirect(
"$aisvar{aissri}add?RU=http$ssl_ext://$ENV{SERVER_NAME}$ENV{SCRIPT_NAME}$ENV{PATH_INFO}");
exit;
};
# hooray! we have an identity.
foreach (keys %aisvar){
$Sessions{$Coo}->{$_} = $aisvar{$_};
};
#reconstruct initial form data if any
$ENV{QUERY_STRING} = delete $Sessions{$Coo}->{QueryString};
if(exists $Sessions{$Coo}->{PostData}){
pipe(POSTREAD,POSTWRITE) or die "Cannot create pipe: $!";
if (fork){
# we are in parent
close POSTWRITE;
open STDIN, "<&POSTREAD";
$ENV{REQUEST_METHOD} = 'POST';
}else{
# in child -- write POSTdata to pipe and exit
close STDOUT;
close STDIN;
close POSTREAD;
print POSTWRITE delete $Sessions{$Coo}->{PostData};
close POSTWRITE or die "$$: Error closing POSTWRITE\n";
# exit;
#POSIX:_exit(0); # perldoc -f exit
exec '/usr/bin/true';
};
# HAVEOTUKEYEVAL
use AIS::client aissri => "Bob's web services: account MZNXBCV";
It is expected that a subscription-based or otherwise access-controlled
AIS service might issue expiring capability keys which would have to be
listed as part of the agent string.
=item prefix
By default, C<AIS>, which means that AIS::client will store session
data (incliding identity, which is also available as
C<$AIS_STASH{identity}>) in subdirectories under a directory
called C<AIS_sessions> under the current directory
your script runs in. This can be changed with the C<prefix> parameter:
use AIS::client prefix => '.AIS'; # hide session directory
The prefix is also used as the prefix for the session cookie name,
which defaults to C<AIS_session>.
=item freq
=item maxage
Minimum time in seconds since C<$AIS_STASH{last_access}> that will
trigger session deletion at housekeeping time. Defaults to C<72*60*60>.
=head1 ENDING SESSIONS
AIS::client recognizes a reserved QUERY_STRING of C<LOGOUT> which will
end a session, delete all session data, and offer the user a link to
the logout function of the specified AIS server so they can log out
of that too if they want.
=head1 HISTORY
=over 8
=item 0.05
This is the first public AIS client module release with this
( run in 0.232 second using v1.01-cache-2.11-cpan-8d75d55dd25 )