I have set up OpenAm as authentication module for my python server. In front of my python server is Apache http server working as reverse proxy. OPenAM agent was installed on the Apache http server. Every call to the Apache http server was first redirected to OpenAm server for authentication, and OpenAm will forward some user attributes in http head to the Apache server after authentication. Using php code, I could easily dump contents from the header. So my question is: Is there any way I could retrieve these information from http head in my python server?
Asked
Active
Viewed 219 times
2
-
1What is the `python server`? Is this a web framework like django, flask, etc. Or is this something else? – jaime Apr 02 '14 at 16:11
-
It is twisted web server underneath, but they did modification heavily. Thanks. – Bigyellowbee Apr 02 '14 at 16:15
-
You can probably reuse this: https://github.com/jathanism/python-opensso – garnertb Apr 02 '14 at 16:16
-
Thanks for your lead. However, I am using certificate/ocsp validation instead of user name and passwords. – Bigyellowbee Apr 02 '14 at 16:21
1 Answers
1
http://modpython.org/live/mod_python-3.3.1/doc-html/pyapi-mprequest-mem.html
headers_in
of course you have to configure the agent to inject the needed headers, see my reply on openam alias.

Bernhard Thalmayr
- 2,674
- 1
- 11
- 7
-
Bernhard, Thank you for pointing me to mod_python. Though it is not my favorite solution, it works. Thanks again. – Bigyellowbee Apr 03 '14 at 21:06