e_base32 decode_base32);
use AnyEvent::Util qw(fork_call);
use Net::OpenVPN::Manager::Plugin;
use JSON;
with 'Net::OpenVPN::Manager::Startable';
with 'Net::OpenVPN::Manager::2Authenticable';
with 'Ne
d";
$responder->([ 200, [ 'Content-type', 'application/json' ], [ to_json({"uri" => $res}) ] ]);
});
} e
d";
$responder->([ 200, [ 'Content-type', 'application/json' ], [ to_json({"uri" => $res}) ] ]);
});
} e
);
use MooseX::Types::Structured qw(Dict Optional);
use Net::OpenVPN::Manager::Plugin;
use JSON qw(encode_json);
use Scalar::Util qw(reftype);
with 'Net::OpenVPN::Manager::Startable';
with 'Net::Open
'GET + /profiles' => sub {
[200, ['Content-type' => 'application/json'], [encode_json({ profiles => [$self->profile_names]})]]
},
'GET + /profile/*' =>
ist"]]
} else {
[200, ['Content-type' => 'application/json'], [encode_json({ name => $name, content => _profile_entries($self->get_profile($name)) })]]
ef HashRef);
use MooseX::Types::Structured qw(Dict Optional);
use Digest::MD5 qw(md5_base64);
use JSON;
with 'Net::OpenVPN::Manager::Startable';
with 'Net::OpenVPN::Manager::Addressable';
with 'Net::
|| $hidden } $self->profile_names;
[200, ['Content-type' => 'application/json'], [encode_json({ profiles => [@profiles]})]]
},
'GET + /profile/*' => sub {
' => 'application/json'], [encode_json({ error => "profile does not exist" })]]
} else {
[200, ['Content-type' => 'application/json'], [encode_json({ name => $name,
lean;
use Moose;
use Net::OpenVPN::Manager::Plugin;
use Crypt::JWT qw(encode_jwt decode_jwt);
use JSON;
use Template;
with 'Net::OpenVPN::Manager::Startable';
has 'jwtkey' => (
is => 'ro',
i
er $username to retrieve config file");
[200, ['Content-type', 'application/json'], [to_json({token => $token})]];
},
'GET + /config/*' => sub {
ntent-type', 'application/json'], [to_json({error => "Unable to process template"})]];
}
[200, ['Content-type', 'application/json'], [to_json({config => $out})]];