Enrico Sorcinelli wrote:

On Tue, 04 Nov 2003 09:13:34 -0600
Shannon Eric Peevey <[EMAIL PROTECTED]> wrote:




BTW, I don't see the module asking for authorization for every object, only when the client asks for something in a new directory. (It's a little hard to tell from the debug log if the calls to the samba server are made for every object, I need a little more time to follow its logic through. But, on the client side, I am not seeing the 401 returned for every object.)



How about improving the module by adding some caching mechanism for authenticated users?
Moreover it could be nice to control it with PerlSetVar directives (ttl and so on)


by

- Enrico



BTW, has anyone read the documentation in AuthenNTLM.pm? Here is an example on how to only call AuthenNTLM if a precondition is met...

=head2 Example for overriding


The following code shows the a basic example for creating a module which
overrides the map_user method and calls AuthenNTLM's handler only if a
precondition is met. Note: The functions preconditon_met and lookup_user
do the real work and are not shown here.




package Apache::MyAuthenNTLM ;


use Apache::AuthenNTLM ;


@ISA = ('Apache::AuthenNTLM') ;




sub handler ($$)
{
my ($self, $r) = @_ ;


return Apache::AuthenNTLM::handler ($self, $r) if (precondition_met()) ;
return DECLINED ;
}


sub map_user


{
my ($self, $r) = @_ ;


       return lookup_user ($self->{userdomain}, $self->{username}) ;
       }

This should work for now, and I will bang around and see how much work it will take to add in a caching feature directly into the module. Seems that it would be useful for a lot of people, right?

speeves
cws


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to