Thanks Sylvain.
> Doing it frm the default handler would be too late (or
too ugly), it'd
> be better to have a filter doing that work before the
httpauthfilter is
> being called (so a filter attached to the before_main
hook point and
> inserted before the httpauthfilter instance in the
_cp_filter attribute).
I implemented a MyRealmFilter with the before_main hook
point.
I can examine the header/path information and discern what:
. the current relam (request realm info) of the logged-in
user is
. the destination url (request path info), and based on
the
inclusion of "00x", which appropriate new
realm to choose
if any, and lastly,
. if its a brand new login altogether.
For the:
http://mysite/feature
level of the site hierarchy, I was hoping to specify and use
a sub-controller like so:
...
class Feature(controllers.Controller):
_cp_filters = [ MyRealmFilter(),
HttpAuthFilter(realm='<chosen from
MyRealmFilter>',
privateKey=str(time.time()),
unauthorizedPath='/unauthorized',
retrieveUsersFunc=retrieveAuthUsers)
]
...
and with the help of the default() handler, I could trap
access
to:
.../001/...
.../002/...
.../003/...
with the respective realm/auth level already applied.
What is unclear is how I would convey the chosen realm from
MyRealmFilter to HttpAuthFilter in the _cp_filters attrib
specification
above.
Thanks much,
/venkat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|