[rt-users] WebExternalAuth user lookup hooks?

Nathan J. Mehl rtusers at memory.blank.org
Wed Mar 30 14:02:49 EST 2005


In the immortal words of Jesse Vincent (jesse at bestpractical.com):
> 
> 
> RT::Interface::Web::WebExternalAutoInfo ?

Well, that makes sense, but I've created a lib/RT/Interface/Web_Local.pm
with:

	sub WebExternalAutoInfo {
		my $user = shift;

		$RT::Logger->debug( "WebExternalAutoInfo: Looking for $user");
		my %LdapUserInfo = LdapUserFindByUsername($user);
		$LdapUserInfo{'Privileged'} = 1;
        
		# and return the wad of stuff
		return {%LdapUserInfo};
	}

...and that Logger instance never, ever gets called.

Weirdly, LdapUserFindByMailaddr (out of my User_Local.pm) _does_ get
called as the user is logging in over the web, and using caller() to
get a traceback in the debug tells me that it's coming from:

[Wed Mar 30 00:54:32 2005] [info]: LdapUserFindByMailaddr: Looking for
   samaccountname cn mail  filter= (&(mail=)
   (objectClass=person)) base= cn=Users,dc=elided,dc=com  scope= one
   callstack= 1st: RT::User::LdapUserFindByMailaddr
    2nd: RT::User::LookupExternalUserInfo
    3rd: RT::User::Create
    (/usr/local/rt3/lib/RT/User_Local.pm:136)

...which makes sense, since User->Create calls CanonicalizeUserInfo,
but shouldn't WebExternalAuto be called first?

-n

------------------------------------------------------------<memory at blank.org>
#!/usr/bin/perl -iake_one_down_pass_it_around:_bottles_of_beer:_on_the_wall:99
for(($t,$a,$b,$i)=split/:/,$^I;$i;print){$_="-$i$a$b,-$i$a,-T$t,-".--$i."$a$b"
;s/(-1_.*?e)s/$1/g;y/_-/ \n/}#                (--Randolph Chung and Joey Hess)
<http://blank.org/memory/>----------------------------------------------------



More information about the rt-users mailing list