make tidy with perltidy-20181120

environments/ppa-mbqj77/deployments/777^2^2
Xavier Guimard 6 years ago
parent 26c107cddb
commit c1137edba8
  1. 5
      Makefile
  2. 2
      fastcgi-server/man/llng-fastcgi-server.1p
  3. 3
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
  4. 1
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm
  5. 4
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm
  6. 6
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm
  7. 5
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
  8. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-OP-logout.t
  9. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-public_client.t
  10. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-with-authchoice.t
  11. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-with-none-alg.t
  12. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code.t
  13. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-hybrid.t
  14. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-implicit.t
  15. 6
      lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-sorted.t
  16. 3
      lemonldap-ng-portal/t/32-CAS-10.t
  17. 6
      lemonldap-ng-portal/t/32-OIDC-RP-rule.t
  18. 9
      lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t
  19. 24
      lemonldap-ng-portal/t/68-ContextSwitching-with-Logout.t
  20. 7
      lemonldap-ng-portal/t/test-ldap.pm

@ -1115,7 +1115,10 @@ test-diff:
done
tidy: clean
find lemon*/ -type f \( -name '*.pm' -or -name '*.pl' -or -name '*.fcgi' -or -name '*.t' \) -print -exec perltidy -se -b {} \;
@if perltidy -v|grep v20181120 >/dev/null; then \
find lemon*/ -type f \( -name '*.pm' -or -name '*.pl' -or -name '*.fcgi' -or -name '*.t' \) -print -exec perltidy -se -b {} \; ; \
else echo "Wrong perltidy version, please install Perl::Tidy@20181120" ; exit 1 ;\
fi
find lemon*/ -name '*.bak' -delete
$(MAKE) json

@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "llng-fastcgi-server 1"
.TH llng-fastcgi-server 1 "2019-06-27" "perl v5.28.1" "User Contributed Perl Documentation"
.TH llng-fastcgi-server 1 "2019-07-02" "perl v5.28.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

