The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::FreeIPA is a perl FreeIPA JSON API client class

SYNOPSIS

'ipa user-find' equivalent using API call and basic result postprocessing. The connection in this example will (try to) use kerberos authentication. See Net::FreeIPA::RPC::new_client for authentication details.

    my $fi = Net::FreeIPA->new("host.example.com");

    die("Failed to initialise the rest client") if ! $fi->{rc};

    if($fi->api_user_find("")) {
        print "Found ", scalar @{$fi->{result}}, " users\n";
    } else {
        print "Something went wrong\n";
    }

Private methods

_initialize

Handle the actual initializtion of new. Return 1 on success, undef otherwise.

log

An instance that can be used for logging (with error/warn/info/debug methods) (e.g. LOG::Log4perl).

debugapi

When true, log the JSON POST and JSON reply data with debug.

All other arguments and options are passed to Net::FreeIPA::RPC::new_client during initialisation. (Check the presence of an rc attribute for succesfull initialisation of the underlying rest client. An error is logged in case of failure.)