On 8/29/06, Dalius Dobravolskas <[EMAIL PROTECTED]> wrote: > > I believe you can do that without problems. It is not documented well > though. > > It seems it was merged with ORM because usually you have Users coupled > with the rest of the system. It is very short answer but you must > invest time if you need LDAP support. It must be possible already :)
It's certainly possible. I've done it (modified soprovider.py to talk to Windows domain authentication, and in another project, modified it to use email_address as the login key rather than user_name). Right now you have two choices: 1. Subclass one of the existing providers, if subclassing suffices for your purposes. 2. Write a new provider, using an existing one as a template. 1) works great but it's a bit limited; 2) is a maintenance headache (if anything in the default identity provider changes for bugfix or feature reasons, you have to know about it and change it in your provider). I'm trying to figure out if there's an easier way, by making the provider generic and putting the implementation-specific logic in the domain objects that already have the ability to provide it. Taking a step back and looking from a design level, it's a question of tight vs. loose coupling. The identity model classes (User, Visit, etc) by their nature have to be tightly coupled to the ORM; I contend that the identity providers do not--especially since 0.9 and later don't tie the identity model classes into the provider anymore. Not that I'm knocking the current code: the SOProvider was a great first step when everything in TG was SQLObject-based; the SAProvider was a good way to get some level of SQLAlchemy support into TG. Now it's time to step back, look at the commonalities, and refactor. My initial thought is to create a "generic" identity provider that depends on the model objects to implement the ORM specifics and app-specific authentication policies. SOProvider and SAProvider shouldn't change (to preserve backwards compatibility). -- Tim Lesher <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

