AuthBasic Handler

Presentation

The AuthBasic Handler is a special Handler that will us AuthBasic to authenticate to a virtual host, and then play authorizations rules to allow access to the virtual host.

The Handler will send a WWW-Authenticate header to the client, to request user and password, and then check the credentials using SOAP getCookies web service. When session is granted, the Handler will then check the authorizations like the standard Handler.

This can be useful to allow an third party application to access a virtual host with users credentials by sending a Basic challenge to it.

Configuration

Virtual host in Apache

Configure the virtual host like other protected virtual host but use AuthBasic Handler instead of default Handler.

<VirtualHost *:80>
       ServerName basic.example.com
 
       # Load AuthBasic Handler
       PerlRequire Lemonldap/NG/Handler/Specific/AuthBasic.pm
       PerlHeaderParserHandler Lemonldap::NG::Handler::Specific::AuthBasic
 
       ...
 
</VirtualHost>

If LemonLDAP::NG portal is protected by SSL with a self-signed certificate, you can add this line to accept it:

PerlSetEnv PERL_LWP_SSL_VERIFY_HOSTNAME 0

Handler parameters

No parameters needed. But you have to allow sessions web services, see SOAP sessions backend.