lemonldap-ng/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/API/Nginx.pm

53 lines
1.0 KiB
Perl
Raw Normal View History

package Lemonldap::NG::Handler::API::Nginx;
our $VERSION = '1.4.0';
## @method void thread_share(string $variable)
# share or not the variable (if authorized by specific module)
# @param $variable the name of the variable to share
sub thread_share {
2014-07-24 17:48:32 +02:00
my ( $class, $variable ) = @_;
# nothing to do in Nginx
}
sub set_user {
2014-06-08 12:04:50 +02:00
my ( $class, $r, $user ) = @_;
# Nginx perl API does not (yet ?) allow to set $remote_user var
# So one tries to set the variable $user instead
2014-06-08 12:04:50 +02:00
$r->variable( "user", $user )
if ( defined $r->variable("user") );
}
sub header_in {
2014-06-08 12:04:50 +02:00
my ( $class, $r, $header ) = @_;
return $r->header_in($header);
}
sub set_header_in {
2014-06-08 12:04:50 +02:00
my ( $class, $r, %headers ) = @_;
while ( my ( $h, $v ) = each %headers ) {
2014-06-08 12:04:50 +02:00
# TODO
}
}
sub unset_header_in {
2014-06-08 12:04:50 +02:00
my ( $class, $r, @headers ) = @_;
foreach my $h (@headers) {
2014-06-08 12:04:50 +02:00
# TODO
}
}
sub set_header_out {
2014-06-08 12:04:50 +02:00
my ( $class, $r, %headers ) = @_;
while ( my ( $h, $v ) = each %headers ) {
2014-06-08 12:04:50 +02:00
# TODO
}
}
1;