LLNG provides Perl libraries that can be easily used by inheritance. So you can write your own handlers but you need first to understand <ahref="handlerarch.html"class="wikilink1"title="documentation:2.0:handlerarch">Handler architecture</a>
</p>
</div>
<!-- EDIT1 SECTION "Custom handlers" [1-206] -->
<h2class="sectionedit2"id="add_a_new_handler_type">Add a new handler type</h2>
<divclass="level2">
<ol>
<liclass="level1"><divclass="li"> Write your new Module (in Lemonldap/NG/Handler/Lib for example) that overload some Lemonldap::NG::Handler::Main methods</div>
</li>
<liclass="level1"><divclass="li"> Write a wrapper in each platform directory <em>(see Lemonldap::NG::Handler::Apache2::AuthBasic or Lemonldap::NG::Handler::Server::AuthBasic for examples)</em></div>
<spanclass="kw2">use</span> base <spanclass="st_h">'Lemonldap::NG::Handler::ApacheMP2::Main'</span><spanclass="sy0">,</span><spanclass="st_h">'Lemonldap::NG::Handler::Lib::MyType'</span><spanclass="sy0">;</span>
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.
<liclass="level1"><divclass="li"> by adding it to the menu: add its name in <code>vhostType</code> “select” declaration (file <code>lemonldap-ng-manager/lib/Lemonldap/NG/Build/Attributes</code>) and rebuild LLNG</div>
<liclass="level1"><divclass="li"> the platform launcher file that launch the required type <em>(see <code>lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2</code> file for example)</em></div>
</li>
<liclass="level1"><divclass="li"> write the main platform file (<code>Lemonldap::NG::Handler::MyPlatform::Main</code>) that provides required method <em>(see <code>lemonldap-ng-handler/lib/Lemonldap/NG/Handler/*/Main</code> for examples)</em> and inherits from <code>Lemonldap::NG::Handler::Main</code></div>
</li>
<liclass="level1"><divclass="li"> write the “type” wrapper files (AuthBasic,…).</div>
<spanclass="kw2">use</span> base <spanclass="st_h">'Lemonldap::NG::Handler::MyPlatform::Main'</span><spanclass="sy0">,</span><spanclass="st_h">'Lemonldap::NG::Handler::Lib::AuthBasic'</span><spanclass="sy0">;</span>
<liclass="level1"><divclass="li"> declare your own module in the manager “General Parameters » Advanced Parameters » Custom handlers (Nginx)”. Key is the name that will be used below and value is the name of the custom package,</div>
<liclass="level1"><divclass="li"> in your Nginx configuration file, add <code>LLTYPE=<name>;</code> in the <code>location = /lmauth {…}</code> paragraph</div>
</li>
<liclass="level1"><divclass="li"> restart FastCGI server(s) <em>(reload is not enough here)</em></div>