|
|
|
@ -76,7 +76,9 @@ sub _run { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub status { |
|
|
|
|
my $self = shift; |
|
|
|
|
my ( $class, $args ) = @_; |
|
|
|
|
$args //= {}; |
|
|
|
|
my $self = $class->new($args); |
|
|
|
|
|
|
|
|
|
# Check if main handler initialization has been done |
|
|
|
|
unless ( %$self->api->tsv ) { |
|
|
|
@ -90,6 +92,23 @@ sub status { |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub reload { |
|
|
|
|
my ( $class, $args ) = @_; |
|
|
|
|
$args //= {}; |
|
|
|
|
my $self = $class->new($args); |
|
|
|
|
|
|
|
|
|
# Check if main handler initialization has been done |
|
|
|
|
unless ( %$self->api->tsv ) { |
|
|
|
|
eval { $self->api->checkConf() }; |
|
|
|
|
$self->lmLog( $@, 'error' ) if ($@); |
|
|
|
|
} |
|
|
|
|
return sub { |
|
|
|
|
my $req = Lemonldap::NG::Common::PSGI::Request->new( $_[0] ); |
|
|
|
|
$self->api->reload($req); |
|
|
|
|
return [ 200, [ @{ $req->{respHeaders} } ], [ $req->{respBody} ] ]; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
## @method private PSGI-Response _authAndTrace($req) |
|
|
|
|
# Launch $self->api::run() and then handler() if |
|
|
|
|
# response is 200. |
|
|
|
|