When you call the web service as follows:
username = 'test12' password = 'test34' client = httplib2.Http(".cache") client.add_credentials(username,password) URL = "http://localhost:8080/wyWebServiceTest" response, content = client.request(URL)
How do you get the username / password in the variables on the server side (i.e. in the web service that I am writing). I checked self.request.headers and self.request.environ and could not find them.
(I do not use Google Login, it is necessary to scan this user ID / pass against my own database in order to verify security.)
I tried to think from this page: http://pythonpaste.org/webob/reference.html#headers
Thanks,
Neal Walters
A slight improvement to the Peter code below:
auth = None if 'Authorization' in self.request.headers: auth = self.request.headers['Authorization'] if not auth:
source share