source: TI05-delivery/trunk/doc/epydoc/public/delivery.server.AuthHandler-class.html @ 1198

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/trunk/doc/epydoc/public/delivery.server.AuthHandler-class.html@1198
Revision 1198, 11.1 KB checked in by spascoe, 13 years ago (diff)

Updated epydoc documentation.

Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>delivery.server.AuthHandler</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
8</head>
9<body bgcolor="white" text="black" link="blue" vlink="#204080"
10      alink="#204080">
11
12<!-- =========== START OF NAVBAR =========== -->
13<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
14  <tr valign="center">
15    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="delivery-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
16    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
17    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
18    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
19    <th class="navbar" align="right" width="100%">
20      <table border="0" cellpadding="0" cellspacing="0">
21      <tr><th class="navbar" align="center">
22        <p class="nomargin">
23          NDG&nbsp;Delivery&nbsp;Service
24      </p></th></tr></table>
25    </th>
26  </tr>
27</table>
28<table width="100%" cellpadding="0" cellspacing="0">
29  <tr valign="top">
30    <td width="100%">
31      <font size="-1"><b class="breadcrumbs">
32        <a href="delivery-module.html">Package&nbsp;delivery</a> ::
33        <a href="delivery.server-module.html">Module&nbsp;server</a> ::
34        Class&nbsp;AuthHandler
35      </b></font></br>
36    </td>
37    <td><table cellpadding="0" cellspacing="0">
38      <tr><td align="right"><font size="-2">[<a href="../private/delivery.server.AuthHandler-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
39      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="delivery.server.AuthHandler-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
40    </table></td>
41</tr></table>
42
43<!-- =========== START OF CLASS DESCRIPTION =========== -->
44<h2 class="class">Type AuthHandler</h2>
45
46<pre class="base-tree">
47<a href="__builtin__.object-class.html"><code>object</code></a> --+
48         |
49        <b>AuthHandler</b>
50</pre><br />
51
52<dl><dt><b>Known Subclasses:</b></dt>
53<dd>
54    <a href="delivery.server.BasicClientAuthHandler-class.html"><code>BasicClientAuthHandler</code></a></dd></dl>
55
56<hr/>
57
58Abstract base class for implementing authentication.
59
60Subclasses should implement the authorise() method to authenticate clients connecting to
61the server.  An AuthHandler object is passed to start() when initialising the server.<hr/>
62
63
64<!-- =========== START OF METHOD SUMMARY =========== -->
65<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
66<tr bgcolor="#70b0f0" class="summary">
67  <th colspan="2">Method Summary</th></tr>
68<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
69  <td><code><span class="summary-sig"><a href="delivery.server.AuthHandler-class.html#authenticate" class="summary-sig-name"><code>authenticate</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
70<br />
71Authenticate a connection.</td></tr>
72<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
73  <td><code><span class="summary-sig"><a href="delivery.server.AuthHandler-class.html#recv" class="summary-sig-name"><code>recv</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
74<br />
75Receive a message from the client during authorisation.</td></tr>
76<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
77  <td><code><span class="summary-sig"><a href="delivery.server.AuthHandler-class.html#send" class="summary-sig-name"><code>send</code></a>(<span class=summary-sig-arg>self</span>,
78          <span class=summary-sig-arg>buffer</span>)</span></code>
79<br />
80Send a message to the client during authorisation.</td></tr>
81<tr bgcolor="#e8f0f8" class="group">
82  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from object</th></tr>
83<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
84  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
85<br />
86x.__init__(...) initializes x; see x.__class__.__doc__ for signature...</td></tr>
87<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
88  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
89<br />
90x.__delattr__('name') <==> del x.name...</td></tr>
91<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
92  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
93<br />
94x.__getattribute__('name') <==> x.name...</td></tr>
95<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
96  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
97<br />
98x.__hash__() <==> hash(x)...</td></tr>
99<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
100  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
101          <span class=summary-sig-arg>S</span>,
102          <span class="summary-sig-vararg">...</span>)</span></code>
103<br />
104T.__new__(S, ...) -> a new object with type S, a subtype of T...</td></tr>
105<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
106  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
107<br />
108helper for pickle...</td></tr>
109<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
110  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
111<br />
112helper for pickle...</td></tr>
113<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
114  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
115<br />
116x.__repr__() <==> repr(x)...</td></tr>
117<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
118  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
119<br />
120x.__setattr__('name', value) <==> x.name = value...</td></tr>
121<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
122  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
123<br />
124x.__str__() <==> str(x)...</td></tr>
125</table><br />
126
127
128<!-- =========== START OF METHOD DETAILS =========== -->
129<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
130<tr bgcolor="#70b0f0" class="details">
131  <th colspan="2">Method Details</th></tr>
132</table>
133
134<a name="authenticate"></a>
135<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
136  <h3><span class="sig"><span class="sig-name">authenticate</span>(<span class=sig-arg>self</span>)</span>
137  </h3>
138Authenticate a connection.
139
140This function should be overridden in subclasses to implement authentication using
141the method calls self.send() and send.recv().  It is called by the bbftp server process
142created using the start() function.
143  <dl><dt></dt><dd>
144    <dl><dt><b>Returns:</b></dt>
145      <dd>
146an AuthzHandler instance if authentication succeeds.  Any false value is considered
147    an authorisation failure.
148      </dd>
149    </dl>
150    <dl><dt><b>Raises:</b></dt>
151      <dd><code><b>AuthorisationFailure</b></code> -
152the preferred way of signaling authorisation failure to
153    the bbftp server process.    </dl>
154<p><b>Note:</b> because the server process forks on each connection, calls to authorise() will
155    see the state of the python interpreter as it was when start() was called.
156</p>
157
158  </dd></dl>
159</td></tr></table>
160
161<a name="recv"></a>
162<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
163  <h3><span class="sig"><span class="sig-name">recv</span>(<span class=sig-arg>self</span>)</span>
164  </h3>
165Receive a message from the client during authorisation.
166
167This method must only be used from within self.authorise() which has been called
168from the bbftp server process started by start().
169  <dl><dt></dt><dd>
170    <dl><dt><b>Returns:</b></dt>
171      <dd>
172a string containing the message received.      </dd>
173    </dl>
174  </dd></dl>
175</td></tr></table>
176
177<a name="send"></a>
178<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
179  <h3><span class="sig"><span class="sig-name">send</span>(<span class=sig-arg>self</span>,
180          <span class=sig-arg>buffer</span>)</span>
181  </h3>
182Send a message to the client during authorisation.
183
184This method must only be used from within self.authorise() which has been called
185from the bbftp server process started by start().
186  <dl><dt></dt><dd>
187    <dl><dt><b>Parameters:</b></dt>
188      <dd><code><b>buffer</b></code> -
189 a string containing the message to send.
190      </dd>
191    </dl>
192  </dd></dl>
193</td></tr></table>
194<br />
195
196
197<!-- =========== START OF NAVBAR =========== -->
198<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
199  <tr valign="center">
200    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="delivery-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
201    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
202    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
203    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
204    <th class="navbar" align="right" width="100%">
205      <table border="0" cellpadding="0" cellspacing="0">
206      <tr><th class="navbar" align="center">
207        <p class="nomargin">
208          NDG&nbsp;Delivery&nbsp;Service
209      </p></th></tr></table>
210    </th>
211  </tr>
212</table>
213
214<table border="0" cellpadding="0" cellspacing="0" width="100%">
215  <tr>
216    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu Jun 15 15:59:14 2006</font></td>
217    <td align="right"><a href="http://epydoc.sourceforge.net"
218                      ><font size="-2">http://epydoc.sf.net</font></a></td>
219  </tr>
220</table>
221</body>
222</html>
Note: See TracBrowser for help on using the repository browser.