> I also tried something like this at first. But I get this error message in
> my apache/error.log
>
>
> [Tue Feb 12 20:20:59 2002] [error] Can't locate object method
> "handler" via
> package "Apache::AuthenS
> mb" (perhaps you forgot to load "Apache::AuthenSmb"?) at
> /usr/share/perl5/Apache/AuthenIntra.pm line
>  13.

Try calling it via Apache::AuthenSmb::handler($r) instead.  You will
probably want to do the same with Apache::AuthSybase::handler($r) as well.

> resp. vice versa, when the AuthSybase method is first. Perhaps it is my
> mod_perl installation. It is a stock Debian Woody installation.
>
> Marcel
>
>
> -----Ursprüngliche Nachricht-----
> Von: Stathy G. Touloumis [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 12. Februar 2002 18:32
> An: Marcel Weber; [EMAIL PROTECTED]
> Betreff: RE: Multiple authentication methods
>
>
> > The get_handlers code is out of AuthenSmb as I do not have the slightest
> > idea of how to get the results of the called function.
> Hmmm, It would seem that it would be better to call the function directly
> from your handler.  I am not sure how the AuthenSmb handlers should be
> called but you should get the idea.
>
> sub handler {
>   my $r = shift;
>   my($res, $sent_pw) = $r->get_basic_auth_pw;
>   return $res if $res != OK;
>
>   if ( Apache::AuthSybase->handler($r) == Apache::Constants::OK ) {
>     return Apache::Constants::OK;
>
>   } elsif ( Apache::AuthenSmb->handler($r) == Apache::Constants::OK ) {
>     return Apache::Constants::OK;
>
>   } else {
>     return Apache::Constant::DECLINED;
>
>   }
>
>
> }
>
> > I get just as far, as I can authenticate via AuthSybase, but the second
> > method is never executed. Well, probably some expirienced perl
> coder would
> > laugh at me...
>
> He he, we all had to start from the beginning ; )
>
>
> > Hmm, I fiddled a bit around whith this code but, it does not
> > really work the
> > way I want it to.
> >
> > This is what I coded:
> >
> > sub handler {
> >         my $r = shift;
> >         my($res, $sent_pw) = $r->get_basic_auth_pw;
> >         return $res if $res != OK;
> >
> >         $r->push_handlers( PerlAuthenHandler=> Apache::AuthSybase );
> >         if (@{ $r->get_handlers("PerlAuthenHandler") || []}) {
> >         return OK;
> >         }
> >         $r->push_handlers( PerlAuthenHandler=> Apache::AuthenSmb );
> >         if (@{ $r->get_handlers("PerlAuthenHandler") || []}) {
> >         return OK;
> >         }
> >         return DECLINED;
> > }
> >
> > The get_handlers code is out of AuthenSmb as I do not have the slightest
> > idea of how to get the results of the called function.
> >
> > What the code should do is: Call AuthSybase, check return value, if OK
> > return OK, else call AuthenSMB, return return value.
> >
>
>

Reply via email to