Documentation

Zm_Auth

Zm_Auth is a class which allows to connect to the Kerio admin or user space via SOAP

Use this class to connect and login to a Kerio server

Example:

// either authenticate as admin:

$auth = new Zm_Auth($kerioServer, $kerioAdminEmail, $kerioAdminPassword, "admin");

// or authenticate as user:

$auth = new Zm_Auth($kerioServer, $userEmail, $userPassword, "user");

// then login

$l = $auth->login();

if(is_a($l, "Exception")) {

	echo "Error : cannot login to $kerioServer\n";

	echo $l->getMessage()."\n";

	exit();

}

Table of Contents

$authToken  : mixed
$client  : Zm_Auth
$auth
$context  : mixed
$params  : mixed
$retryAttempts  : mixed
$soapHeader  : mixed
__construct()  : mixed
Constructor
getRetryAttempts()  : int
getRetryAttempts
login()  : mixed
login
setRetryAttempts()  : mixed
setRetryAttempts

Properties

$authToken

private mixed $authToken

$context

private mixed $context

$params

private mixed $params

$retryAttempts

private mixed $retryAttempts

$soapHeader

private mixed $soapHeader

Methods

__construct()

Constructor

public __construct(string $server, string $username, string $password[, string $authas = "admin" ][, int $attempts = 3 ]) : mixed
Parameters
$server : string

server name (example: kerio.yourdomain.com)

$username : string

admin/user account's username

$password : string

admin/user account's password

$authas : string = "admin"

authenticate as admin or user (default admin)

$attempts : int = 3

how many times we retry to invoke a soapCall (default 3)

Return values
mixed

getRetryAttempts()

getRetryAttempts

public getRetryAttempts() : int
Return values
int

attempts how many times we retry to invoke a soapCall

login()

login

public login() : mixed

Use this method to login to a Kerio server after you create an instance of this class

Login parameters must be specified when calling the constructor

Return values
mixed

setRetryAttempts()

setRetryAttempts

public setRetryAttempts(int $attempts) : mixed
Parameters
$attempts : int

how many times we retry to invoke a soapCall the wait time between attempts is progressively increased using an exponential backoff algorithm

Return values
mixed

Search results