templates!!!
[freeside.git] / httemplate / docs / man / FS / SessionClient.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::SessionClient - Freeside session client API</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
5 </HEAD>
6
7 <BODY>
8
9 <A NAME="__index__"></A>
10 <!-- INDEX BEGIN -->
11
12 <UL>
13
14         <LI><A HREF="#name">NAME</A></LI>
15         <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16         <LI><A HREF="#description">DESCRIPTION</A></LI>
17         <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
18         <LI><A HREF="#version">VERSION</A></LI>
19         <LI><A HREF="#bugs">BUGS</A></LI>
20         <LI><A HREF="#see also">SEE ALSO</A></LI>
21 </UL>
22 <!-- INDEX END -->
23
24 <HR>
25 <P>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::SessionClient - Freeside session client API</P>
28 <P>
29 <HR>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
31 <PRE>
32   use FS::SessionClient qw( login portnum logout );</PRE>
33 <PRE>
34   $error = login ( {
35     'username' =&gt; $username,
36     'password' =&gt; $password,
37     'login'    =&gt; $timestamp,
38     'portnum'  =&gt; $portnum,
39   } );</PRE>
40 <PRE>
41   $portnum = portnum( { 'ip' =&gt; $ip } ) or die &quot;unknown ip!&quot;
42   $portnum = portnum( { 'nasnum' =&gt; $nasnum, 'nasport' =&gt; $nasport } )
43     or die &quot;unknown nasnum/nasport&quot;;</PRE>
44 <PRE>
45   $error = logout ( {
46     'username' =&gt; $username,
47     'password' =&gt; $password,
48     'logout'   =&gt; $timestamp,
49     'portnum'  =&gt; $portnum,
50   } );</PRE>
51 <P>
52 <HR>
53 <H1><A NAME="description">DESCRIPTION</A></H1>
54 <P>This modules provides an API for a remote session application.</P>
55 <P>It needs to be run as the freeside user.  Because of this, the program which
56 calls these subroutines should be written very carefully.</P>
57 <P>
58 <HR>
59 <H1><A NAME="subroutines">SUBROUTINES</A></H1>
60 <DL>
61 <DT><STRONG><A NAME="item_login">login HASHREF</A></STRONG><BR>
62 <DD>
63 HASHREF should have the following keys: username, password, login and portnum.
64 login is a UNIX timestamp; if not specified, will default to the current time.
65 Starts a new session for the specified user and portnum.  The password is
66 optional, but must be correct if specified.
67 <P>Returns a scalar error message, or the empty string for success.</P>
68 <P></P>
69 <DT><STRONG><A NAME="item_portnum">portnum</A></STRONG><BR>
70 <DD>
71 HASHREF should contain a single key: ip, or the two keys: nasnum and nasport.
72 Returns a portnum suitable for the login and logout subroutines, or false
73 on error.
74 <P></P>
75 <DT><STRONG><A NAME="item_logout">logout HASHREF</A></STRONG><BR>
76 <DD>
77 HASHREF should have the following keys: usrename, password, logout and portnum.
78 logout is a UNIX timestamp; if not specified, will default to the current time.
79 Starts a new session for the specified user and portnum.  The password is
80 optional, but must be correct if specified.
81 <P>Returns a scalar error message, or the empty string for success.</P>
82 <P></P></DL>
83 <P>
84 <HR>
85 <H1><A NAME="version">VERSION</A></H1>
86 <P>$Id: SessionClient.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P>
87 <P>
88 <HR>
89 <H1><A NAME="bugs">BUGS</A></H1>
90 <P>
91 <HR>
92 <H1><A NAME="see also">SEE ALSO</A></H1>
93 <P><EM>fs_sessiond</EM></P>
94
95 </BODY>
96
97 </HTML>