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. 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... Marcel -----Ursprüngliche Nachricht----- Von: Stathy G. Touloumis [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 11. Februar 2002 23:34 An: Marcel Weber Cc: [EMAIL PROTECTED] Betreff: RE: Multiple authentication methods sub handler { my $r = shift; if ( $smbauthwhatever ) { $r->push_handlers( PerlAuthenHandler=> Apache::AuthenSmb::handler ); } else { $r->push_handlers( PerlAuthenHandler=> Apache::Foo::handler ); } } > I already thought of this. But how can I call the first and second > handler from within this "super"-handler? > > I'll do something like this: > > use Apache::AuthenSmb; > use Apache::AuthSybase; > > sub handler { > if (smbauthwhatever) > ........ > sybaseauthwhatever > ..... > > } > > So how can I call the handler function of AuthenSmb? >