From 19f46073f52d9e46cb3bb1cbc124ec067f2cf67b Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Fri, 1 Jan 2016 19:56:00 +0000 Subject: [PATCH] Update POD --- .../lib/Lemonldap/NG/Common/PSGI.pm | 10 ++-- .../lib/Lemonldap/NG/Common/PSGI/Router.pm | 46 ++++++++++++++----- .../lib/Lemonldap/NG/Manager.pm | 35 +++++++++----- .../lib/Lemonldap/NG/Manager/Cli.pm | 10 ++-- .../lib/Lemonldap/NG/Manager/Conf.pm | 15 ++++-- 5 files changed, 81 insertions(+), 35 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm index 9f09934c2..a215a5fd0 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm @@ -263,11 +263,13 @@ created object: =over -=item Class->run($args): launch new($args), init(), then manage requests (using -private _run() method +=item Class->run($args): -=item $object->run(): manage directly requests. Initialization must have be done -earlier. +launch new($args), init(), then manage requests (using private _run() method + +=item $object->run(): + +manage directly requests. Initialization must have be done earlier. =back diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm index ec4024223..3cc85f097 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm @@ -224,11 +224,17 @@ Declare a REST route. Arguments: =over -=item $word: the first word of /path/info. +=item $word: -=item $dest: string, sub ref or hash ref (see "Route types" bellow) +the first word of /path/info. -=item $methods: array ref containing the methods concerned by this route. +=item $dest: + +string, sub ref or hash ref (see "Route types" bellow) + +=item $methods: + +array ref containing the methods concerned by this route. =back @@ -239,15 +245,25 @@ can be: =over -=item a word: the name of the method to call +=item a word: -=item undef: $word is used as $dest +the name of the method to call -=item a ref to code: an anonymous subroutin to call +=item undef: -=item a hash ref: it's a recursive call to `{ $word => $dest }` +$word is used as $dest -=item an array ref: in this case each element of the array will be considered as +=item a ref to code: + +an anonymous subroutin to call + +=item a hash ref: + +it's a recursive call to `{ $word => $dest }` + +=item an array ref: + +in this case each element of the array will be considered as `{ $element => $element }`. So each element must be a word that makes a correspondance between a path_info word and a subroutine @@ -257,13 +273,19 @@ Some special $word: =over -=item ':name': the word in path_info will be stored in GET parameters +=item ':name': -=item '*': the subroutine will be called with the word of path_info as second argument +the word in path_info will be stored in GET parameters + +=item '*': + +the subroutine will be called with the word of path_info as second argument (after $req) -=item 'something.html': if $word finishes with '.html', then sendHtml() will be called -with 'something.tpl' as template name. In this case, $dest is not used. +=item 'something.html': + +if $word finishes with '.html', then sendHtml() will be called with +'something.tpl' as template name. In this case, $dest is not used. =back diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm index 3c0aae945..086b99196 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm @@ -109,13 +109,21 @@ Lemonldap::NG Manager contains 4 parts: =over -=item Configuration management: see L; +=item Configuration management: -=item Session explorer: see L; +see L; -=item Notification explorer: see L; +=item Session explorer: -=item Some files uses to generate static files: see below. +see L; + +=item Notification explorer: + +see L; + +=item Some files uses to generate static files: + +see below. =back @@ -126,16 +134,21 @@ Lemonldap::NG::Manager::Build::Tree and Lemonldap::NG::Manager::Build::CTrees to =over -=item `site/static/struct.json`: the main file that contains the tree view; +=item `site/static/struct.json`: -=item `site/static/js/conftree.js`: generates sub tree for virtualhosts and -SAML and OpenID-Connect partners; +the main file that contains the tree view; -=item `Lemonldap::NG::Manager::Constants`: constants used by all Perl manager -components; +=item `site/static/js/conftree.js`: -=item `Lemonldap::NG::Common::Conf::DefaultValues`: constants used to read -configuration. +generates sub tree for virtualhosts and SAML and OpenID-Connect partners; + +=item `Lemonldap::NG::Manager::Constants`: + +constants used by all Perl manager components; + +=item `Lemonldap::NG::Common::Conf::DefaultValues`: + +constants used to read configuration. =back diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm index f5784de9a..ecf11d1d8 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm @@ -144,6 +144,8 @@ sub _setKey { sub run { my $self = shift; + print STDERR "VERY EXPERIMENTAL FEATURE, prefer web interface\n"; + if ( $> == 0 ) { print STDERR "$0 must not be launched as root since local cache can be corrupted\n" @@ -192,8 +194,8 @@ __END__ =encoding utf8 -Lemonldap::NG::Manager::Cli - Command line manager for Lemonldap::NG web SSO -system. +Lemonldap::NG::Manager::Cli - EXPERIMENTAL command line manager for +Lemonldap::NG web SSO system. =head1 SYNOPSIS @@ -217,8 +219,8 @@ or use llng-manager-cli provides with this package. Lemonldap::NG::Manager provides a web interface to manage Lemonldap::NG Web-SSO system. -Lemonldap::NG Manager::Cli provides a command line client to read or modify -configuration. +Lemonldap::NG Manager::Cli provides an EXPERIMENTAL command line client to read +or modify configuration. =head1 METHODS diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm index cee9deb65..7fa91b893 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm @@ -35,7 +35,9 @@ sub addRoutes { ->addRoute( confs => { ':cfgNum' => [ - qw(virtualHosts samlIDPMetaDataNodes samlSPMetaDataNodes applicationList oidcOPMetaDataNodes oidcRPMetaDataNodes authChoiceModules grantSessionRules) + qw(virtualHosts samlIDPMetaDataNodes samlSPMetaDataNodes + applicationList oidcOPMetaDataNodes oidcRPMetaDataNodes + authChoiceModules grantSessionRules) ] }, ['GET'] @@ -692,7 +694,8 @@ sub newConf { { tree => $new, refConf => $self->currentConf, req => $req } ); my $res = { result => $parser->check }; -# "message" fields: note that words enclosed by "__" (__word__) will be translated + # "message" fields: note that words enclosed by "__" (__word__) will be + # translated $res->{message} = $parser->{message}; foreach my $t (qw(errors warnings changes)) { $res->{details}->{ '__' . $t . '__' } = $parser->$t @@ -893,10 +896,14 @@ Lemonldap::NG::Manager configuration is managed by 2 files: =over -=item This file to display configuration metadatas and keys content, and to +=item This file + +to display configuration metadatas and keys content, and to save new configuration, -=item L used to check proposed configuration. +=item L + +used to check proposed configuration. =back