Apache2-AuthCookieLDAP
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
use constant C_BASE => '_Base';
use constant C_BINDDN => '_BindDN';
use constant C_BINDPW => '_BindPW';
use constant C_FILTER => '_Filter';
use constant C_CIPHER => '_Cipher';
use constant C_DEBUG => '_Debug';
use constant C_DEBUG_LOGLEVEL => '_DebugLogLevel';
use constant C_ERROR_LOGLEVEL => '_ErrorLogLevel';
my %CONFIG_DEFAULT = (
C_SECRET_KEY, undef, C_SESSION_LIFETIME, '00-24-00-00',
C_LDAPURI, undef, C_BASE, undef,
C_BINDDN, undef, C_BINDPW, undef,
C_FILTER, '(uid=%USER%)', C_CIPHER, 'des',
C_DEBUG_LOGLEVEL, 'alert', C_ERROR_LOGLEVEL, 'err',
C_DEBUG, 0,
);
my $ldap_handler;
my %config_data;
my %ciphers;
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
$r->headers_out->set( Location => $logout_url );
$r->status(Apache2::Const::REDIRECT);
}
return Apache2::Const::REDIRECT;
}
Apache2::AuthCookieLDAP config
PerlSetVar MyAuth_SecretKey OGheSWkT1ixd4V0DydSarLVevF77sSibMIoUaIYuQUqp2zvZIwbS4lyWhRTFUcHE
PerlSetVar MyAuth_SessionLifetime 00-24-00-00
PerlSetVar MyAuth_LDAPURI ldap://127.0.0.1
PerlSetVar MyAuth_Base uid=%USER%,ou=staff,dc=company,dc=com
PerlSetVar MyAuth_BindDN cn=ldap,dc=company,dc=com
PerlSetVar MyAuth_BindPW somepassword
PerlSetVar MyAuth_Filter (uid=%USER%)
<Directory /var/www/mysite/protected>
AuthType Apache2::AuthCookieLDAP
AuthName MyAuth
PerlAuthenHandler Apache2::AuthCookieLDAP->authenticate
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
Then the directive name for you will be (for instance):
PerlSetVar WhatEverAuthName_SecretKey
=over 4
=item C<MyAuth_SecretKey>
Use your own secret key !!!DONT USE THE ONE FROM THE EXAMPLE!!!
=item C<MyAuth_SessionLifetime> [optional, default: 00-24-00-00]
Format is: days-hours-minutes-seconds or 'forever' for endless sessions
=item C<MyAuth_LDAPURI>
Your LDAP server URI
Format: ldap://127.0.0.1 or ldap://myldaphost
Use ldaps:// for secure connections (if your LDAP server supports it)
( run in 0.785 second using v1.01-cache-2.11-cpan-7add2cbd662 )