1Lemonldap::NG::Portal(3U)ser Contributed Perl DocumentatiLoenmonldap::NG::Portal(3)
2
3
4
6 Lemonldap::NG::Portal - The authentication portal part of Lemonldap::NG
7 Web-SSO system.
8
10 Use any of Plack launcher. Example:
11
12 #!/usr/bin/env plackup
13
14 use Lemonldap::NG::Portal;
15
16 # This must be the last instruction! See PSGI for more
17 Lemonldap::NG::Portal->run($opts);
18
20 Lemonldap::NG is a modular Web-SSO based on Apache::Session modules. It
21 provides an easy way to build a secured area to protect applications
22 with very few changes.
23
24 Lemonldap::NG manages both authentication and authorization.
25 Furthermore it provides headers for accounting. So you can have a full
26 AAA protection for your web space as described below.
27
28 Lemonldap::NG::Portal provides portal components. See
29 <http://lemonldap-ng.org> for more.
30
32 The portal object is based on Lemonldap::NG::Handler::Try: underlying
33 handler tries to authenticate user and follows initialized auth /
34 unauth routes.
35
36 Initialization
37 Initialization process subscribes portal to handler configuration
38 reload and requests handler initialization
39 (Lemonldap::NG::Portal::Main::Init). So configuration is read by
40 handler at each reload.
41
42 During configuration reload, each enabled components are loaded as
43 plugins:
44
45 authentication module
46 userDB module
47 other enabled plugins (issuers,...)
48
49 init() is called for each plugin. If a plugin initialization fails
50 (init() returns 0), the portal responds a 500 status code for each
51 request.
52
53 See Lemonldap::NG::Portal::Main::Plugin to see how to write modules.
54
55 Main route
56 The "/" route is declared in Lemonldap::NG::Portal::Main::Init. It
57 points to different methods in Lemonldap::NG::Portal::Main::Run. Theses
58 methods select methods to call in the process and call do().
59
60 do() stores methods to call in $req->steps and launches
61 Lemonldap::NG::Portal::Main::Process::process(). This method removes
62 each method stored in $req->steps and launches it. If the result is
63 PE_OK, process() continues, else it returns the error code.
64
65 If it is an Ajax request, do() responds in JSON format else it manages
66 redirection if any. Else it calls
67 Lemonldap::NG::Portal::Main::Display::display() to load template and
68 arguments, and launches Lemonldap::NG::Common::PSGI::sendHtml() using
69 them.
70
72 Portal main object is defined in Lemonldap::NG::Portal::Main::*
73 classes. Other components are plugins. Plugins do not have to store any
74 hash key in main object.
75
76 Main and plugin keys must be set during initialization process. They
77 must be read-only during requests receiving.
78
79 The Lemonldap::NG::Portal::Main::Request request has fixed keys. A
80 plugin that wants to store a temporary key must store it in
81 "$req->data" or use defined keys, but it must never create a root key.
82 Plugin keys may have explicit names to avoid conflicts.
83
84 Whole configuration is always available. It is stored in $self->conf.
85 It must not be modified by any components even during initialization
86 process or receiving request (during initialization, copy the value in
87 the plugin namespace instead).
88
89 All plugins can access to portal methods using $self->p which points to
90 portal main object. Some main methods are mapped to the plugin
91 namespace:
92
93 logger() accessor to log
94 userLogger() accessor to log user actions
95 error() accessor (use it to store error during initialization)
96
98 Most of the documentation is available on <http://lemonldap-ng.org>
99 website
100
101 OTHER POD FILES
102 Writing an authentication module: Lemonldap::NG::Portal::Auth
103 Writing a UserDB module: Lemonldap::NG::Portal::UserDB
104 Writing a second factor module:
105 Lemonldap::NG::Portal::Main::SecondFactor
106 Writing an issuer module: Lemonldap::NG::Portal::Main::Issuer
107 Writing another plugin: Lemonldap::NG::Portal::Main::Plugin
108 Request object: Lemonldap::NG::Portal::Main::Request
109 Adding parameters in the manager: Lemonldap::NG::Manager::Build
110
112 LemonLDAP::NG team <http://lemonldap-ng.org/team>
113
115 Use OW2 system to report bug or ask for features:
116 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
117
119 Lemonldap::NG is available at <https://lemonldap-ng.org/download>
120
122 See COPYING file for details.
123
124 This library is free software; you can redistribute it and/or modify it
125 under the terms of the GNU General Public License as published by the
126 Free Software Foundation; either version 2, or (at your option) any
127 later version.
128
129 This program is distributed in the hope that it will be useful, but
130 WITHOUT ANY WARRANTY; without even the implied warranty of
131 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
132 General Public License for more details.
133
134 You should have received a copy of the GNU General Public License along
135 with this program. If not, see <http://www.gnu.org/licenses/>.
136
137
138
139perl v5.36.1 2023-11-14 Lemonldap::NG::Portal(3)