Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
4ae5c746
Commit
4ae5c746
authored
Jan 30, 2017
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace .pl (
#595
)
parent
67712c78
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
35 additions
and
205 deletions
+35
-205
Makefile
Makefile
+1
-3
_example/conf/lmConf-1.json
_example/conf/lmConf-1.json
+2
-2
debian/liblemonldap-ng-portal-perl.links
debian/liblemonldap-ng-portal-perl.links
+1
-7
debian/liblemonldap-ng-portal-perl.preinst
debian/liblemonldap-ng-portal-perl.preinst
+1
-3
lemonldap-ng-common/lemonldap-ng.ini
lemonldap-ng-common/lemonldap-ng.ini
+4
-4
lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/SOAP.pm
...-ng-common/lib/Lemonldap/NG/Common/Apache/Session/SOAP.pm
+4
-4
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
+1
-1
lemonldap-ng-handler/MANIFEST
lemonldap-ng-handler/MANIFEST
+0
-1
lemonldap-ng-handler/example/MyHandlerLog4Perl.pm
lemonldap-ng-handler/example/MyHandlerLog4Perl.pm
+1
-1
lemonldap-ng-handler/example/autoProtectedCGI.pl
lemonldap-ng-handler/example/autoProtectedCGI.pl
+0
-18
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Zero.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Zero.pm
+2
-2
lemonldap-ng-manager/t/conf/lmConf-1.json
lemonldap-ng-manager/t/conf/lmConf-1.json
+2
-2
lemonldap-ng-manager/t/jsonfiles/01-base-tree.json
lemonldap-ng-manager/t/jsonfiles/01-base-tree.json
+1
-1
lemonldap-ng-manager/t/jsonfiles/02-base-tree-all-nodes-opened.json
...ng-manager/t/jsonfiles/02-base-tree-all-nodes-opened.json
+3
-3
lemonldap-ng-manager/t/jsonfiles/12-modified.json
lemonldap-ng-manager/t/jsonfiles/12-modified.json
+3
-3
lemonldap-ng-manager/t/jsonfiles/14-bad.json
lemonldap-ng-manager/t/jsonfiles/14-bad.json
+3
-3
lemonldap-ng-portal/MANIFEST
lemonldap-ng-portal/MANIFEST
+0
-1
lemonldap-ng-portal/example/mail.pl
lemonldap-ng-portal/example/mail.pl
+0
-140
lemonldap-ng-portal/example/soapconfigtest.pl
lemonldap-ng-portal/example/soapconfigtest.pl
+1
-1
lemonldap-ng-portal/example/soaptest.pl
lemonldap-ng-portal/example/soaptest.pl
+1
-1
scripts/test-perf.pl
scripts/test-perf.pl
+4
-4
No files found.
Makefile
View file @
4ae5c746
...
...
@@ -692,8 +692,6 @@ install_examples_site:
@
rm
-rf
$(REXAMPLESDIR)
/portal/skins
\
$(REXAMPLESDIR)
/manager/skins
\
@rm
-rf
$$
(
find
$(REXAMPLESDIR)
-type
d
-name
.svn
)
@
$(PERL)
-i
-pe
's#__SESSIONDIR__#
$(APACHESESSIONFILEDIR)
/#g;'
$(REXAMPLESDIR)
/portal/
*
.pl
@
$(PERL)
-i
-pe
's#__PSESSIONDIR__#
$(APACHEPSESSIONFILEDIR)
/#g;'
$(REXAMPLESDIR)
/portal/
*
.pl
install_doc_site
:
# Offline documentation install
...
...
@@ -998,7 +996,7 @@ test-diff:
done
tidy
:
clean
find lemon
*
/
-type
f
\(
-name
'*.pm'
-or
-name
'*.pl'
-or
-name
'*.t'
\)
-print
-exec
perltidy
-b
{}
\;
find lemon
*
/
-type
f
\(
-name
'*.pm'
-or
-name
'*.pl'
-or
-name
'*.fcgi'
-or
-name
'*.t'
\)
-print
-exec
perltidy
-b
{}
\;
find lemon
*
/
-name
'*.bak'
-delete
$(MAKE)
json
...
...
_example/conf/lmConf-1.json
View file @
4ae5c746
...
...
@@ -139,7 +139,7 @@
"macros"
:
{
"_whatToTrace"
:
"$_auth eq 'SAML' ?
\"
$_user
\\
@$_idpConfKey
\"
:
\"
$_user
\"
"
},
"mailUrl"
:
"http://auth.__DNSDOMAIN__/
mail.pl
"
,
"mailUrl"
:
"http://auth.__DNSDOMAIN__/
resetpwd
"
,
"notification"
:
1
,
"notificationStorage"
:
"File"
,
"notificationStorageOptions"
:
{
...
...
@@ -155,7 +155,7 @@
"portalSkin"
:
"bootstrap"
,
"portalSkinBackground"
:
"1280px-Cedar_Breaks_National_Monument_partially.jpg"
,
"registerDB"
:
"Demo"
,
"registerUrl"
:
"http://auth.__DNSDOMAIN__/register
.pl
"
,
"registerUrl"
:
"http://auth.__DNSDOMAIN__/register"
,
"reloadUrls"
:
{
"reload.__DNSDOMAIN__"
:
"http://reload.__DNSDOMAIN__/reload"
},
...
...
debian/liblemonldap-ng-portal-perl.links
View file @
4ae5c746
/etc/lemonldap-ng/portal-apache2.conf /etc/apache2/sites-available/portal-apache2.conf
/etc/lemonldap-ng/portal-nginx.conf /etc/nginx/sites-available/portal-nginx.conf
/usr/share/lemonldap-ng/portal/cdc.pl /var/lib/lemonldap-ng/portal/cdc.pl
/usr/share/lemonldap-ng/portal/index.pl /var/lib/lemonldap-ng/portal/index.pl
/usr/share/lemonldap-ng/portal/mail.pl /var/lib/lemonldap-ng/portal/mail.pl
/usr/share/lemonldap-ng/portal/metadata.pl /var/lib/lemonldap-ng/portal/metadata.pl
/usr/share/lemonldap-ng/portal/register.pl /var/lib/lemonldap-ng/portal/register.pl
/usr/share/lemonldap-ng/portal/openid-configuration.pl /var/lib/lemonldap-ng/portal/openid-configuration.pl
/usr/share/doc/liblemonldap-ng-portal-perl/examples/index_skin.pl /usr/share/doc/liblemonldap-ng-portal-perl/examples/index.pl
/usr/share/lemonldap-ng/portal/index.fcgi /var/lib/lemonldap-ng/portal/index.fcgi
debian/liblemonldap-ng-portal-perl.preinst
View file @
4ae5c746
...
...
@@ -6,9 +6,7 @@ set -e
if
[
"
$1
"
==
"configure"
]
then
if
[
-f
/var/lib/lemonldap-ng/portal/index.pl
]
;
then
\
diff /var/lib/lemonldap-ng/portal/index.pl
\
/usr/share/doc/liblemonldap-ng-portal-perl/examples/index_skin.pl
&&
\
if
[
-l
/var/lib/lemonldap-ng/portal/index.pl
]
;
then
rm
-rf
/var/lib/lemonldap-ng/portal/index.pl
fi
fi
...
...
lemonldap-ng-common/lemonldap-ng.ini
View file @
4ae5c746
...
...
@@ -61,7 +61,7 @@
; You have to set 'proxy' parameter. Example:
;
; type = SOAP
; proxy = https://auth.example.com/
index.pl/
config
; proxy = https://auth.example.com/config
; proxyOptions = { timeout => 5 }
; User = lemonldap
; Password = mypassword
...
...
@@ -141,7 +141,7 @@ localStorageOptions={ \
; error(language, code)
;Soap = 1
; Note that getAttibutes() will be activated but on a different URI
; (http://auth.example.com/
index.pl/
sessions)
; (http://auth.example.com/sessions)
; You can also restrict attributes and macros exported by getAttributes
;exportedAttr = uid mail
...
...
@@ -198,8 +198,8 @@ localStorageOptions={ \
; Use it to be able to notify messages during authentication
;notification = 1
; Note that the SOAP function newNotification will be activated on
; http://auth.example.com/
index.pl/
notification
; If you want to hide this, just protect "/index.
pl
/notification" in
; http://auth.example.com/notification
; If you want to hide this, just protect "/index.
fcgi
/notification" in
; your Apache configuration file
; XSS protection bypass
; By default, the portal refuse redirections that comes from sites not
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/SOAP.pm
View file @
4ae5c746
...
...
@@ -290,7 +290,7 @@ access to Lemonldap::NG Web-SSO sessions via SOAP.
__PACKAGE__->init ({
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
globalStorageOptions => {
proxy => 'http://auth.example.com/
index.pl/
sessions',
proxy => 'http://auth.example.com/sessions',
proxyOptions => {
timeout => 5,
},
...
...
@@ -313,7 +313,7 @@ access to Lemonldap::NG Web-SSO sessions via SOAP.
my $portal = new Lemonldap::NG::Portal::SharedConf (
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
globalStorageOptions => {
proxy => 'http://auth.example.com/
index.pl/
sessions',
proxy => 'http://auth.example.com/sessions',
proxyOptions => {
timeout => 5,
},
...
...
@@ -368,7 +368,7 @@ C<>SOAP::Transport::HTTP::Client::get_basic_credentials>:
__PACKAGE__->init ( {
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
globalStorageOptions => {
proxy => 'http://auth.example.com/
index.pl/
sessions',
proxy => 'http://auth.example.com/sessions',
User => 'http-user',
Password => 'pass',
},
...
...
@@ -390,7 +390,7 @@ set environment variables.
__PACKAGE__->init ( {
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
globalStorageOptions => {
proxy => 'https://auth.example.com/
index.pl/
sessions',
proxy => 'https://auth.example.com/sessions',
},
} );
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
View file @
4ae5c746
...
...
@@ -47,7 +47,7 @@ BEGIN {
# - { Type => "File", dirName => "/path/to/conf/dir/" },
# - { Type => "DBI", dbiChain => "DBI:mysql:database=lemonldap-ng;host=1.2.3.4",
# dbiUser => "user", dbiPassword => "password" },
# - { Type => "SOAP", proxy => "https://auth.example.com/
index.pl/
config" },
# - { Type => "SOAP", proxy => "https://auth.example.com/config" },
# - { Type => "LDAP", ldapServer => "ldap://localhost", ldapConfBranch => "ou=conf,ou=applications,dc=example,dc=com",
# ldapBindDN => "cn=manager,dc=example,dc=com", ldapBindPassword => "secret"},
#
...
...
lemonldap-ng-handler/MANIFEST
View file @
4ae5c746
Changes
example/autoProtectedCGI.pl
example/menu.pl
example/MyHandlerLog4Perl.pm
example/scripts/purgeLocalCache
...
...
lemonldap-ng-handler/example/MyHandlerLog4Perl.pm
View file @
4ae5c746
...
...
@@ -55,7 +55,7 @@ __PACKAGE__->init(
# configuration. Example:
#globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
#globalStorageOptions => {
# proxy => 'http://auth.example.com/
index.pl/
sessions',
# proxy => 'http://auth.example.com/sessions',
# proxyOptions => {
# timeout => 5,
# },
...
...
lemonldap-ng-handler/example/autoProtectedCGI.pl
deleted
100755 → 0
View file @
67712c78
#!/usr/bin/perl
my
$cgi
=
new
Lemonldap::NG::Handler::
CGI
(
{
https
=>
0
,
}
);
$cgi
->
authenticate
();
print
$cgi
->
header
;
unless
(
$cgi
->
authorize
)
{
print
$cgi
->
start_html
('
Forbidden
');
print
"
You're not authorized to see this page
";
print
$cgi
->
end_html
;
}
else
{
print
$cgi
->
start_html
('
Authorized
');
print
"
<h1>Welcome</h1>You're authorized to see this page
";
print
$cgi
->
end_html
;
}
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Zero.pm
View file @
4ae5c746
...
...
@@ -140,7 +140,7 @@ sub zeroConf {
}
},
'
registerDB
'
=>
'
Demo
',
'
registerUrl
'
=>
"
http://auth.
$domain
/register
.pl
",
'
registerUrl
'
=>
"
http://auth.
$domain
/register
",
'
portal
'
=>
"
http://auth.
$domain
/
",
'
notificationStorage
'
=>
'
File
',
'
locationRules
'
=>
{
...
...
@@ -170,7 +170,7 @@ sub zeroConf {
'
portalSkin
'
=>
'
bootstrap
',
'
portalSkinBackground
'
=>
'
1280px-Cedar_Breaks_National_Monument_partially.jpg
',
'
mailUrl
'
=>
"
http://auth.
$domain
/
mail.pl
",
'
mailUrl
'
=>
"
http://auth.
$domain
/
resetpwd
",
'
localSessionStorage
'
=>
'
Cache::FileCache
',
'
localSessionStorageOptions
'
=>
{
'
namespace
'
=>
'
lemonldap-ng-sessions
',
...
...
lemonldap-ng-manager/t/conf/lmConf-1.json
View file @
4ae5c746
...
...
@@ -42,7 +42,7 @@
"display"
:
"auto"
,
"logo"
:
"database.png"
,
"name"
:
"Notifications explorer"
,
"uri"
:
"http://manager.example.com/notifications
.pl
"
"uri"
:
"http://manager.example.com/notifications"
},
"type"
:
"application"
},
...
...
@@ -52,7 +52,7 @@
"display"
:
"auto"
,
"logo"
:
"database.png"
,
"name"
:
"Sessions explorer"
,
"uri"
:
"http://manager.example.com/sessions
.pl
"
"uri"
:
"http://manager.example.com/sessions"
},
"type"
:
"application"
},
...
...
lemonldap-ng-manager/t/jsonfiles/01-base-tree.json
View file @
4ae5c746
...
...
@@ -779,7 +779,7 @@
"title"
:
"ns"
,
"type"
:
"keyText"
},
{
"data"
:
"http://auth.example.com/
index.pl/
sessions"
,
"data"
:
"http://auth.example.com/sessions"
,
"id"
:
"remoteGlobalStorageOptions/proxy"
,
"title"
:
"proxy"
,
"type"
:
"keyText"
...
...
lemonldap-ng-manager/t/jsonfiles/02-base-tree-all-nodes-opened.json
View file @
4ae5c746
...
...
@@ -98,7 +98,7 @@
"id"
:
"applicationList/0004-cat/0006-app"
,
"data"
:
{
"display"
:
"auto"
,
"uri"
:
"http://manager.example.com/notifications
.pl
"
,
"uri"
:
"http://manager.example.com/notifications"
,
"description"
:
"Explore WebSSO notifications"
,
"logo"
:
"database.png"
}
...
...
@@ -107,7 +107,7 @@
"display"
:
"auto"
,
"description"
:
"Explore WebSSO sessions"
,
"logo"
:
"database.png"
,
"uri"
:
"http://manager.example.com/sessions
.pl
"
"uri"
:
"http://manager.example.com/sessions"
},
"title"
:
"Sessions explorer"
,
"type"
:
"menuApp"
,
...
...
@@ -908,7 +908,7 @@
"title"
:
"ns"
,
"type"
:
"keyText"
},
{
"data"
:
"http://auth.example.com/
index.pl/
sessions"
,
"data"
:
"http://auth.example.com/sessions"
,
"id"
:
"remoteGlobalStorageOptions/proxy"
,
"title"
:
"proxy"
,
"type"
:
"keyText"
...
...
lemonldap-ng-manager/t/jsonfiles/12-modified.json
View file @
4ae5c746
...
...
@@ -108,7 +108,7 @@
"id"
:
"applicationList/0004-cat/0006-app"
,
"data"
:
{
"display"
:
"auto"
,
"uri"
:
"http://manager.example.com/notifications
.pl
"
,
"uri"
:
"http://manager.example.com/notifications"
,
"description"
:
"Explore WebSSO notifications"
,
"logo"
:
"database.png"
}
...
...
@@ -117,7 +117,7 @@
"display"
:
"auto"
,
"description"
:
"Explore WebSSO sessions"
,
"logo"
:
"database.png"
,
"uri"
:
"http://manager.example.com/sessions
.pl
"
"uri"
:
"http://manager.example.com/sessions"
},
"title"
:
"Sessions explorer"
,
"type"
:
"menuApp"
,
...
...
@@ -918,7 +918,7 @@
"title"
:
"ns"
,
"type"
:
"keyText"
},
{
"data"
:
"http://auth.example.com/
index.pl/
sessions"
,
"data"
:
"http://auth.example.com/sessions"
,
"id"
:
"remoteGlobalStorageOptions/proxy"
,
"title"
:
"proxy"
,
"type"
:
"keyText"
...
...
lemonldap-ng-manager/t/jsonfiles/14-bad.json
View file @
4ae5c746
...
...
@@ -98,7 +98,7 @@
"id"
:
"applicationList/0004-cat/0006-app"
,
"data"
:
{
"display"
:
"auto"
,
"uri"
:
"http://manager.example.com/notifications
.pl
"
,
"uri"
:
"http://manager.example.com/notifications"
,
"description"
:
"Explore WebSSO notifications"
,
"logo"
:
"database.png"
}
...
...
@@ -107,7 +107,7 @@
"display"
:
"auto"
,
"description"
:
"Explore WebSSO sessions"
,
"logo"
:
"database.png"
,
"uri"
:
"http://manager.example.com/sessions
.pl
"
"uri"
:
"http://manager.example.com/sessions"
},
"title"
:
"Sessions explorer"
,
"type"
:
"menuApp"
,
...
...
@@ -908,7 +908,7 @@
"title"
:
"ns"
,
"type"
:
"keyText"
},
{
"data"
:
"http://auth.example.com/
index.pl/
sessions"
,
"data"
:
"http://auth.example.com/sessions"
,
"id"
:
"remoteGlobalStorageOptions/proxy"
,
"title"
:
"proxy"
,
"type"
:
"keyText"
...
...
lemonldap-ng-portal/MANIFEST
View file @
4ae5c746
...
...
@@ -2,7 +2,6 @@
bower.json
Changes
eg/index.fcgi
example/mail.pl
example/soapconfigtest.pl
example/soaperrortest.pl
example/soaptest.pl
...
...
lemonldap-ng-portal/example/mail.pl
deleted
100755 → 0
View file @
67712c78
#!/usr/bin/perl
use
Lemonldap::NG::Portal::
MailReset
;
use
HTML::
Template
;
use
strict
;
# Load portal module
my
$portal
=
Lemonldap::NG::Portal::
MailReset
->
new
();
my
$skin_dir
=
$portal
->
getApacheHtdocsPath
()
.
"
/skins
";
my
$portal_url
=
$portal
->
{
portal
};
my
$portalPath
=
$portal
->
{
portal
};
$portalPath
=~
s#^https?://[^/]+/?#/#
;
$portalPath
=~
s#[^/]+\.pl$##
;
# Process
$portal
->
process
();
my
$skin
=
$portal
->
getSkin
();
# Template creation
my
$template
=
HTML::
Template
->
new
(
filename
=>
"
$skin_dir
/
$skin
/mail.tpl
",
die_on_bad_params
=>
0
,
cache
=>
0
,
filter
=>
[
sub
{
$portal
->
translate_template
(
@
_
)
},
sub
{
$portal
->
session_template
(
@
_
)
}
],
);
$template
->
param
(
PORTAL_URL
=>
$portal_url
,
SKIN_PATH
=>
$portalPath
.
"
skins
",
SKIN
=>
$skin
,
SKIN_BG
=>
$portal
->
{
portalSkinBackground
},
AUTH_ERROR
=>
$portal
->
error
,
AUTH_ERROR_TYPE
=>
$portal
->
error_type
,
CHOICE_PARAM
=>
$portal
->
{
authChoiceParam
},
CHOICE_VALUE
=>
$portal
->
{
_authChoice
},
EXPMAILDATE
=>
$portal
->
{
expMailDate
},
EXPMAILTIME
=>
$portal
->
{
expMailTime
},
STARTMAILDATE
=>
$portal
->
{
startMailDate
},
STARTMAILTIME
=>
$portal
->
{
startMailTime
},
MAILALREADYSENT
=>
$portal
->
{
mail_already_sent
},
MAIL
=>
$portal
->
checkXSSAttack
(
'
mail
',
$portal
->
{
mail
}
)
?
""
:
$portal
->
{
mail
},
MAIL_TOKEN
=>
$portal
->
checkXSSAttack
(
'
mail_token
',
$portal
->
{
mail_token
}
)
?
""
:
$portal
->
{
mail_token
},
);
# Display form the first time
if
(
(
$portal
->
{
error
}
==
PE_MAILFORMEMPTY
or
$portal
->
{
error
}
==
PE_MAILFIRSTACCESS
or
$portal
->
{
error
}
==
PE_MAILNOTFOUND
or
$portal
->
{
error
}
==
PE_CAPTCHAERROR
or
$portal
->
{
error
}
==
PE_CAPTCHAEMPTY
)
and
!
$portal
->
{
mail_token
}
)
{
$template
->
param
(
DISPLAY_FORM
=>
1
,
DISPLAY_RESEND_FORM
=>
0
,
DISPLAY_CONFIRMMAILSENT
=>
0
,
DISPLAY_MAILSENT
=>
0
,
DISPLAY_PASSWORD_FORM
=>
0
,
);
}
# Display captcha if it's enabled
if
(
$portal
->
{
captcha_mail_enabled
}
)
{
$template
->
param
(
CAPTCHA_IMG
=>
$portal
->
{
captcha_img
},
CAPTCHA_CODE
=>
$portal
->
{
captcha_code
},
CAPTCHA_SIZE
=>
$portal
->
{
captcha_size
}
);
}
# Display mail confirmation resent form
if
(
$portal
->
{
error
}
==
PE_MAILCONFIRMATION_ALREADY_SENT
)
{
$template
->
param
(
DISPLAY_FORM
=>
0
,
DISPLAY_RESEND_FORM
=>
1
,
DISPLAY_CONFIRMMAILSENT
=>
0
,
DISPLAY_MAILSENT
=>
0
,
DISPLAY_PASSWORD_FORM
=>
0
,
);
}
# Display confirmation mail sent
if
(
$portal
->
{
error
}
==
PE_MAILCONFIRMOK
)
{
$template
->
param
(
DISPLAY_FORM
=>
0
,
DISPLAY_RESEND_FORM
=>
0
,
DISPLAY_CONFIRMMAILSENT
=>
1
,
DISPLAY_MAILSENT
=>
0
,
DISPLAY_PASSWORD_FORM
=>
0
,
);
}
# Display mail sent
if
(
$portal
->
{
error
}
==
PE_MAILOK
)
{
$template
->
param
(
DISPLAY_FORM
=>
0
,
DISPLAY_RESEND_FORM
=>
0
,
DISPLAY_CONFIRMMAILSENT
=>
0
,
DISPLAY_MAILSENT
=>
1
,
DISPLAY_PASSWORD_FORM
=>
0
,
);
}
# Display password change form
if
(
$portal
->
{
mail_token
}
and
$portal
->
{
error
}
!=
PE_MAILERROR
and
$portal
->
{
error
}
!=
PE_BADMAILTOKEN
and
$portal
->
{
error
}
!=
PE_MAILOK
)
{
$template
->
param
(
DISPLAY_FORM
=>
0
,
DISPLAY_RESEND_FORM
=>
0
,
DISPLAY_CONFIRMMAILSENT
=>
0
,
DISPLAY_MAILSENT
=>
0
,
DISPLAY_PASSWORD_FORM
=>
1
,
);
}
# Custom template parameters
if
(
my
$customParams
=
$portal
->
getCustomTemplateParameters
()
)
{
foreach
(
keys
%$customParams
)
{
$template
->
param
(
$_
,
$customParams
->
{
$_
}
);
}
}
print
$portal
->
header
('
text/html; charset=utf-8
');
print
$template
->
output
;
lemonldap-ng-portal/example/soapconfigtest.pl
View file @
4ae5c746
...
...
@@ -12,7 +12,7 @@ use Data::Dumper;
# Service
my
$soap
=
SOAP::
Lite
->
new
(
proxy
=>
'
http://auth.example.com/
index.pl/
config
'
);
SOAP::
Lite
->
new
(
proxy
=>
'
http://auth.example.com/config
'
);
$soap
->
default_ns
('
urn:Lemonldap/NG/Common/CGI/SOAPService
');
# Call SOAP methods
...
...
lemonldap-ng-portal/example/soaptest.pl
View file @
4ae5c746
...
...
@@ -15,7 +15,7 @@ my $session_id = shift @ARGV;
# Service
my
$soap
=
SOAP::
Lite
->
new
(
proxy
=>
'
http://auth.example.com/
index.pl/
sessions
'
);
SOAP::
Lite
->
new
(
proxy
=>
'
http://auth.example.com/sessions
'
);
$soap
->
default_ns
('
urn:Lemonldap/NG/Common/CGI/SOAPService
');
# Call some SOAP methods
...
...
scripts/test-perf.pl
View file @
4ae5c746
...
...
@@ -16,7 +16,7 @@ my ( $request, @get, @post, @menu, @cookies, @handler );
$request
=
new
HTTP::
Request
(
'
GET
',
'
http://lemonldap-ng.org/
'
);
$ua
->
request
(
$request
,
\
&cb_content
);
$request
=
new
HTTP::
Request
(
'
GET
',
'
http://127.0.0.1/
index_simple.pl
'
);
$request
=
new
HTTP::
Request
(
'
GET
',
'
http://127.0.0.1/
'
);
$request
->
header
(
Host
=>
'
auth.example.com
'
);
for
(
my
$i
=
0
;
$i
<
NB
;
$i
++
)
{
my
$time
=
time
();
...
...
@@ -25,7 +25,7 @@ for ( my $i = 0 ; $i < NB ; $i++ ) {
push
@get
,
$time2
;
}
$request
=
new
HTTP::
Request
(
'
POST
',
'
http://127.0.0.1/
index_simple.pl
'
);
$request
=
new
HTTP::
Request
(
'
POST
',
'
http://127.0.0.1/
'
);
$request
->
header
(
Host
=>
'
auth.example.com
'
);
$request
->
header
(
'
Content-Lenght
'
=>
'
42
'
);
$request
->
header
(
'
Content-Type
'
=>
'
application/x-www-form-urlencoded
'
);
...
...
@@ -54,7 +54,7 @@ for ( my $i = 0 ; $i < NB ; $i++ ) {
}
for
(
my
$i
=
0
;
$i
<
NB
;
$i
++
)
{
$request
=
new
HTTP::
Request
(
'
GET
',
'
http://127.0.0.1/
index_simple.pl
'
);
$request
=
new
HTTP::
Request
(
'
GET
',
'
http://127.0.0.1/
'
);
$request
->
header
(
Host
=>
'
auth.example.com
'
);
my
$cookie
=
shift
@cookies
;
$request
->
header
(
"
Cookie
",
$cookie
);
...
...
@@ -62,7 +62,7 @@ for ( my $i = 0 ; $i < NB ; $i++ ) {
my
$response
=
$ua
->
request
(
$request
,
\
&cb_content
);
my
$time2
=
time
()
-
$time
;
push
@menu
,
$time2
;
$request
=
new
HTTP::
Request
(
'
GET
',
'
http://127.0.0.1/
index.pl
'
);
$request
=
new
HTTP::
Request
(
'
GET
',
'
http://127.0.0.1/
'
);
$request
->
header
(
Host
=>
'
test.example.com
'
);
$request
->
header
(
"
Cookie
",
$cookie
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment