logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Lemonldap::NG::Common::Conf - Perl extension written to manage Lemonldap::NG Web-SSO configuration.

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>

Description

       Lemonldap::NG::Common::Conf is used by all Lemonldap::NG packages to access to local/global
       configuration.

   SUBROUTINESnew (constructor)

           It  can  takes any Lemonldap::NG parameter to override configuration. The 'confFile' parameter can be
           used to override lemonldap-ng.ini path.  Examples:

           •   Setanotherlemonldap-ng.inifile
                 $confAccess = new Lemonldap::NG::Common::Conf(
                                 { confFile => '/opt/lemonldap-ng.ini' } ); =item * Overrideglobalstorage:
                 $confAccess = new Lemonldap::NG::Common::Conf(
                                 {
                                   type    => 'File',
                                   dirName => '/var/lib/lemonldap-ng/conf',
                                  });

       •   getConf: returns a hash reference to the configuration. it takes a hash reference as  first  argument
           containing 2 optional parameters:

           •   "cfgNum  ="  $number>:  the  number of the configuration wanted. If this argument is omitted, the
               last configuration is returned.

       •   saveConf: stores the Lemonldap::NG configuration passed in argument (hash reference). it returns  the
           number of the new configuration.

Download

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

Name

       Lemonldap::NG::Common::Conf - Perl extension written to manage Lemonldap::NG Web-SSO configuration.

See Also

Synopsis

         use Lemonldap::NG::Common::Conf;
         # Lemonldap::NG::Common::Conf reads loacl configuration from lemonldap-ng.ini.
         # Parameters can be overridden in a hash:
         my $confAccess = new Lemonldap::NG::Common::Conf(
                     {
                         type=>'File',
                         dirName=>"/tmp/",

                         # To use local cache, set :
                         localStorage => "Cache::FileCache",
                         localStorageOptions = {
                             'namespace' => 'lemonldap-ng-config',
                             'default_expires_in' => 600,
                             'directory_umask' => '007',
                             'cache_root' => '/tmp',
                             'cache_depth' => 5,
                         },
                     },
           ) or die "Unable to build Lemonldap::NG::Common::Conf, see Apache logs";
         # Next, get global configuration. Note that local parameters override global
         # ones
         my $config = $confAccess->getConf();

See Also