~ubuntu-branches/ubuntu/hardy/libapache2-mod-python/hardy

« back to all changes in this revision

Viewing changes to doc-html/tut-more-complicated.html

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2007-04-12 20:52:05 UTC
  • mfrom: (1.2.4 upstream) (1.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070412205205-j4qlsw3o4tl615iq
Tags: 3.3.1-1
* New upstream release
* Remove configure and mod_python.h files in clean rule to make the diff.gz
  file smaller
* Current Python version in libapache2-mod-pythonX.Y package name (Provides:
  field) filled in automatically.
* Added XS-Vcs-Browser field

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<link rel="STYLESHEET" href="modpython.css" type='text/css'>
5
 
<link rel="first" href="modpython.html" title='Mod_python Manual'>
6
 
<link rel='contents' href='contents.html' title="Contents">
7
 
<link rel='index' href='genindex.html' title='Index'>
8
 
<link rel='last' href='about.html' title='About this document...'>
9
 
<link rel='help' href='about.html' title='About this document...'>
10
 
<LINK REL="next" href="tut-404-handler.html">
11
 
<LINK REL="prev" href="tut-what-it-do.html">
12
 
<LINK REL="parent" href="tutorial.html">
13
 
<LINK REL="next" href="tut-404-handler.html">
14
 
<meta name='aesop' content='information'>
15
 
<META NAME="description" CONTENT="Now something More Complicated - Authentication">
16
 
<META NAME="keywords" CONTENT="modpython">
17
 
<META NAME="resource-type" CONTENT="document">
18
 
<META NAME="distribution" CONTENT="global">
 
4
<link rel="STYLESHEET" href="modpython.css" type='text/css' />
 
5
<link rel="first" href="modpython.html" title='Mod_python Manual' />
 
6
<link rel='contents' href='contents.html' title="Contents" />
 
7
<link rel='index' href='genindex.html' title='Index' />
 
8
<link rel='last' href='about.html' title='About this document...' />
 
9
<link rel='help' href='about.html' title='About this document...' />
 
10
<link rel="next" href="tut-404-handler.html" />
 
11
<link rel="prev" href="tut-what-it-do.html" />
 
12
<link rel="parent" href="tutorial.html" />
 
13
<link rel="next" href="tut-404-handler.html" />
 
14
<meta name='aesop' content='information' />
19
15
<title>3.4 Now something More Complicated - Authentication</title>
20
16
</head>
21
17
<body>
22
18
<DIV CLASS="navigation">
 
19
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
23
20
<table align="center" width="100%" cellpadding="0" cellspacing="2">
24
21
<tr>
25
 
<td><a rel="prev" title="3.3 So what Exactly" 
26
 
  href="tut-what-it-do.html"><img src='previous.gif'
27
 
  border='0' height='32'  alt='Previous Page' width='32'></A></td>
28
 
<td><a rel="parent" title="3. Tutorial" 
29
 
  href="tutorial.html"><img src='up.gif'
30
 
  border='0' height='32'  alt='Up One Level' width='32'></A></td>
31
 
<td><a rel="next" title="3.5 Your Own 404" 
32
 
  href="tut-404-handler.html"><img src='next.gif'
33
 
  border='0' height='32'  alt='Next Page' width='32'></A></td>
 
22
<td class='online-navigation'><a rel="prev" title="3.3 So what Exactly"
 
23
  href="tut-what-it-do.html"><img src='previous.png'
 
24
  border='0' height='32'  alt='Previous Page' width='32' /></A></td>
 
25
<td class='online-navigation'><a rel="parent" title="3. Tutorial"
 
26
  href="tutorial.html"><img src='up.png'
 
27
  border='0' height='32'  alt='Up One Level' width='32' /></A></td>
 
28
<td class='online-navigation'><a rel="next" title="3.5 Your Own 404"
 
29
  href="tut-404-handler.html"><img src='next.png'
 
30
  border='0' height='32'  alt='Next Page' width='32' /></A></td>
34
31
<td align="center" width="100%">Mod_python Manual</td>
35
 
<td><a rel="contents" title="Table of Contents" 
36
 
  href="contents.html"><img src='contents.gif'
37
 
  border='0' height='32'  alt='Contents' width='32'></A></td>
38
 
<td><img src='blank.gif'
39
 
  border='0' height='32'  alt='' width='32'></td>
40
 
<td><a rel="index" title="Index" 
41
 
  href="genindex.html"><img src='index.gif'
42
 
  border='0' height='32'  alt='Index' width='32'></A></td>
 
32
<td class='online-navigation'><a rel="contents" title="Table of Contents"
 
33
  href="contents.html"><img src='contents.png'
 
34
  border='0' height='32'  alt='Contents' width='32' /></A></td>
 
35
<td class='online-navigation'><img src='blank.png'
 
36
  border='0' height='32'  alt='' width='32' /></td>
 
37
<td class='online-navigation'><a rel="index" title="Index"
 
38
  href="genindex.html"><img src='index.png'
 
39
  border='0' height='32'  alt='Index' width='32' /></A></td>
43
40
</tr></table>
 
41
<div class='online-navigation'>
44
42
<b class="navlabel">Previous:</b>
45
43
<a class="sectref" rel="prev" href="tut-what-it-do.html">3.3 So what Exactly</A>
46
44
<b class="navlabel">Up:</b>
47
45
<a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A>
48
46
<b class="navlabel">Next:</b>
49
47
<a class="sectref" rel="next" href="tut-404-handler.html">3.5 Your Own 404</A>
50
 
<br><hr>
 
48
</div>
 
49
<hr /></div>
51
50
</DIV>
52
51
<!--End of Navigation Panel-->
53
52
 
54
 
<H1><A NAME="SECTION005400000000000000000">&nbsp;</A>
 
53
<H1><A NAME="SECTION005400000000000000000"></A><A NAME="tut-more-complicated"></A>
55
54
<BR>
56
55
3.4 Now something More Complicated - Authentication
57
56
</H1>
65
64
login to be "<tt class="samp">spam</tt>", and the password to be "<tt class="samp">eggs</tt>".
66
65
 
67
66
<P>
68
 
First, we need to tell Apache to call our <i>authentication</i>
 
67
First, we need to tell Apache to call our <em>authentication</em>
69
68
handler when authentication is needed. We do this by adding the
70
69
<code>PythonAuthenHandler</code>. So now our config looks like this:
71
70
 
104
103
</pre></div>          
105
104
 
106
105
<P>
 
106
Note that depending on which version of Apache is being used, you may need
 
107
to set either the <code>AuthAuthoritative</code> or <code>AuthBasicAuthoritative</code>
 
108
directive to <code>Off</code> to tell Apache that you want allow the task of
 
109
performing basic authentication to fall through to your handler.
 
110
 
 
111
<P>
107
112
Now we need to write an authentication handler function in
108
113
<span class="file">myscript.py</span>. A basic authentication handler would look like
109
114
this:
195
200
<P>
196
201
 
197
202
<DIV CLASS="navigation">
198
 
<p><hr>
 
203
<div class='online-navigation'>
 
204
<p></p><hr />
199
205
<table align="center" width="100%" cellpadding="0" cellspacing="2">
200
206
<tr>
201
 
<td><a rel="prev" title="3.3 So what Exactly" 
202
 
  rel="prev" title="3.3 So what Exactly" 
203
 
  href="tut-what-it-do.html"><img src='previous.gif'
204
 
  border='0' height='32'  alt='Previous Page' width='32'></A></td>
205
 
<td><a rel="parent" title="3. Tutorial" 
206
 
  rel="parent" title="3. Tutorial" 
207
 
  href="tutorial.html"><img src='up.gif'
208
 
  border='0' height='32'  alt='Up One Level' width='32'></A></td>
209
 
<td><a rel="next" title="3.5 Your Own 404" 
210
 
  rel="next" title="3.5 Your Own 404" 
211
 
  href="tut-404-handler.html"><img src='next.gif'
212
 
  border='0' height='32'  alt='Next Page' width='32'></A></td>
 
207
<td class='online-navigation'><a rel="prev" title="3.3 So what Exactly"
 
208
  href="tut-what-it-do.html"><img src='previous.png'
 
209
  border='0' height='32'  alt='Previous Page' width='32' /></A></td>
 
210
<td class='online-navigation'><a rel="parent" title="3. Tutorial"
 
211
  href="tutorial.html"><img src='up.png'
 
212
  border='0' height='32'  alt='Up One Level' width='32' /></A></td>
 
213
<td class='online-navigation'><a rel="next" title="3.5 Your Own 404"
 
214
  href="tut-404-handler.html"><img src='next.png'
 
215
  border='0' height='32'  alt='Next Page' width='32' /></A></td>
213
216
<td align="center" width="100%">Mod_python Manual</td>
214
 
<td><a rel="contents" title="Table of Contents" 
215
 
  rel="contents" title="Table of Contents" 
216
 
  href="contents.html"><img src='contents.gif'
217
 
  border='0' height='32'  alt='Contents' width='32'></A></td>
218
 
<td><img src='blank.gif'
219
 
  border='0' height='32'  alt='' width='32'></td>
220
 
<td><a rel="index" title="Index" 
221
 
  rel="index" title="Index" 
222
 
  href="genindex.html"><img src='index.gif'
223
 
  border='0' height='32'  alt='Index' width='32'></A></td>
 
217
<td class='online-navigation'><a rel="contents" title="Table of Contents"
 
218
  href="contents.html"><img src='contents.png'
 
219
  border='0' height='32'  alt='Contents' width='32' /></A></td>
 
220
<td class='online-navigation'><img src='blank.png'
 
221
  border='0' height='32'  alt='' width='32' /></td>
 
222
<td class='online-navigation'><a rel="index" title="Index"
 
223
  href="genindex.html"><img src='index.png'
 
224
  border='0' height='32'  alt='Index' width='32' /></A></td>
224
225
</tr></table>
 
226
<div class='online-navigation'>
225
227
<b class="navlabel">Previous:</b>
226
228
<a class="sectref" rel="prev" href="tut-what-it-do.html">3.3 So what Exactly</A>
227
229
<b class="navlabel">Up:</b>
228
230
<a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A>
229
231
<b class="navlabel">Next:</b>
230
232
<a class="sectref" rel="next" href="tut-404-handler.html">3.5 Your Own 404</A>
231
 
<hr>
232
 
<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span>
 
233
</div>
 
234
</div>
 
235
<hr />
 
236
<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span>
233
237
</DIV>
234
238
<!--End of Navigation Panel-->
235
239