[mod_python] Authentification/Session Management

Terry MacDonald terry.macdonald at dsl.pipex.com
Wed Oct 27 17:57:19 EDT 2004


along the same lines...

def authenhandler( req ) :
    req.session = Session.Session(req, timeout=300)
    if req.session.is_new() :
        if 'eggs' == req.user and 'spam' == req.get_basic_auth_pw() :
            req.session.save()
        else:
            return apache.HTTP_UNAUTHORIZED
    return apache.OK

cheers

Terry    :)



Registered Linux User # 311806 
Get Firefox



More information about the Mod_python mailing list