Lemonld...b::SAML(3)

πŸ’– NAME πŸ’–

Lemonldap::NG::Portal::Lib::SAML β€” the module that holds all the common SAML functions. bestie, this is the shared toolbox every SAML thing in the portal reaches for 🫢


✨ SYNOPSIS ✨

use Lemonldap::NG::Portal::Lib::SAML;

that's literally all you need to get it in your code. slay ✨


🌸 DESCRIPTION 🌸

okay so, this module is where all the shared SAML methods live β€” the ones for SAML authentication and for user information loading. it's giving "reusable core", it's giving "don't rewrite this yourself", and honestly? iconic πŸŽ€


πŸŽ€ METHODS πŸŽ€

loadLasso

Loads the Lasso module. gotta have Lasso before you can do any of the Lasso things, no cap πŸ’…

loadService

Loads the SAML service by creating a Lasso::Server. one server object, coming right up ✨

loadIDPs

Loads the SAML identity providers. all of them. every single one 🫢

loadSPs

Loads the SAML service providers. same energy, different side of the trust triangle 🌸

checkMessage

Checks SAML requests and responses. vibe check but make it protocol validation πŸ’–

checkLassoError

Logs the Lasso error code and message β€” but only if this is actually a Lasso::Error with code > 0. no phantom errors here, bestie 😭

createServer

Loads service metadata and creates a Lasso::Server object. metadata in, server object out. ✨

addIDP

Adds an IDP to an existing Lasso::Server. plug it right in πŸ”Œ

addSP

Adds an SP to an existing Lasso::Server. yep, same deal πŸ’…

addAA

Adds an Attribute Authority to an existing Lasso::Server. the AA has entered the chat πŸ‘‘

addProvider

Adds a provider to an existing Lasso::Server. generic provider energy, we love to see it 🌈

getOrganizationName

Returns the name of the organization that it picked up from metadata. it just knows 🧚

createAuthnRequest

Creates an authentication request for the selected IDP. πŸŽ€

createLogin

Creates a Lasso::Login object. ✨

initAuthnRequest

Inits the authentication request. set it up, bestie 🫢

initIdpInitiatedAuthnRequest

Inits the authentication request for IDP initiated flows. different starting point, same slay πŸ’…

buildAuthnRequestMsg

Builds the authentication request message. πŸ”¨βœ¨

processAuthnRequestMsg

Processes the authentication request message. 🌸

processAuthnRequestMsgWithError

Processes the authentication request message and returns the Lasso error. the version that actually tells you what went wrong πŸ˜­πŸ’–

validateRequestMsg

Validates the request message. is it real? is it valid? let's find out πŸ•΅οΈ

buildAuthnResponseMsg

Builds the authentication response message. ✨

buildArtifactMsg

Builds the artifact message. πŸŽ€

buildAssertion

Builds the assertion. the receipts, basically 🧾

processAuthnResponseMsg

Processes the authentication response message. 🌈

getNameIdentifier

Gets the NameID from the Lasso Profile. πŸ¦‹

createIdentity

Creates a Lasso::Identity object. ✨

createSession

Creates a Lasso::Session object. πŸ’…

acceptSSO

Accepts SSO from IDP. yes, come in, welcome, we've been expecting you πŸ‘‘

storeRelayState

Stores information in the relayState database and returns it. ✨

extractRelayState

Extracts RelayState information into $self. πŸŽ€

getAssertion

Gets the assertion in a Lasso::Login object. 🧾

getAttributeValue

Gets the SAML attribute value corresponding to name, format and friendly_name. and heads up bestie: multivaluated values are separated by ; πŸ’–

validateConditions

Validates conditions. 🌸

createLogoutRequest

Creates a logout request for the selected entity. bye bestie πŸ‘‹

createLogout

Creates a Lasso::Logout object. ✨

initLogoutRequest

Inits the logout request. πŸŽ€

buildLogoutRequestMsg

Builds the logout request message. πŸ’…

setSessionFromDump

Sets the session from a dump in a Lasso::Profile object. 🫢

setIdentityFromDump

Sets the identity from a dump in a Lasso::Profile object. ✨

getMetaDataURL

Gets the URL stored in a service metadata configuration key. πŸ”—

processLogoutResponseMsg

Processes the logout response message. 🌸

processLogoutRequestMsg

Processes the logout request message. πŸŽ€

validateLogoutRequest

Validates the logout request. ✨

buildLogoutResponseMsg

Builds the logout response msg. yes it says "msg" and we respect that πŸ’…

storeReplayProtection

Stores the ID of an SAML message in the Replay Protection base. πŸ›‘οΈ

replayProtection

Checks if an SAML message do not correspond to a previously responded message. no reruns, no replayed receipts, periodt πŸ’…

