RECT HTTPS
PerlSetVar PORT_REDIRECT SERVER_PORT
PerlSetVar RULES_URL http://app.tld/rules.json
...
</VirtualHost>
=head1 DESCRIPTION
Lemonldap::NG::SSOaaS::Apache::Client is an alterna
}
else {
$class->logger->error(
'Malformed message: ' . JSON::to_json($msg) );
}
}
$class->lastCheckMsg(time);
return $ret;
}
# Method to pus
lass->tsv->{portal}->($req);
if ( !$class->tsv->{useRedirectAjaxOnUnauthorized} and $req->wantJSON ) {
$class->set_header_out( $req, 'WWW-Authenticate' => "SSO $portal" );
return $
use Lemonldap::NG::Common::UserAgent;
use Lemonldap::NG::Common::Util qw(isHiddenAttr);
use JSON qw(from_json);
our $VERSION = '2.19.0';
our $_ua;
sub ua {
my ($class) = @_;
return $_ua if $
kMaintenanceMode($req);
}
sub _loadVhostConfig {
my ( $class, $req, $vhost ) = @_;
my ( $json, $rUrl, $rVhost );
if ( $class->tsv->{useSafeJail} ) {
if ( $req->env->{RULES_URL} ||
}
|| "http://127.0.0.1:" . $req->{env}->{SERVER_PORT} )
. '/rules.json';
$rVhost = $vhost;
}
$class->logger->debug("Try to retrieve rules f
package Lemonldap::NG::Handler::Lib::Status;
use strict;
use POSIX qw(setuid setgid);
use JSON qw(to_json);
use IO::Select;
use IO::Socket::INET;
use Lemonldap::NG::Handler::Lib::StatusConstants q
%$args = split( /[=&]/, $tmp ) if ($tmp);
&head($out) unless ( $args->{json} );
my ( $c, $m, $u );
foreach my $user ( keys %{ $status->{user
99 );
}
# JSON values
if ( $args->{json} ) {
$out->print(
to_json( { average => $m, total => $c } ) . "\nEN
=> 'application/x-www-form-urlencoded' );
$get->header( Accept => 'application/json' );
$get->content(
build_urlencoded(
user => $user,
passw
$self->{data} ||= {};
}
sub wantJSON {
return 1
if ( defined $_[0]->env->{HTTP_ACCEPT}
and $_[0]->env->{HTTP_ACCEPT} =~ m#(?:application|text)/json#i );
return 0;
}
sub reques