gnumoksha / php-freeipa

FreeIPA SDK for PHP
GNU Lesser General Public License v3.0
19 stars 19 forks source link

How to install/run the latest version of php-freeipa #26

Closed jpanda001 closed 4 years ago

jpanda001 commented 4 years ago

Hi, since there is no bootstrap.php and autoload.php in the latest version of this application, can u give me an example of how I can install and run this package. Thanks in advance

gnumoksha commented 4 years ago

Hi

The v1 is not finished yet. You should use v0.

But if you want to try the v1, do the following:

require_once DIR . '/vendor/autoload.php';

use Gnumoksha\FreeIpa\FreeIpa; use Gnumoksha\FreeIpa\Options; use Gnumoksha\FreeIpa\Infra\Rpc\Request\CommonBody;

// https://ipa.demo1.freeipa.org/ipa/config/ca.crt $freeIpa = new FreeIpa( new Options( 'ipa.demo1.freeipa.org', DIR . '/ca.crt' ) );

$freeIpa->login('admin', 'Secret123');

$response = $freeIpa->sendRequest(new CommonBody('ping'));

var_dump($response);