[geeklog-cvs] Auth_Enterprise/Client AEXMLRPCClient.class.php,1.1.1.1,1.2
tony at iowaoutdoors.org
tony at iowaoutdoors.org
Thu Jun 17 17:01:49 EDT 2004
Update of /var/cvs/Auth_Enterprise/Client
In directory www:/tmp/cvs-serv25929
Modified Files:
AEXMLRPCClient.class.php
Log Message:
Stubbed out most of the code for the XMLRPC calls. NOTE: server side XMLRPC isn't working yet
Index: AEXMLRPCClient.class.php
===================================================================
RCS file: /var/cvs/Auth_Enterprise/Client/AEXMLRPCClient.class.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AEXMLRPCClient.class.php 15 Jun 2004 15:19:27 -0000 1.1.1.1
--- AEXMLRPCClient.class.php 17 Jun 2004 21:01:46 -0000 1.2
***************
*** 30,35 ****
*
* @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterpriseclient
! *
*/
class AEXMLRPCClient extends AEBaseClientProvider {
--- 30,36 ----
*
* @author Tony Bibbs <tony at geeklog.net>
! * @package net.geeklog.auth_enterprise.client
! * @todo Need to implement SSL soon
! *
*/
class AEXMLRPCClient extends AEBaseClientProvider {
***************
*** 42,65 ****
/**
* Constructor
*
* Get handle to an instance of XML RPC Client. This client provider has the following options:
! * - appId string Auth_Enterprise ID given to an application
! * - debug int 1=on, 0=off
! * - path string path on server to send request to
! * - server string server to send request to
! * - port int port on server to talk over
! * - proxy string proxy server to use
! * - proxyPort int port on proxy to talk over
! * - proxyUser string username to authentication to proxy with
! * - proxyPassword password password to authenticate to proxy with
*
* @author Tony Bibbs <tony at geeklog.net>
* @access public
! * @param string $options Array of options for the XML RPC Client
*
*/
public function __construct($options)
{
// Call constructor of parent
try {
--- 43,79 ----
/**
+ * Array of Auth_Enterprise server provider options
+ * @access private
+ * @var array
+ */
+ private $options = null;
+
+ /**
* Constructor
*
* Get handle to an instance of XML RPC Client. This client provider has the following options:
! * - appId string Auth_Enterprise ID given to an application, REQUIRED
! * - debug int 1=on, 0=off, OPTIONAL
! * - path string path on server to send request to, REQUIRED
! * - server string server to send request to, REQUIRED
! * - port int port on server to talk over, REQUIRED
! * - proxy string proxy server to use, OPTIONAL
! * - proxyPort int port on proxy to talk over, OPTIONAL
! * - proxyUser string username to authentication to proxy with, OPTIONAL
! * - proxyPassword password password to authenticate to proxy with, OPTIONAL
*
* @author Tony Bibbs <tony at geeklog.net>
* @access public
! * @param string $options Array of options for the XML RPC Client
*
*/
public function __construct($options)
{
+ if (empty($options['appId']) OR empty($options['path']) OR empty($options['server']) OR
+ empty($options['port'])) {
+ throw new AEInsufficientClientOptions('Options given to the XMLRPCClient are not
+ sufficient');
+ }
+
// Call constructor of parent
try {
***************
*** 139,142 ****
--- 153,164 ----
public function changePassword($userName, $newPassword)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('changePassword','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($userName, 'string')
+ , new XML_RPC_Value($newPassword, 'string')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
***************
*** 151,154 ****
--- 173,186 ----
public function changePasswordByAdmin($adminUserName, $adminPassword, $userName, $newPassword)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('changePasswordByAdmin','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($adminUserName, 'string')
+ , new XML_RPC_Value($adminPassword, 'string')
+ , new XML_RPC_Value($userName, 'string')
+ , new XML_RPC_Value($newPassword, 'string')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
***************
*** 160,165 ****
*
*/
! public function resetPassword()
{
}
--- 192,204 ----
*
*/
! public function resetPassword($userName)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('resetPassword','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($userName, 'string')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
***************
*** 173,176 ****
--- 212,224 ----
public function getUserPrivilegesByAdmin($adminUserName, $adminPassword, $userName)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('getUserPrivilegesByAdmin','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($adminUserName, 'string')
+ , new XML_RPC_Value($adminPassword, 'string')
+ , new XML_RPC_Value($userName, 'string')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
***************
*** 184,187 ****
--- 232,245 ----
public function setUserPrivilegesByAdmin($adminUserName, $adminPassword, $userName, $privArray)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('setUserPrivilegesByAdmin','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($adminUserName, 'string')
+ , new XML_RPC_Value($adminPassword, 'string')
+ , new XML_RPC_Value($userName, 'string')
+ , new XML_RPC_Value($privArray, 'array')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
***************
*** 195,198 ****
--- 253,264 ----
public function listAppPrivilegesByAdmin($adminUserName, $adminPassword)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('listAppPrivilegesByAdmin','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($adminUserName, 'string')
+ , new XML_RPC_Value($adminPassword, 'string')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
***************
*** 206,209 ****
--- 272,284 ----
public function getUserGroupsByAdmin($adminUserName, $adminPassword, $userName)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('getUserGroupsByAdmin','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($adminUserName, 'string')
+ , new XML_RPC_Value($adminPassword, 'string')
+ , new XML_RPC_Value($userName, 'string')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
***************
*** 217,220 ****
--- 292,305 ----
public function setUserGroupsByAdmin($adminUserName, $adminPassword, $userName, $groupArray)
{
+ $xmlRequest = new XML_RPC_Message('Auth_Enterprise.processRequest'
+ , array(new XML_RPC_Value('setUserGroupsByAdmin','string')
+ , new XML_RPC_Value($this->getAppId(), 'string')
+ , new XML_RPC_Value($adminUserName, 'string')
+ , new XML_RPC_Value($adminPassword, 'string')
+ , new XML_RPC_Value($userName, 'string')
+ , new XML_RPC_Value($groupArray, 'array')));
+ $response = $this->_XMLRPCClient->send($xmlRequest);
+ $retval = $response->value();
+ $retval = XML_RPC_decode($retval);
}
More information about the geeklog-cvs
mailing list