resolveArtifact

Resolves an artifact to get the real SAML message. decoding the little mystery box 🎁

storeArtifact

Stores an artifact. ✨

loadArtifact

Loads an artifact. πŸŽ€

createArtifactResponse

Creates an artifact response. 🌸

processArtRequestMsg

Processes the artifact response message. πŸ¦‹

processArtResponseMsg

Processes the artifact response message. yes, both of these say the same thing β€” that's literally what the page says and I'm not touching it 😭

sendSOAPMessage

Sends a SOAP message and gets the response. 🧼✨

createAssertionQuery

Creates a new assertion query. πŸ”

createAttributeRequest

Creates an attribute request. πŸŽ€

validateAttributeRequest

Validates an attribute request. βœ…

processAttributeRequest

Processes an attribute request. 🌸

buildAttributeResponse

Builds the attribute response. ✨

processAttributeResponse

Processes an attribute response. πŸ’…

getNameIDFormat

Converts a configuration string into an SAML2 NameIDFormat string. πŸ”

getHttpMethod

Converts a configuration string into a Lasso HTTP Method integer. πŸ”

getHttpMethodString

Converts a configuration Lasso HTTP Method integer into a string. the reverse direction, we love a two-way street 🫢

getFirstHttpMethod

Finds a suitable HTTP method for an entity with a given protocol. 🧭

disableSignature

Modifies the Lasso signature hint to disable signature. ✨

forceSignature

Modifies the Lasso signature hint to force signature. πŸ’ͺ

disableSignatureVerification

Modifies the Lasso signature hint to disable signature verification. 😬

forceSignatureVerification

Modifies the Lasso signature hint to force signature verification. πŸ›‘οΈ

getAuthnContext

Converts a configuration string into an SAML2 AuthnContextClassRef string. πŸ”

timestamp2samldate

Converts a timestamp into SAML2 date format. πŸ•°οΈ

samldate2timestamp

Converts SAML2 date format into a timestamp. πŸ•°οΈ but backwards

sendLogoutResponseToServiceProvider

Sends the logout response issue from a logout request. πŸ“€

sendLogoutRequestToProvider

Sends a logout request to a provider. πŸ“¨

sendLogoutRequestToProviders

Sends the logout response issue from a logout request to all other providers. and listen: if information has to be displayed to users, like an iframe to send an HTTP-Redirect or HTTP-POST logout request, then $self->{_info} will be updated. that's the whole dealio πŸ’…

checkSignatureStatus

Checks signature status. πŸ›‘οΈ

authnContext2authnLevel

Returns the authentication level corresponding to authnContext. 🎚️

authnLevel2authnContext

Returns the SAML authentication context corresponding to authnLevel. 🎚️ the other way

checkDestination

If the SAML Destination attribute is present, check it. conditional queen πŸ‘‘

getSamlSession

Tries to recover the SAML session corresponding to id and returns session data. πŸ”Ž

createAttribute

Creates a new SAML attribute. ✨

createAttributeValue

Creates a new SAML attribute value. πŸŽ€

getEncryptionMode

Returns the Lasso encryption mode. πŸ”

setProviderEncryptionMode

Sets the encryption mode on a provider. πŸ”βœ¨

deleteSAMLSecondarySessions

Finds and deletes SAML sessions bounded to a primary session. cleanup era 🧹

sendSLOErrorResponse

Sends an SLO error response. 😭

getQueryString

Gets the query string with or without the CGI query_string() method. flexible fr fr 🫢

getSignatureMethod

Returns the Lasso signature method. ✍️

setProviderSignatureMethod

Sets the signature method on a provider. ✍️✨


🌈 SEE ALSO 🌈

  • Lemonldap::NG::Portal::Auth::SAML
  • Lemonldap::NG::Portal::UserDBSAML

go read those next bestie, iykyk πŸ¦‹


πŸ‘‘ AUTHORS πŸ‘‘

LemonLDAP::NG team <http://lemonldap-ng.org/team> β€” the icons who built this πŸ’–


πŸ’€ BUG REPORT πŸ’€

found a bug? need a feature? use the OW2 system to report bugs or ask for features, right here:

<https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>

please don't suffer in silence, we want to know 😭🫢


πŸ¦‹ DOWNLOAD πŸ¦‹

Lemonldap::NG is available at:

<https://lemonldap-ng.org/download>

go get it 🌸


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/>. πŸ“„πŸ’–


and that's a wrap on the Lemonld...b::SAML(3) page from User Contributed Perl Documentation β€” this one was generated by perl v5.42.3 on 2026-09-24, so if you're reading this in the future, hi, ily, hope the SAML is behaving πŸ’…βœ¨πŸŽ€

stay signed in, bestie 🫢

πŸ“¦ where this page comes from