I want to achieve Authentication in some pylons Controllers

I know there is Authkit and other stuff around , but nothing seems to
be a s simple as I need it.
When using simpleservers I just do: self.send_response(401,
'UNAUTHORIZED'); self.send_header('WWW-Authenticate', 'Basic
realm=""')
then catching the headers and comparing it with a Base64 encoded auth
string.

How Can I do this with pylons?

I did:

response.headers.clear()
response.headers = {'WWW-Authenticate': 'Basic realm="test"'}
response.status = 401;
return

When I watch the headers its sending my headers, but afterwards also
some other headers, which break everything.


How Can I just create a middleware, which inserts my headers, when
calling it from any controller, and doing basic authentication then?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to