Patrick Lewis wrote:
> Of course, immediately after I posted this, I realized that it's
> probably easier to just modify the existing login controller in this
> case.
D'oh!
I completely failed to realize that I could just make the login
controller handle the 401.
if cherrypy.request.path[:5] == '/api/':
cherrypy.response.status = 401
cherrypy.response.headers['WWW-Authenticate'] = 'Basic
realm="API"'
return 'AUTHFAIL\n'
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---