简体   繁体   中英

Authentication with mod_python without login credentials popup

I am using Centos server with apache server. I have added python script that reads my website's login cookie and based on that it return apache.OK or apache.HTTP_UNAUTHORIZED. However even if cookies is present, it will pop up that login form.

Any help on how to remove that pop up is appreciated.

I tried removing AuthType Basic, but than i get following error

The server encountered an internal error or misconfiguration and was unable to complete your request.

  <Directory "/var/www/html/reports" >
  AddHandler mod_python .py
  PythonHandler /tmp/access.py
  PythonAuthenHandler /tmp/access.py
  PythonDebug On
  SSLRequireSSL
  AllowOverride AuthConfig
  #AuthType Basic
  AuthName "Restricted Area"
  AuthBasicAuthoritative Off
  Options -Indexes
  require valid-user

just found out if you don't want login pop up , you will have to set up req.user to something

It was throwing error before that req.user is null. I did this req.user = "nobody"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM