From: Scott J. <sc...@na...> - 2001-11-19 17:24:12
|
More datapoints. This is 2.0.0 code. I still think I'm doing something *really* basic wrong: Slash appears to call user authentication in the modules I can find more like this: $slashdb = getCurrentDB(); $userstuff=$slashdb->getUserAuthenticate($ldapuname, $ldappassword); and then work with the result. In fact, this is exactly how Apache::User::getUserAuthenticate calls it. When I try this, exactly like this, in my own program, I get a null ('', undefined?) reply. This is why A::U::gUA returns the anon UID... the result from the mySQL call is null, which is then fed to isAnon, which triggers one of isAnon's conditions. When I look inside the code of the mySQL call, I see this on line 597 of MySQL.pm: my($self, $user, $passwd, $kind) = @_; then this on line 601: return unless $user && $passwd; This is almost certainly showing my lack of perl experience, but it seems that the mySQL method is expecting 4 and exactly 4 arguments. Also, it will return immediately if it doesn't see a $passwd variable that actually contains something. So, it seems to me that when I only feed it two arguments, it will never see $passwd (because the values I fed it got stored in $self and $user instead) and therefore never authenticate. Is this correct? I tried feeding it three values, but that didn't work either, perhaps (probably) because the above assumptions are wrong or the $self variable actually needs to be something important. Here's how I actually use the module right now: A web page in <site>/htdocs called login.shtml is a form that asks for username & password. Submit carries it over to basicLogin.pl also in <site>/htdocs. Am I doing something wrong here? $slashdb = getCurrentDB() *does* return something, but I don't know how to tinker with it to see if it's providing me with the right something. When evaluated as a scalar I get something like Slash::DB=HASH(0x891327c). This is a functioning slash site, so it's bound to be working somewhere. Apologies for the newbie ramblings. This is very frustrating. Let me know if there's anything else I can provide you. Thanks in advance for any help you can provide. |