> On 5/22/06, Joel Pearson <[EMAIL PROTECTED]> wrote: > > I added a section to the end of the Identity page in the wiki, called > > "Authenticating against an external password source", along with some > > sample source code.
Jorge Vargas wrote: > I think you should move that to it's own wiki page since it's an extension > to the original code that you should distribute with your project. Many of the wiki pages describe how to extend the framework, such as the widgets pages. And I only added 4 sentences, so it would be a very short page. But if you feel strongly about this, I have no objection to your making the change. > > Basically, I created a new Identity provider, SoSmbIdentityProvider, > > which subclasses the SQLObject provider, but validates user names and > > passwords against a Windows domain. > > on the other hand this is not a smb provider, or at least it's not complete > so you should rename it. a SMB provider will take care of the management of > everything and will not depend on sqlobject. > > i believe you left it there because it was just what you needed. What was I thinking? Contributing "sample source code" that's not feature complete? ;-) You're right about it not being a pure SMB provider. As I said in my original post, it "subclasses the SQLObject provider, but validates user names and passwords against a Windows domain." Just to be perfectly clear, that means that it functions EXACTLY like the existing SQLObject provider in every way EXCEPT for the user name and password checking. That's why I called it "SoSmbIdentityProvider", where "So" refers to the SQLObject data model, and "Smb" refers to the SMB password checking. > All of the real work is done inside > > of the validate_password() method. (See the file attached to the wiki > > page.) In the original SqlObjectIdentityProvider, the actual password > > check is buried inside the validate_identity() method, so I wound up > > having to cut-and-paste about 60 lines of __init__() and > > validate_identity() into my new provider in order to get it working. > > > I see what you have there if this is a common case, we could refractor the > soprovider so those 2 part of code are their own methods so this could be > easily overwritten. But those will still not be providers just other sources > for passwords. > > I'm not sure where your putting this code did you drop it in the identity > package? Yes, I just put the code directly into the Identity package, as described in the source code. This worked for me, so I didn't check to see if there was a better way. - Joel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

