On Fri, Feb 22, 2008 at 2:14 PM, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > > Jorge Godoy schrieb: > > > Em Friday 22 February 2008 08:27:51 [EMAIL PROTECTED] escreveu: > >>> Not without modification. You'd have to modify one of the providers > >>> (soprovider, saprovider, ldap, etc.) to accomplish that. > >>> > >>> You also have to modify the model. > >> Then, I have to provide/ship my own "distribution" of Turbogears with > >> my app. It's not really a bad idea, because it avoids some > >> incompatibility issues. > > > > No. You can use entry points and provide your provider. When I said > change > > the code I was thinking about creating a new provider, not changing TG's > code > > per se but using it as a foundation for your own work. > > With provider we usually mean the standard soprovider/saprovider module. > This can be replaced with a custom entry point and the config setting > identity.provider pointing to that. > > However in this case we need to replace the code for handling the login > input form. This is is in the IdentityVisitPlugin class in the visitor > module which is loaded by TurboGears as a visit plugin by default if you > have set identity.on and visit.on in the config. This is kind of the > glue between identity and plugin. > > I.e. it does not suffice to replace the provider. You need to either > monkey patch the IdentityVisitPlugin class or you need to load your own > visit plugin by setting identity.on = False and calling > visit.enable_visit_plugin(MyOwnIdentityVisitPlugin).
I would deactivate visit and add my own filter as you show here in order to not modify TG's code that's why I said creating a id provider does not need TG's code to be changed. To ease this process we could maybe envision to have an entry point added and then use a mechanism to load visit providers... Florent. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