@ -218,8 +218,7 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\
},
'select' => {
'test' => sub {
my $test =
grep( { $_ eq $_[0]; }
my $test = grep( { $_ eq $_[0]; }
map( { $_->{'k'}; } @{ $_[2]{'select'}; } ) );
return $test
? 1

@ -1148,6 +1148,7 @@ sub attributes {
type => 'bool',
documentation => 'Enabled persistent storage',
},
# SAML issuer
issuerDBSAMLActivation => {
default => 0,

@ -672,6 +672,7 @@ sub tree {
'contextSwitchingRule',
'contextSwitchingIdRule',
'contextSwitchingStopWithLogout',
#'contextSwitchingHiddenAttributes',
]
},
@ -945,7 +946,8 @@ sub tree {
help => 'samlservice.html#organization',
form => 'simpleInputContainer',
nodes => [
'samlOrganizationDisplayName', 'samlOrganizationName',
'samlOrganizationDisplayName',
'samlOrganizationName',
'samlOrganizationURL'
]
},

@ -646,8 +646,10 @@ sub tests {
# Warn if Impersonation and ContextSwitching are simultaneously enabled
impersonation => sub {
return ( 1,
"Impersonation and ContextSwitching are simultaneously enabled" )
if ( $conf->{impersonationRule} && $conf->{contextSwitchingRule} );
"Impersonation and ContextSwitching are simultaneously enabled"
)
if ( $conf->{impersonationRule}
&& $conf->{contextSwitchingRule} );
# Return
return 1;

@ -451,7 +451,10 @@ sub updatePersistentSession {
my ( $self, $req, $infos, $uid, $id ) = @_;
# Return if no infos to update
return () unless ( ref $infos eq 'HASH' and %$infos and !$self->conf->{disablePersistentStorage} );
return ()
unless ( ref $infos eq 'HASH'
and %$infos
and !$self->conf->{disablePersistentStorage} );
$uid ||= $req->{sessionInfo}->{ $self->conf->{whatToTrace} }
|| $req->userData->{ $self->conf->{whatToTrace} };

@ -214,8 +214,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -313,8 +312,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -311,8 +311,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -409,8 +408,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -254,8 +254,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -363,8 +362,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -311,8 +311,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -409,8 +408,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -311,8 +311,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -409,8 +408,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -221,8 +221,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -317,8 +316,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -204,8 +204,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -299,8 +298,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -118,8 +118,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -213,8 +212,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -93,8 +93,7 @@ sub switch {
}
sub issuer {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',

@ -129,8 +129,7 @@ sub switch {
}
sub op {
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'idp.com',
@ -226,8 +225,7 @@ GQIDAQAB
sub rp {
my ( $jwks, $metadata ) = @_;
return LLNG::Manager::Test->new(
{
return LLNG::Manager::Test->new( {
ini => {
logLevel => $debug,
domain => 'rp.com',

@ -195,7 +195,14 @@ if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) {
}
count(3);
ok($res=Lemonldap::NG::Common::Apache::Session::REST->get_key_from_all_sessions( {baseUrl => 'http://auth.idp.com/sessions/global/'},sub{return 'a'}),'Search all sessions with a code');
ok(
$res =
Lemonldap::NG::Common::Apache::Session::REST->get_key_from_all_sessions(
{ baseUrl => 'http://auth.idp.com/sessions/global/' },
sub { return 'a' }
),
'Search all sessions with a code'
);
if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) {
my $tmp = 1;

@ -57,13 +57,16 @@ ok(
);
count(1);
expectOK($res);
ok( $res->[2]->[0] =~ m%<span trspan="connectedAs">Connected as</span> rtyler%,
'Connected as rtyler' )
or print STDERR Dumper( $res->[2]->[0] );
ok(
$res->[2]->[0] =~ m%<span trspan="connectedAs">Connected as</span> rtyler%,
'Connected as rtyler'
) or print STDERR Dumper( $res->[2]->[0] );
expectAuthenticatedAs( $res, 'rtyler' );
ok( $res->[2]->[0] =~ m%<span trspan="contextSwitching_ON">contextSwitching_ON</span>%,
'Connected as rtyler' )
or print STDERR Dumper( $res->[2]->[0] );
ok(
$res->[2]->[0] =~
m%<span trspan="contextSwitching_ON">contextSwitching_ON</span>%,
'Connected as rtyler'
) or print STDERR Dumper( $res->[2]->[0] );
count(2);
# ContextSwitching form -> PE_OK
@ -80,7 +83,8 @@ count(1);
my ( $host, $url, $query ) =
expectForm( $res, undef, '/switchcontext', 'spoofId' );
ok( $res->[2]->[0] =~ m%<span trspan="contextSwitching_ON">%, 'Found trspan="contextSwitching_ON"' )
ok( $res->[2]->[0] =~ m%<span trspan="contextSwitching_ON">%,
'Found trspan="contextSwitching_ON"' )
or explain( $res->[2]->[0], 'trspan="contextSwitching_ON"' );
$query =~ s/spoofId=/spoofId=dwho/;
ok(
@ -104,7 +108,8 @@ ok(
);
count(3);
expectAuthenticatedAs( $res, 'dwho' );
ok( $res->[2]->[0] =~ m%<span trspan="contextSwitching_OFF">%, 'Found trspan="contextSwitching_OFF"' )
ok( $res->[2]->[0] =~ m%<span trspan="contextSwitching_OFF">%,
'Found trspan="contextSwitching_OFF"' )
or explain( $res->[2]->[0], 'trspan="contextSwitching_OFF"' );
ok(
$res = $client->_get(
@ -126,7 +131,8 @@ ok( $res->[2]->[0] =~ m%<td scope="row">dwho</td>%, 'Found value dwho' )
or explain( $res->[2]->[0], 'Value dwho' );
ok( $res->[2]->[0] =~ m%<td scope="row">mail</td>%, 'Found attribute mail' )
or explain( $res->[2]->[0], 'Attribute mail' );
ok( $res->[2]->[0] =~ m%<td scope="row">testPrefix__session_id</td>%, 'Found spoofed _id_session' )
ok( $res->[2]->[0] =~ m%<td scope="row">testPrefix__session_id</td>%,
'Found spoofed _id_session' )
or explain( $res->[2]->[0], 'Spoofed _id_session' );
count(5);

@ -3,11 +3,12 @@
if ( $ENV{LLNGTESTLDAP} ) {
my $slapd_bin = $ENV{LLNGTESTLDAP_SLAPD_BIN} || '/usr/sbin/slapd';
my $slapadd_bin = $ENV{LLNGTESTLDAP_SLAPADD_BIN} || '/usr/sbin/slapadd';
my $slapd_schema_dir =
( $ENV{LLNGTESTLDAP_SCHEMA_DIR}
my $slapd_schema_dir = (
$ENV{LLNGTESTLDAP_SCHEMA_DIR}
and -d $ENV{LLNGTESTLDAP_SCHEMA_DIR} ? $ENV{LLNGTESTLDAP_SCHEMA_DIR}
: -d '/etc/slapd/schema' ? '/etc/slapd/schema'
: '/etc/ldap/schema' );
: '/etc/ldap/schema'
);
eval { mkdir 't/testslapd/slapd.d' };
eval { mkdir 't/testslapd/data' };
system('cp t/testslapd/slapd.ldif t/testslapd/slapd-test.ldif');

Loading…
Cancel
Save