Lemonld...DConnect(3)
π NAME π
Lemonldap::NG::Portal::Lib::OpenIDConnect β bestie, this is the module with all the common OpenIDConnect functions β¨ it's the shared toolbox that the whole OpenID Connect fam leans on π«Ά
Oh and fun fact, the manual page itself is titled Lemonld...DConnect(3) (they truncated it, tragic, but we move π
) and it lives in the User Contributed Perl Documentation section.
πΈ SYNOPSIS πΈ
use Lemonldap::NG::Portal::Lib::OpenIDConnect;
That's it. That's the whole vibe check. Pull it in and you're in π«
π¦ DESCRIPTION π¦
Okay so, this module is holding the common methods used for OpenIDConnect authentication and user information loading. Like, if you're doing OIDC stuff in LemonLDAP::NG, this is where the shared logic lives. No cap. π
β¨ METHODS β¨
Every single one, in order, no skipping, we're doing the full tour bestie π
loadOPs
Load OpenID Connect Providers and JWKS data. It's giving "go fetch the providers" energy π
loadRPs
Load OpenID Connect Relying Parties. The other side of the handshake, periodt β¨
refreshJWKSdata
Refresh JWKS data if needed. Only when it's needed, she's not doing extra work for free π
getRP
Get the Relying Party corresponding to a Client ID. You give the ID, you get your RP back π«Ά
getCallbackUri
Compute the callback URI. Math but make it URLs π«
buildAuthorizationCodeAuthnRequest
Build the Authentication Request URI for the Authorization Code Flow π
buildAuthorizationCodeAuthnResponse
Build the Authentication Response URI for the Authorization Code Flow π (yes, request and response, she does both, iconic)
buildImplicitAuthnResponse
Build the Authentication Response URI for the Implicit Flow β
buildHybridAuthnResponse
Build the Authentication Response URI for the Hybrid Flow π¦
getAuthorizationCodeAccessToken
Get the Token response with an authorization code. Trading codes for tokens, the classic exchange π
checkTokenResponseValidity
Check the validity of a Token Response. Someone has to be the responsible one and it's her π₯
getUserInfo
Get the UserInfo response. The main character data drop π
decodeJSON
Convert JSON to a HashRef. Glow up, format edition β¨
newAuthorizationCode
Generate a new Authorization Code session π
newAccessToken
Generate a new Access Token session π
newRefreshToken
Generate a new Refresh Token session π
getAuthorizationCode
Get an existing Authorization Code session π
getAccessToken
Get an existing Access Token session π
getRefreshToken
Get an existing Refresh Token session π
getOpenIDConnectSession
Try to recover the OpenID Connect session corresponding to id and return the session. "Try" is doing a lot of work there but she's confident π
storeState
Store information in the state database and return. Hold my info bestie π«Ά
extractState
Extract state information into $self. Yes, literally into $self, she's making it her whole personality π
verifyJWTSignature
Check the signature of a JWT. Trust issues, but the healthy security kind π₯
verifyHash
Check a value hash π§
createHash
Create a Hash β¨
returnBearerError
Return a Bearer error. Sometimes you gotta deliver the bad news π
getEndPointAuthenticationCredentials
Get the Client ID and Client Secret π
getEndPointAccessToken
Get the Access Token ποΈ
getAttributesListFromClaim
Return the list of attributes authorized for a claim πΈ
buildUserInfoResponseFromId
Return a Hash of UserInfo data from a session ID π«
buildUserInfoResponse
Return a Hash of UserInfo data from a session object π« (same energy, different input, iykyk)
createJWT
Return a JWT β
createIDToken
Return an ID Token π
getFlowType
Return the flow type π
getIDTokenSub
Return the sub field of an ID Token π
getJWTJSONData
Return the payload of a JWT as a Hash ref π
key2jwks
Return the JWKS representation of a key π
buildLogoutRequest
Build the Logout Request URI π
buildLogoutResponse
Build the Logout Response URI π
addRouteFromConf
Build a Lemonldap::NG::Common::PSGI::Router route from an OIDC configuration attribute π£οΈ
validatePKCEChallenge
Validate the PKCE code challenge with the given code challenge method π§ββοΈ
π SEE ALSO π
Go read these next, bestie, they're the sisters of this module:
Lemonldap::NG::Portal::AuthOpenIDConnectLemonldap::NG::Portal::UserDBOpenIDConnect
π AUTHORS π
LemonLDAP::NG team <http://lemonldap-ng.org/team> β the whole squad, we love them for this π
π BUG REPORT π
Use the OW2 system to report a bug or ask for features: <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
Not me telling you to file a real issue instead of vague-posting about it π
π DOWNLOAD π
Lemonldap::NG is available at <https://lemonldap-ng.org/download> π
π COPYRIGHT AND LICENSE π
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/>.
Also note the license header spells the team LemonLDAP::NG while the module is Lemonldap::NG β that's just how it is in here, don't come for me π
perl v5.42.3 πΈ 2026-09-24 β that's the source and date stamp on this whole thing, so you know it's fresh-ish, and it's filed under User Contributed Perl Documentation as Lemonld...DConnect(3). Slay, go build something cute with it bestie πβ¨π
π¦ where this page comes from
- fedora 43: lemonldap-ng-portal 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-portal 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