From e834bbb3d82c3347713792991127c69b633b1372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NOBILI?= Date: Fri, 19 Jul 2024 18:27:32 +0200 Subject: [PATCH] doc: enable Auth::LemonldapNG middleware through OO interface --- .../lib/Plack/Middleware/Auth/LemonldapNG.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lemonldap-ng-handler/lib/Plack/Middleware/Auth/LemonldapNG.pm b/lemonldap-ng-handler/lib/Plack/Middleware/Auth/LemonldapNG.pm index 74ccd0ea46..3aa6784bce 100644 --- a/lemonldap-ng-handler/lib/Plack/Middleware/Auth/LemonldapNG.pm +++ b/lemonldap-ng-handler/lib/Plack/Middleware/Auth/LemonldapNG.pm @@ -75,6 +75,17 @@ Plack::Middleware::Auth::LemonldapNG - authentication middleware for Lemonldap-N $app; }; + # Or through OO Interface + my $auth_builder = Plack::Builder->new(); + $auth_builder->add_middleware( + "Auth::LemonldapNG", + llparams => { + configStorage => ... + }, + on_reject => \&on_reject + ); + $protected_app = $auth_builder->wrap($app); + =head1 DESCRIPTION Lemonldap::NG is a modular Web-SSO based on Apache::Session modules. It -- GitLab