Table of Contents

Custom handlers

LLNG provides Perl libraries that can be easily used by inheritance. So you can write your own handlers but you need first to understand Handler architecture

Add a new handler type

  1. Write your new Module (in Lemonldap/NG/Handler/Lib for example) that overload some Lemonldap::NG::Handler::Main methods
  2. Write a wrapper in each platform directory (see Lemonldap::NG::Handler::Apache2::AuthBasic or Lemonldap::NG::Handler::Server::AuthBasic for examples)

Wrapper usually look at this:

package Lemonldap::NG::Handler::ApacheMP2::MyType;
 
use base 'Lemonldap::NG::Handler::ApacheMP2::Main', 'Lemonldap::NG::Handler::Lib::MyType';
 
1;

Enable it

Your wrappers must be named “Lemonldap::NG::Handler::<platform>::<type>” where <platform> is the target (ApacheMP2 or Server) and <type> is the name you've chosen.

You can enable it either:

Note that configuration parameter can be set only in lemonldap-ng.ini configuration file (section Handler).

Add a new platform

LLNG provides 3 platforms:

If you want to add another, you must write:

Wrapper usually look at this:

package Lemonldap::NG::Handler::MyPlatform::AuthBasic;
 
use base 'Lemonldap::NG::Handler::MyPlatform::Main', 'Lemonldap::NG::Handler::Lib::AuthBasic';
 
1;

Old fashion Nginx handlers

There is no need to use this feature now. It is kept for compatibility.

Three actions are needed: