Apache2-AuthEnv
view release on metacpan or search on metacpan
lib/Apache2/AuthEnv.pm view on Meta::CPAN
=item * AuthEnvDenyFile <file>
These directives allow or deny, respectively,
any users from the specified file.
=item * AuthEnvAllowAll
This directive allows any connection that hasn't been denied up to now.
This is useful to allow all users to access the controlled area.
=item * AuthEnvDenyAll
This directive denies any connection that hasn't been allowed up to now.
This is really the default action but included for completeness.
It is useful when an area needs to be temporarily denied but the rest of the configuration needs to stay intact.
=item * AuthEnvDenial UNAUTHORISED|UNAUTHORIZED|NOT_FOUND|FORBIDDEN
This directive sets the HTTP denial code returned to the
browser if authorisation fails. The default is FORBIDDEN.
=item * AuthEnvLogInfo On|Off
Turn on or off extra logging about which users are getting allowed or
denied by various rules. The default is no logging to reduce log sizes.
=back
=head1 AUTHOR
Anthony R Fletcher arif@cpan.org
=head1 COPYRIGHT
Copyright (c) 2008 Anthony R Fletcher. All rights reserved.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. It is supplied on an-is basis and there
is no warrenty of any kind.
SiteMinder (c) is owned by Computer Asscoiates. This module does not
rely on or use any part of SiteMinder and works purely via the
environemnt within mod_perl.
=head1 SEE ALSO
L<perl(1)>, L<mod_perl(1)>, L<Apache(1)>.
=cut
############################################################
use 5;
use strict;
# allow redefinitions so we can use the reload module.
use warnings FATAL => 'all', NONFATAL => 'redefine';
use vars qw($VERSION);
use Carp;
use Data::Dumper;
use Safe;
use Memoize;
use Memoize::Expire;
use Storable qw(freeze thaw dclone);
use BerkeleyDB;
use MLDBM qw(BerkeleyDB::Btree);
use ModPerl::Util;
use Apache2::Module;
use Apache2::Access ();
use Apache2::Log;
use Apache2::CmdParms ();
use Apache2::ServerUtil;
use Apache2::ServerRec qw(warn);
use Apache2::RequestUtil ();
use Apache2::RequestRec;
use Apache2::Directive ();
use Apache2::Const -compile => qw(OK DECLINED NO_ARGS TAKE1 TAKE2 TAKE3 FLAG
NOT_FOUND HTTP_FORBIDDEN HTTP_UNAUTHORIZED
:override
);
die "The module mod_perl 2.0 is required!" unless
( exists $ENV{MOD_PERL_API_VERSION} and
$ENV{MOD_PERL_API_VERSION} >= 2 );
###########################################################
my @directives = (
{
name => 'AuthEnvUser',
errmsg => 'AuthEnvUser EnvVarFrormat',
req_override => Apache2::Const::OR_AUTHCFG, # only allow where Require is allowed.
},
{
name => 'AuthEnvVar',
errmsg => 'AuthEnvVar EnvVarFrormat',
req_override => Apache2::Const::OR_AUTHCFG, # only allow where Require is allowed.
},
{
name => 'AuthEnvAllowUser',
args_how => Apache2::Const::TAKE1,
errmsg => 'AuthEnvAllowUser User',
},
{
name => 'AuthEnvDenyUser',
args_how => Apache2::Const::TAKE1,
errmsg => 'AuthEnvDenyUser User',
},
{
name => 'AuthEnvAllow',
args_how => Apache2::Const::TAKE2,
errmsg => 'AuthEnvAllow EnvVarFormat Value',
},
{
name => 'AuthEnvAllowMatch',
args_how => Apache2::Const::TAKE2,
errmsg => 'AuthEnvAllow EnvVarFormat RegEx',
( run in 0.955 second using v1.01-cache-2.11-cpan-39bf76dae61 )