|
Credio Client for PHP
|
provides Client API for working with Credio server. More...
Public Member Functions | |
| setCallback ($errorCode, $handler) | |
| set callback $handler More... | |
| removeCallback ($errorCode, $handler) | |
| remove callback $handler More... | |
| haveToken () | |
| getPermissions ($path, $token=null) | |
| get permissions by path More... | |
| getAttributes ($path, $token=null) | |
| get attributes by $path More... | |
| attrInsert ($target, $targetType, Attribute &$attribute, $token=NULL) | |
| create new Attribute. More... | |
| attrEdit ($target, $targetType, $attribute, $token=NULL) | |
| change Attribute. More... | |
| attrRemove ($target, $targetType, $attribute, $token=NULL) | |
| remove Attribute More... | |
| authenticate ($username, $password) | |
| used to verify user credentials. More... | |
| getToken ($username, $password) | |
| used to obtain Token from Credio server. More... | |
| releaseToken ($token=NULL) | |
| used to release Token from Credio server. More... | |
| isValidToken ($token=NULL) | |
| check whether Token is valid or not on Credio server. More... | |
| userSearch ($pattern, $token=NULL, $opt=NULL) | |
| searching for Users matching pattern. More... | |
| userInsert ($username, $password, $token=NULL) | |
| create new User. More... | |
| userEdit (User $user, $token=NULL) | |
| change User. More... | |
| userRemove (User $user, $token=NULL) | |
| remove User. More... | |
| groupSearch ($pattern, $token=NULL, $opt=NULL) | |
| searching for Groups matching pattern. More... | |
| groupInsert ($group, $token=NULL) | |
| create new Group. More... | |
| groupEdit (Group $group, $token=NULL) | |
| change Group. More... | |
| groupRemove (Group $group, $token=NULL) | |
| remove Group. More... | |
Static Public Member Functions | |
| static | getInstance ($domain=Client::defaultDomain) |
| create new Client instance. More... | |
| static | getCookieInstance ($domain, &$cookies=NULL) |
| create new Client instance with HTTP Cookie support. More... | |
| static | getCookieSsoPortalInstance ($domain, &$cookies=NULL) |
| create new Client instance with HTTP Cookie support. More... | |
Public Attributes | |
| $IsCacheEnabled = true | |
| $IsExceptionEnabled = true | |
| if true Client will throw exceptions More... | |
| $CredioServerURL = "https://10.60.0.44" | |
| $domain | |
| domain More... | |
| $token = NULL | |
| token within Client class. More... | |
| const | defaultDomain = "CREDIO" |
Private Member Functions | |
| __construct ($domain) | |
| createDom () | |
| create DOM document with root tag element for Credio API More... | |
| createApiElement ($dom, $api, $token) | |
| create DOM element for API. More... | |
| validateToken ($token) | |
| validate $token More... | |
| _send_xml_req ($xml) | |
| netGetResponse (&$domOut) | |
| navigateToSsoPortal ($loginPortalUri=null) | |
| navigate browser to Sso portal. More... | |
Private Attributes | |
| $cachePerm = array() | |
| $cacheAttr = array() | |
| $isCookieInstance = false | |
| determine whether this instance is created with cookie support. More... | |
| $cookies = NULL | |
| used to store PHP _COOKIE variable More... | |
| $cookieName = "CREDIO_TOKEN" | |
| name for cookie stored in client browser More... | |
| $errorCallbacks = array() | |
| callback handlers More... | |
provides Client API for working with Credio server.
|
private |
|
private |
| Credio\Client::attrEdit | ( | $target, | |
| $targetType, | |||
| $attribute, | |||
$token = NULL |
|||
| ) |
change Attribute.
check Credio API attrEdit for full specification
| $target | ||
| $targetType | ||
| $attribute | ||
| null | $token |
| Exception |
| Credio\Client::attrInsert | ( | $target, | |
| $targetType, | |||
| Attribute & | $attribute, | ||
$token = NULL |
|||
| ) |
create new Attribute.
check Credio API attrInsert for full specification
| $target | ||
| $targetType | ||
| Attribute | $attribute | |
| null | $token |
| Exception |
| Credio\Client::attrRemove | ( | $target, | |
| $targetType, | |||
| $attribute, | |||
$token = NULL |
|||
| ) |
remove Attribute
check Credio API attrRemove for full specification
| $target | ||
| $targetType | ||
| $attribute | ||
| null | $token |
| Exception |
| Credio\Client::authenticate | ( | $username, | |
| $password | |||
| ) |
used to verify user credentials.
check Credio API authenticate for full specification
| $username | |
| $password |
| Exception |
|
private |
create DOM element for API.
| $dom | |
| $api | |
| $token |
|
private |
create DOM document with root tag element for Credio API
| Credio\Client::getAttributes | ( | $path, | |
$token = null |
|||
| ) |
get attributes by $path
check Credio API getAttributes for full specification
| $path | ||
| null | $token |
| Exception |
|
static |
create new Client instance with HTTP Cookie support.
Cookie support will automatically set cookie on client browser on Client::getToken method, and will remove cookie on Client::releaseToken method.
| string | $domain | |
| PHP_COOKIE | $cookies |
| Exception |
|
static |
create new Client instance with HTTP Cookie support.
same as Client::getCookieInstance, but will automatically redirect to SSO portal, if session is not yet authenticated.
| $domain | |
| $cookies | PHP _COOKIE variable |
| Exception |
|
static |
| Credio\Client::getPermissions | ( | $path, | |
$token = null |
|||
| ) |
get permissions by path
check Credio API getPermissions for full specification
| $path | ||
| null | $token |
| Exception |
| Credio\Client::getToken | ( | $username, | |
| $password | |||
| ) |
used to obtain Token from Credio server.
check Credio API getToken for full specification
| $username | - username |
| $password | - password |
| Exception |
| Credio\Client::groupEdit | ( | Group | $group, |
$token = NULL |
|||
| ) |
change Group.
check Credio API groupEdit for full specification
| Group | $group | |
| null | $token |
| Exception |
| Credio\Client::groupInsert | ( | $group, | |
$token = NULL |
|||
| ) |
create new Group.
check Credio API groupInsert for full specification
| string | Group | $group | |
| null | $token |
| Exception |
| Credio\Client::groupRemove | ( | Group | $group, |
$token = NULL |
|||
| ) |
remove Group.
check Credio API groupRemove for full specification
| Group | $group | |
| null | $token |
| Exception |
| Credio\Client::groupSearch | ( | $pattern, | |
$token = NULL, |
|||
$opt = NULL |
|||
| ) |
searching for Groups matching pattern.
check Credio API groupSearch for full specification
| $pattern | - regex pattern |
| $token | |
| $opt | - options for search |
| Exception |
| Credio\Client::haveToken | ( | ) |
| Credio\Client::isValidToken | ( | $token = NULL | ) |
check whether Token is valid or not on Credio server.
using isValidToken API will couse Credio server to reset Token expire timer. check Credio API isValidToken for full specification
| [in] | $token | - if not present Client::$token is used. |
| Exception |
|
private |
navigate browser to Sso portal.
Sso portal URL address is obtained from Credio domain
| null | $loginPortalUri |
| Exception |
|
private |
| Credio\Client::releaseToken | ( | $token = NULL | ) |
used to release Token from Credio server.
check Credio API releaseToken for full specification
| $token | - token to release. if not set Client::$token is used. |
| Exception |
| Credio\Client::removeCallback | ( | $errorCode, | |
| $handler | |||
| ) |
remove callback $handler
| $errorCode | |
| $handler |
| Credio\Client::setCallback | ( | $errorCode, | |
| $handler | |||
| ) |
set callback $handler
| $errorCode | |
| $handler |
| Credio\Client::userEdit | ( | User | $user, |
$token = NULL |
|||
| ) |
change User.
check Credio API userEdit for full specification
| User | $user | |
| null | $token |
| Exception |
| Credio\Client::userInsert | ( | $username, | |
| $password, | |||
$token = NULL |
|||
| ) |
create new User.
check Credio API userInsert for full specification
| $username | ||
| $password | ||
| null | $token |
| Exception |
| Credio\Client::userRemove | ( | User | $user, |
$token = NULL |
|||
| ) |
remove User.
check Credio API userRemove for full specification
| User | $user | |
| null | $token |
| Exception |
| Credio\Client::userSearch | ( | $pattern, | |
$token = NULL, |
|||
$opt = NULL |
|||
| ) |
searching for Users matching pattern.
check Credio API userSearch for full specification
| $pattern | - regex pattern |
| $token | |
| $opt | - options for search |
| Exception |
|
private |
validate $token
if $token is not set, function replaces $token with $this->token
| $token |
| Exception |
|
private |
|
private |
|
private |
name for cookie stored in client browser
|
private |
used to store PHP _COOKIE variable
| Credio\Client::$CredioServerURL = "https://10.60.0.44" |
| Credio\Client::$domain |
domain
|
private |
callback handlers
| Credio\Client::$IsCacheEnabled = true |
|
private |
determine whether this instance is created with cookie support.
| Credio\Client::$IsExceptionEnabled = true |
if true Client will throw exceptions
| Credio\Client::$token = NULL |
token within Client class.
| const Credio\Client::defaultDomain = "CREDIO" |
1.8.11