---
name: "Lemonldap::NG::Common::Util"
section: "3pm"
platform: "linux"
package: "liblemonldap-ng-common-perl"
version: "2.21.2+ds-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Lemonldap::NG::Common::Util"
---

# Lemonldap::NG::Common::Util(3pm)

Utility class for LemonLDAP::NG

## NAME

Lemonldap::NG::Common::Util - Utility class for LemonLDAP::NG

## DESCRIPTION

This package contains various functions that need to be shared between  modules.

## METHODS

*getPSessionID($uid)*

This method computes the psession ID from the user login

*genId2F($device)*

This method computes the unique ID of each 2F device, for use with the API and CLI

*display2F($device)*

This method formats device name for logging purpose

*isHiddenAttr( $conf\_value, $attr, @extra\_hidden\_attributes )*

This method tests if the attribute is hidden. `@extra_hidden_attributes` is an array of additional attributes to hide.

*getSameSite($conf)*

Try to find a sensible value for the SameSite cookie attribute. If the user has overridden it, return the forced value

## AUTHORS

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

  ## BUG REPORT

Use OW2 system to report 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\>

## 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/\>.
