Zm_Auth

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

Use this class to connect and login to a Zimbra server

Example:

// either authenticate as admin:

$auth = new Zm_Auth($zimbraServer, $zimbraAdminEmail, $zimbraAdminPassword, "admin");

// or authenticate as user:

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

// then login

$l = $auth->login();

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

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

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

    exit();

}
package

ZimbraSoapPhp

Methods

Constructor

__construct(string $server, string $username, string $password, string $authas = "admin", integer $attempts = 3) 

Arguments

$server

string

server name (example: zimbra.yourdomain.com)

$username

string

admin/user account's username

$password

string

admin/user account's password

$authas

string

authenticate as admin or user (default admin)

$attempts

integer

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

getRetryAttempts

getRetryAttempts() : integer

Response

integer

attempts how many times we retry to invoke a soapCall

setRetryAttempts

setRetryAttempts(integer $attempts) 

Arguments

$attempts

integer

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

Properties

$auth

client : \Zm_Auth
var

soap authentication

Type(s)

\Zm_Auth

soapHeader

soapHeader : 

Type(s)

params

params : 

Type(s)

authToken

authToken : 

Type(s)

context

context : 

Type(s)

retryAttempts

retryAttempts : 

Type(s)