Hi guys,

My coworker is migrating a delphi application into a TG's app. One of
the main requests is that everytime the user hits an important screen
(aka controller/method), he(she) must enter his(her) username &
password.

Let me give an example to clarify this scenario:

1) I try to hit the "/" url.. since the entire system demands
non_anonymous navigantion, I must provide my identification.. and the
current identity becomes "Roger Demetrescu"

2) Then I hit a "/sales/list/' url.. and the system should ask again
for the user & password... maybe I enter "RogerDemetrescu / 123", and
continue to be the current identity... maybe I enter "Alberto_Valverde
/ 987" and then he will be the new user... until he hits another url
which will ask again for authentication...


What's the best way to accomplish this behavior ?

I'm studying the turbogears\identity\ package... But I'm not yet sure
how to make it work the way I need.

These are some of the ideas/doubts  that I've been thinking:

a) the identity sources which are available in IdentityVisitPlugin
should be expanded, so I could analyze the request params and
determine the needing of an authentication. But I don't see any hook
to do that:

    # from turbogears/identity/visitor.py

    # Register the plugin for the Visit Tracking framework
    visit.enable_visit_plugin( IdentityVisitPlugin() )

As you can see, there is no way I can register my own
CustomIdentityVisitPlugin instead of the original
IdentityVisitPlugin...


b) If I do:

    visit.enable_visit_plugin(CustomIdentifyVisitPlugin())

how would it behave running at the same time of the original
IdentityVisitPlugin ?




Any suggestion will be very appreciated ... :)

Thanks

Roger


PS: I've read [1], [2] and [3], but they don't show how to change
identify on the fly...

[1] - http://docs.turbogears.org/1.0/IdentityManagement
[2] - http://docs.turbogears.org/1.0/ExtendingVisitFramework
[3] - http://docs.turbogears.org/1.0/RoughDocs/UsingVisitFramework

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to