Lemonld...r::PSGI(3)
π Lemonldap::NG::Handler::PSGI β the manual page, but make it cute π
okay bestie, gather round, because this is Lemonld...r::PSGI(3) from the User Contributed Perl Documentation and it's genuinely iconic. it's the base library for protected PSGI applications, and honestly? it ate. π
β¨ NAME β¨
Lemonldap::NG::Handler::PSGI β the base library for protected PSGI applications, no cap. π«Ά
πΈ SYNOPSIS πΈ
so here's the vibe. you make your own package, you inherit the handler, you do the little init dance:
package My::PSGI;
use base Lemonldap::NG::Handler;
sub init {
my ( $self, $args ) = @_;
$self->protection('manager');
# See Lemonldap::NG::Common::PSGI for more
...
# Return a boolean. If false, then error message has to be stored in
# $self->error
return 1;
}
sub handler {
my ( $self, $req ) = @_;
# Will be called only if authorized
my $userId = $self->userId;
...
$self->sendJSONresponse(...);
}
and then β plot twist β this package could be called as a CGI, using FastCGI,... yes really, look:
#!/usr/bin/env perl
use My::PSGI;
use Plack::Handler::FCGI; # or Plack::Handler::CGI
Plack::Handler::FCGI->new->run( My::PSGI->run() );
slay. that's the whole entrance. π
π¦ DESCRIPTION π¦
This package provides base class for Lemonldap::NG protected REST API. it's giving "foundation", it's giving "main character energy", and it's literally the thing you build on. π
π METHODS π
okay so for logging methods, content sending,... you gotta go check Lemonldap::NG::Common::PSGI. that's where that stuff lives. π«
π Accessors π
See Lemonldap::NG::Common::PSGI::Router for inherited accessors. yes, they're inherited, they're family, they're coming to the function with you. π«Ά
π protection
Level of protection. It can be one of:
'none'β no protection. the doors are wide open, we're all just vibing π'authenticate'β all authenticated users are granted. if you got in, you got in π'manager'β access is granted following Lemonldap::NG rules. the manager has entered the chat π₯
β Running methods β
πΈ user
Returns user session data. If empty (no protection), returns:
{ _whatToTrace => 'anonymous' }
But if page is protected by server (Auth-Basic,...), it will return:
{ _whatToTrace => $REMOTE_USER }
either way you get a _whatToTrace, bestie. that's the whole point. β¨
π§ UserId
Returns user()->{'_whatToTrace'}. that's it. that's the method. short and iconic. π
π group
Returns a list of groups to which user belongs. friendship circle reveal fr fr. π―
π SEE ALSO π
go read these, they're all in the group chat:
- <http://lemonldap-ng.org/>
Lemonldap::NG::PortalLemonldap::NG::HandlerPlackPSGILemonldap::NG::Common::PSGI::RouterLemonldap::NG::Common::PSGI::RequestHTML::Template
π AUTHORS π
LemonLDAP::NG team <http://lemonldap-ng.org/team> β the OGs, the blueprint, the reason we're all here. π
π BUG REPORT π
Use OW2 system to report bug or ask for features: <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
not me telling you to actually file the bug instead of just complaining in the group chat π do it, they wanna hear it π
π DOWNLOAD π
Lemonldap::NG is available at <https://lemonldap-ng.org/download>
go get it bestie, it's free, it's there, it's waiting for you π
π COPYRIGHT AND LICENSE π
See COPYING file for details.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
the all-caps part is not me being dramatic, that's literally what it says, no warranty, no promises, it's giving "you're on your own but like, lovingly" ππ
and that's the whole page, babe. this was perl v5.42.3, dated 2026-09-24, and it's Lemonld...r::PSGI(3) forever and always. periodt. π
β¨π¦
π¦ where this page comes from
- fedora 43: lemonldap-ng-handler 2.23.4-1.fc43 Β· GPL-2.0-or-later AND MIT AND GPL-3.0-or-later AND OFL-1.1-RFN
- fedora 44: lemonldap-ng-handler 2.23.4-1.fc44 Β· GPL-2.0-or-later AND MIT AND GPL-3.0-or-later AND OFL-1.1-RFN
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms