Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl
[MP2]: setting group for a request (require group ...)
 

Index | Next | Previous | View Flat


titetluc at gmail

Jun 19, 2008, 5:53 AM


Views: 496
Permalink
[MP2]: setting group for a request (require group ...)

Hello all,

I am writing a mod_perl authentication module (My::Auth).

This module sets the user using the Apache2::RequestRec::user method.

package My::Auth;
sub {
....
$r->user('getting the user in my module internal structure');
return OK;
}

In the Apache configuration file, I can use the configuration

<Location /test_user>
PerlAuthHandler My::Auth
Require user user1
....
</Location>

I would like to use my module in another configuration where group is
checked

<Location /test_group>
PerlAuthHandler My::Auth
Require group group1
....
</Location>

I can not find any mod_perl API method (Apache2::RequestRec::group ?) to set
the group. I only found Apache2::RequestRec::require method, but this method
only read the require configuration.

One way to solve the problem is the modify the My::Auth::handler method :

package My::Auth;
sub {
....
$r->user('getting the user in my module internal structure');
my $requires = $r->requires;

# here the code to verify authorization

return OK;
}

but I think this is a workaround:
. My::Auth::handler is an AUTHENTICATION handler
. the code to verify the AUTHORIZATION should have to be executed by the
httpd core.

How can I manage authorization in this case ?

Thanks

Subject User Time
[MP2]: setting group for a request (require group ...) titetluc at gmail Jun 19, 2008, 5:53 AM
    Re: [MP2]: setting group for a request (require group ...) geoff at modperlcookbook Jun 19, 2008, 6:28 AM
    Re: [MP2]: setting group for a request (require group ...) titetluc at gmail Jun 23, 2008, 12:25 AM
    Re: [MP2]: setting group for a request (require group ...) geoff at modperlcookbook Jun 23, 2008, 5:23 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.