PHP code example of auth3-dev / auth3-sdk

1. Go to this page and download the library: Download auth3-dev/auth3-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

auth3-dev / auth3-sdk example snippets


"  "auth3-dev/auth3-sdk": "^1.0.0"
}



nt = new Auth3\Identity\Admin\AdminClient('<admin-endpoint-as-found-in-your-Console>', [
    'credentials' => Grpc\ChannelCredentials::secure(),
]);

$request = new Auth3\Identity\Admin\GetConnectionsRequest();
// This is how you can use setters to provide parameters to the request:
// $request->setAttribute($request);
// in this case it's not needed.

list($response, $status) = $client->getConnections($request)->wait();
if ($status->code !== Grpc\STATUS_OK) {
    echo "ERROR: " . $status->code . ", " . $status->details . PHP_EOL;
    exit(1);
}

// do something with the response:
// $response.getConnections()
bash
$ cat examples/admin/main.php # customise client connection info
$ composer install
$ php -d extension=grpc.so main.php