Identity allows you to use a callable to route identity errors rather
than a straight url (like '/login'). So you might be able to do
something like the following (untested):
def identity_error(err):
if cherrypy.request.identity_login_attempted
and cherrypy.request.headers.has_key('Authorization'):
# User tried to authenticate using http_auth
raise cherrypy.HTTPError(401, 'Unauthorized')
else:
return '/login'
Then, in app.cfg, set
identity.failure_url = yourpackage.controller.identity_error
# or wherever it is located.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---