1Lemonldap::NG::Common::UCsoenrf(C3o)ntributed Perl DocumLeenmtoantlidoanp::NG::Common::Conf(3)
2
3
4
6 Lemonldap::NG::Common::Conf - Perl extension written to manage
7 Lemonldap::NG Web-SSO configuration.
8
10 use Lemonldap::NG::Common::Conf;
11 # Lemonldap::NG::Common::Conf reads loacl configuration from lemonldap-ng.ini.
12 # Parameters can be overridden in a hash:
13 my $confAccess = new Lemonldap::NG::Common::Conf(
14 {
15 type=>'File',
16 dirName=>"/tmp/",
17
18 # To use local cache, set :
19 localStorage => "Cache::FileCache",
20 localStorageOptions = {
21 'namespace' => 'lemonldap-ng-config',
22 'default_expires_in' => 600,
23 'directory_umask' => '007',
24 'cache_root' => '/tmp',
25 'cache_depth' => 5,
26 },
27 },
28 ) or die "Unable to build Lemonldap::NG::Common::Conf, see Apache logs";
29 # Next, get global configuration. Note that local parameters override global
30 # ones
31 my $config = $confAccess->getConf();
32
34 Lemonldap::NG::Common::Conf is used by all Lemonldap::NG packages to
35 access to local/global configuration.
36
37 SUBROUTINES
38 • new (constructor)
39
40 It can takes any Lemonldap::NG parameter to override configuration.
41 The 'confFile' parameter can be used to override lemonldap-ng.ini
42 path. Examples:
43
44 • Set another lemonldap-ng.ini file
45 $confAccess = new Lemonldap::NG::Common::Conf(
46 { confFile => '/opt/lemonldap-ng.ini' } );
47 =item * Override global storage:
48 $confAccess = new Lemonldap::NG::Common::Conf(
49 {
50 type => 'File',
51 dirName => '/var/lib/lemonldap-ng/conf',
52 });
53
54 • getConf: returns a hash reference to the configuration. it takes a
55 hash reference as first argument containing 2 optional parameters:
56
57 • "cfgNum =" $number>: the number of the configuration wanted. If
58 this argument is omitted, the last configuration is returned.
59
60 • "fields =" [array of names]: the desired fields asked. By
61 default, getConf returns all ("select * from lmConfig").
62
63 • saveConf: stores the Lemonldap::NG configuration passed in argument
64 (hash reference). it returns the number of the new configuration.
65
67 <http://lemonldap-ng.org/>
68
70 LemonLDAP::NG team <http://lemonldap-ng.org/team>
71
73 Use OW2 system to report bug or ask for features:
74 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
75
77 Lemonldap::NG is available at <https://lemonldap-ng.org/download>
78
80 See COPYING file for details.
81
82 This library is free software; you can redistribute it and/or modify it
83 under the terms of the GNU General Public License as published by the
84 Free Software Foundation; either version 2, or (at your option) any
85 later version.
86
87 This program is distributed in the hope that it will be useful, but
88 WITHOUT ANY WARRANTY; without even the implied warranty of
89 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
90 General Public License for more details.
91
92 You should have received a copy of the GNU General Public License along
93 with this program. If not, see <http://www.gnu.org/licenses/>.
94
95
96
97perl v5.38.0 2023-11-14 Lemonldap::NG::Common::Conf(3)