Don't reload portal if conf is already loaded
This commit is contained in:
parent
1669a6d482
commit
7f7d068646
|
@ -62,19 +62,20 @@ sub checkConf {
|
|||
return 0;
|
||||
}
|
||||
$class->configReload($conf);
|
||||
}
|
||||
$class->logger->debug("$class: configuration is up to date");
|
||||
foreach (@_onReload) {
|
||||
my ( $obj, $sub ) = @$_;
|
||||
if ($obj) {
|
||||
$class->logger->debug( 'Launching ' . ref($obj) . "->$sub(conf)" );
|
||||
unless ( $obj->$sub($conf) ) {
|
||||
$class->logger->error( "Underlying object can't load conf ("
|
||||
. ref($obj)
|
||||
. "->$sub)" );
|
||||
foreach (@_onReload) {
|
||||
my ( $obj, $sub ) = @$_;
|
||||
if ($obj) {
|
||||
$class->logger->debug(
|
||||
'Launching ' . ref($obj) . "->$sub(conf)" );
|
||||
unless ( $obj->$sub($conf) ) {
|
||||
$class->logger->error( "Underlying object can't load conf ("
|
||||
. ref($obj)
|
||||
. "->$sub)" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$class->logger->debug("$class: configuration is up to date");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -241,7 +241,10 @@ sub getAttributes {
|
|||
attributes => _buildSoapHash(
|
||||
$session->data,
|
||||
(
|
||||
$session->{_session_kind} eq 'SSO'
|
||||
(
|
||||
$session->{_session_kind}
|
||||
and $session->{_session_kind} eq 'SSO'
|
||||
)
|
||||
? ( @{ $self->exportedAttr } )
|
||||
: ()
|
||||
)
|
||||
|
|
|
@ -31,6 +31,7 @@ SKIP: {
|
|||
ok( getHeader( $res, 'WWW-Authenticate' ) eq 'Negotiate',
|
||||
'Get negotiate header' )
|
||||
or explain( $res->[1], 'WWW-Authenticate => Negotiate' );
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
$client = LLNG::Manager::Test->new(
|
||||
{
|
||||
ini => {
|
||||
|
|
|
@ -27,6 +27,7 @@ expectOK($res);
|
|||
expectCookie($res);
|
||||
count(1);
|
||||
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
$client = LLNG::Manager::Test->new(
|
||||
{
|
||||
ini => {
|
||||
|
|
|
@ -52,6 +52,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -51,6 +51,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -35,6 +35,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -35,6 +35,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -35,6 +35,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -35,6 +35,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -47,6 +47,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -35,6 +35,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -35,6 +35,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -58,6 +58,7 @@ ok( $issuer = issuer(), 'Issuer portal' );
|
|||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
count(1);
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
count(1);
|
||||
|
|
|
@ -58,6 +58,7 @@ ok( $issuer = issuer(), 'Issuer portal' );
|
|||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
count(1);
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
count(1);
|
||||
|
|
|
@ -56,6 +56,7 @@ ok( $issuer = issuer(), 'Issuer portal' );
|
|||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
count(1);
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
count(1);
|
||||
|
|
|
@ -75,6 +75,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
# Build CAS app
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
|
|
|
@ -80,6 +80,7 @@ my $metadata = $res->[2]->[0];
|
|||
count(3);
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
count(1);
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ SKIP: {
|
|||
my $metadata = $res->[2]->[0];
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
|
||||
# Query RP for auth
|
||||
|
|
|
@ -87,6 +87,7 @@ my $metadata = $res->[2]->[0];
|
|||
count(3);
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
count(1);
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ my $metadata = $res->[2]->[0];
|
|||
count(3);
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
count(1);
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ my $metadata = $res->[2]->[0];
|
|||
count(3);
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
count(1);
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ my $metadata = $res->[2]->[0];
|
|||
count(3);
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
count(1);
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -64,6 +64,7 @@ LWP::Protocol::PSGI->register(
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -57,6 +57,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -71,6 +71,7 @@ count(1);
|
|||
expectOK($res);
|
||||
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -65,6 +65,7 @@ LWP::Protocol::PSGI->register(
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -68,6 +68,7 @@ SKIP: {
|
|||
|
||||
# Test SP access
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -55,6 +55,7 @@ SKIP: {
|
|||
ok( $issuer = issuer(), 'Issuer portal' );
|
||||
$handlerOR{issuer} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
|
|
@ -67,6 +67,7 @@ sub try {
|
|||
|
||||
sub iniCmb {
|
||||
my $expr = shift;
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
if (
|
||||
my $res = LLNG::Manager::Test->new(
|
||||
{
|
||||
|
|
|
@ -62,6 +62,7 @@ sub try {
|
|||
|
||||
sub iniCmb {
|
||||
my $expr = shift;
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
if (
|
||||
my $res = LLNG::Manager::Test->new(
|
||||
{
|
||||
|
|
|
@ -91,10 +91,12 @@ SKIP: {
|
|||
my $metadata = $res->[2]->[0];
|
||||
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
$handlerOR{rp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ SKIP: {
|
|||
$handlerOR{idp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
ok( $sp = sp(), 'Proxy portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
|
@ -96,6 +97,7 @@ SKIP: {
|
|||
my $metadata = $res->[2]->[0];
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
$handlerOR{rp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ SKIP: {
|
|||
$handlerOR{idp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
ok( $sp = sp(), 'Proxy portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
|
@ -96,6 +97,7 @@ SKIP: {
|
|||
my $metadata = $res->[2]->[0];
|
||||
|
||||
switch ('rp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $rp = rp( $jwks, $metadata ), 'RP portal' );
|
||||
$handlerOR{rp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
|
|
|
@ -91,10 +91,12 @@ SKIP: {
|
|||
my $metadata = $res->[2]->[0];
|
||||
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
switch ('proxy');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
ok( $proxy = proxy( $jwks, $metadata ), 'Proxy portal' );
|
||||
$handlerOR{proxy} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
|
|
|
@ -91,10 +91,12 @@ SKIP: {
|
|||
my $metadata = $res->[2]->[0];
|
||||
|
||||
switch ('sp');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
ok( $sp = sp(), 'SP portal' );
|
||||
$handlerOR{sp} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
switch ('proxy');
|
||||
&Lemonldap::NG::Handler::Main::cfgNum(0,0);
|
||||
ok( $proxy = proxy( $jwks, $metadata ), 'Proxy portal' );
|
||||
$handlerOR{proxy} = \@Lemonldap::NG::Handler::Main::_onReload;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ ok(
|
|||
count(1);
|
||||
expectReject($res);
|
||||
|
||||
&Lemonldap::NG::Handler::Main::cfgNum( 0, 0 );
|
||||
$client = LLNG::Manager::Test->new(
|
||||
{
|
||||
ini => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user