You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by wardloockx <wa...@besite.be> on 2007/10/03 14:00:57 UTC

Header info

Hey,

I've written a basic authentication,authorization handler based on ldap
groups. Now the problem is that I need the found ldap groups in my PHP
applications. I've try'd adding the groups to the header but it failed. Here
is what goes wrong.

I Created the following .htaccess
AuthName "Besite LDAP Authentication"
AuthType Basic
require valid-user
PerlSetVar application ilsa
PerlAuthenHandler Apache::Ldap::ldap_auth
PerlAuthzHandler Apache::Ldap::ldap_authz
SetHandler modperl
PerlResponseHandler Apache::Ldap::ldap_response

I try'd to sent some basic message using headers in the responseHandler. But
I constantly see a blank page. Here is my responseHandler.

 package Apache::Ldap::ldap_response;
  use strict;
  use warnings;
  use Apache2::URI();
  use Apache2::Access;
  use Apache2::RequestRec();
  use Apache2::RequestUtil;
  use Apache2::Log;
  use Apache2::RequestIO;
  use Apache2::Const -compile => qw(OK);

  sub handler
  {
        my $r = shift;
        $r->log_error("Begin Response Handler");
        $r->content_type('text/html');
        $r->headers_out->set(usergroup => "ADMIN");
        $r->rflush;
        $r->log_error("Headers sent");
        return Apache2::Const::OK;
    }
    1;

But the only things I see is a blank page. and not my PHP page with the
header info. but when I don't use the handler I can see the page with the
header info but without the extra usergoup field. Can somebody help? Is
there another way to get this info in my PHP application?

Thanks,
Ward
-- 
View this message in context: http://www.nabble.com/Header-info-tf4561339.html#a13017407
Sent from the mod_perl - General mailing list archive at Nabble.com.