Lemonld...Request(3)

πŸ’– Lemonldap::NG::Portal::Main::Request πŸ’–

okay bestie, you found it β€” the HTTP request object that all the LLNG portal methods pass around like a lil group-chat message 🫢. It lives in Lemonldap::NG::Portal::Main::Request, and it's documented over in the User Contributed Perl Documentation section, fr fr.


✨ NAME ✨

Lemonldap::NG::Portal::Main::Request β€” the HTTP request object used inside LLNG portal methods. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

so here's the situation: somewhere in a plugin, you get handed a $req and it's that girl:

# Somewhere in a plugin...
sub run {
    my ( $self, $req ) = @_;
    # $req is a Lemonldap::NG::Portal::Main::Request object
    ...
}

like, that $req up there? iconic. main character energy. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

Lemonldap::NG::Portal::Main::Request extends Lemonldap::NG::Common::PSGI::Request, and the way that it does that is by adding all the parameters you need to manage portal jobs. no cap. it just shows up with extra pockets. πŸ‘‘


πŸŽ€ METHODS πŸŽ€

πŸ’œ Accessors

  • steps() β€” a stack of methods to call for this request. lowkey you can modify it to change the authentication process, which is kind of a big deal. πŸŒ€
  • data() β€” a free hash ref where plugins can stash their data (for the duration of one single request). using it is a LLNG best practice, so like… do it. πŸ™ˆ
  • pdata β€” a free hash ref where plugins can store persistent data: stuff gets kept during the auth process and cleaned after a successful authentication β€” except if $req->pdata->{keepPdata} is set to an array of values. in that case, whichever module set those values has to remove them itself once its job ends. that's the deal, periodt. 🧚

⭐ User information

  • id() β€” the session id (aka the main cookie value). πŸ“
  • sessionInfo() β€” hash ref that will be stored in the session DB. πŸ’Ύ
  • user() β€” the username given by the authentication module, which the userDB module then uses. πŸ‘€
  • mustRedirect() β€” boolean that says the response must be a redirection (used, for example, when the request is a POST). 🚦
  • urlNotBase64 β€” boolean that says the url isn't Base64 encoded. πŸ”“

🌈 Other methods

  • info() β€” store info to display in the response. πŸ“’
  • menuError() β€” yeah that one's just sitting there with no description, we don't gatekeep. πŸ’€
  • notification() β€” see the notification plugin for this one. πŸ””
  • errorType() β€” returns positive / warning / negative, depending on whatever value is stored in the error property. 🎯
  • addCookie(string $cookie) β€” adds a cookie into the $req response headers. the string is a complete cookie string, ex: "lemonldap=xxx" πŸͺ
  • delCookie(string $cookieName) β€” removes a cookie from the $req response headers. heads up tho: it doesn't remove the navigator cookie β€” it removes a "Set-Cookie" header if the value matches "ltcookieNamegt=...". read that carefully bestie. πŸ‘€

πŸ”₯ SEE ALSO πŸ”₯

<http://lemonldap-ng.org/>, Lemonldap::NG::Common::PSGI::Request


πŸ‘‘ AUTHORS πŸ‘‘

LemonLDAP::NG team <http://lemonldap-ng.org/team>


😭 BUG REPORT 😭

use the OW2 system to report a bug or ask for features: <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>


⬇️ DOWNLOAD ⬇️

Lemonldap::NG is available at <https://lemonldap-ng.org/download>


see the 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/>.

ngl, that warranty disclaimer is giving "we are not responsible for your feelings" but legally. respect. 🫑

and that's the whole page, bestie!! πŸ’– this one was rendered by perl v5.42.3 and dated 2026-09-24 β€” so go forth, pass your $req around responsibly, and slay βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from