> 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.
>