NAME

AIS::client - get an authenticated e-mail address for users of your web service

SYNOPSIS

BEGIN{umask(0077 & umask())}; # if your web server gives you a 0177 umask
use AIS::client;
print "Content-type: text/plain\n\nWelcome $AIS_IDENTITY\n";
print "this is page view number ", ++$AIS_STASH{accesses};
__END__

DESCRIPTION

The goal of AIS::client is to provide a very easy way to require an authenticated identity for a perl web application. The user's e-mail address appears in a global variable $AIS_IDENTITY and a persistent session stash is available in %AIS_STASH.

USE-LINE CONFIGURATION OPTIONS

aissri

By default, AIS::client will refer to the AIS service defined at http://www.pay2send.com/cgi/ais/ but an alternate AIS service can be specified with the aissri parameter:

use AIS::client aissri => 'http://www.cpan.org/service/ais/';
agent

By default, AIS::client will give the URL of the webpage being requested as the agent string, but an alternate agent string can be specified with the agent parameter:

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.

prefix

By default, AIS, which means that AIS::client will store session data (incliding identity, which is also available as $AIS_STASH{identity}) in subdirectories under a directory called AIS_sessions under the current directory your script runs in. This can be changed with the 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 AIS_session.

freq

By default, AIS::client will examine the session directory for stale sessions approximately once every 2000 invocations. Adjust this with the freq parameter. 0 will suppress housekeeping entirely.

maxage

Minimum time in seconds since $AIS_STASH{last_access} that will trigger session deletion at housekeeping time. Defaults to 72*60*60.

ENDING SESSIONS

AIS::client recognizes a reserved QUERY_STRING of 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.

HISTORY

0.05
This is the first public AIS client module release with this
interface, which is entirely different from the CGI::AIS::Session
interface.
0.06
fixed the Makefile.pl to call in DirDB
0.07
installation problems due to permissions now go to the
web browser instead of silently dying. 

redirections now done with more portable REFRESH meta tags
instead of (along with) less portable Location: headers

SUPPORT

please use rt.cpan.org to report problems (and successes!) (And wishes!)

AUTHOR

David Nicol <davidnico@cpan.org>

SEE ALSO

CGI::Session::Auth does something very similar.

CGI::AIS::Session is now deprecated and replaced.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 361:

'=item' outside of any '=over'

Around line 406:

You forgot a '=back' before '=head1'