durusmail: quixote-users: Basic auth. in Quixote
Basic auth. in Quixote
2003-11-04
2003-11-05
2003-11-05
Basic auth. in Quixote
Jørgen Larsen
2003-11-04
Hi,

I'm trying to do basic auth. in my Quixote application


I added this to my Apache conf.




I added this to my quixote.mod_python_handler

def authenhandler(req):
  password = req.get_basic_auth_pw()
  print "PASSWORD## ", password
  print "USER###### ", req.user
  user = req.user
  if user == None:
    req.user = ''
  if user == "xxxx" and password == "xxxx":
    return apache.OK
  else:
    return apache.HTTP_UNAUTHORIZED

This works fine ie. it print the username and the password - so far so good.

My problem is how I integrate the mod_python authenhandler() and the Quixote
framework in a nice way - can somebody give me a clue? please ;) or is there
an easier way to do basic auth. in the Quixote framework?

Best Regards
Jørgen Larsen



reply