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


NAME

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


SYNOPSIS

  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

  1. 05
            This is the first public AIS client module release with this
            interface, which is entirely different from the CGI::AIS::Session
            interface.


SUPPORT

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


AUTHOR

David Nicol <davidnico@cpan.org>


SEE ALSO

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

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

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