<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>req.connection.user generates AttributeError</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">I'm new to mod_python, and I'm stuck already.&nbsp; I'm working through the examples in the documentation, and even after careful typing (and cutting and pasting from the manual), I can't get the authentication example to work.&nbsp; The line:</FONT></P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">user = req.connection.user</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Gives an attribute error ('user').&nbsp; As shown in the manual, I'm calling req.get_basic_auth_pw() first, but still no joy.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">If I try/except to trap the attribute error, I avoid the 500 Server Error message, but the authentication still doesn't work.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Any ideas?&nbsp; I'm running Windows 2000, Apache 2.0.47, Python 2.2, and mod_python 3.0.3.&nbsp; (My other computer is a Linux box, but this is what I've got right going right now).&nbsp; The mod_python is a precompiled binary.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I'll be grateful for any assistance I can get.&nbsp; I'm trying to recreate a mod_perl module (AuthCookie) which implements a ticket-based authentication mechanism.&nbsp; It works well in Perl, but my group standardized on Python and we'd like to keep using Python for Apache modules, too.</FONT></P>

<P><B><FONT SIZE=2 FACE="Arial">Cheers!</FONT></B>
<BR><FONT SIZE=2 FACE="Arial">--</FONT>
<BR><FONT SIZE=2 FACE="Arial">David Hancock | dhancock@arinc.com | 410-266-4384</FONT>
</P>

</BODY>
</HTML>