moved WebAuthenticationClient in cvs, too
This commit is contained in:
parent
b1a40ac950
commit
02736c51aa
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
<!ELEMENT location EMPTY >
|
<!ELEMENT location EMPTY >
|
||||||
<!ATTLIST location server CDATA #REQUIRED >
|
<!ATTLIST location server CDATA #REQUIRED >
|
||||||
<!ATTLIST location port NMTOKEN #REQUIRED >
|
<!ATTLIST location port NMTOKEN "80" >
|
||||||
<!ATTLIST location path CDATA #REQUIRED >
|
<!ATTLIST location path CDATA #REQUIRED >
|
||||||
]>
|
]>
|
||||||
<webAuthentication>
|
<webAuthentication>
|
||||||
<location server="localhost" port="80"
|
<location server="localhost"
|
||||||
path="/livesupportStorageServer/xmlrpc/xrLocStor.php" />
|
path="/livesupportStorageServer/xmlrpc/xrLocStor.php" />
|
||||||
</webAuthentication>
|
</webAuthentication>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClient.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClient.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -39,7 +39,6 @@
|
||||||
#error "Need unistd.h"
|
#error "Need unistd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for testing only, REMOVE THIS later
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <XmlRpcClient.h>
|
#include <XmlRpcClient.h>
|
||||||
|
@ -152,7 +151,7 @@ TestAuthenticationClient :: configure(const xmlpp::Element & element)
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Login to the storage server.
|
* Login to the authentication server.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
Ptr<SessionId>::Ref
|
Ptr<SessionId>::Ref
|
||||||
TestAuthenticationClient :: login(const std::string & login,
|
TestAuthenticationClient :: login(const std::string & login,
|
||||||
|
@ -175,7 +174,7 @@ TestAuthenticationClient :: login(const std::string & login,
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Logout from the storage server.
|
* Logout from the authentication server.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
const bool
|
const bool
|
||||||
TestAuthenticationClient :: logout(Ptr<SessionId>::Ref sessionId)
|
TestAuthenticationClient :: logout(Ptr<SessionId>::Ref sessionId)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.3 $
|
Version : $Revision: 1.4 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClient.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClient.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -92,7 +92,7 @@ using namespace LiveSupport::Core;
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.3 $
|
* @version $Revision: 1.4 $
|
||||||
*/
|
*/
|
||||||
class TestAuthenticationClient :
|
class TestAuthenticationClient :
|
||||||
virtual public Configurable,
|
virtual public Configurable,
|
||||||
|
@ -168,7 +168,7 @@ class TestAuthenticationClient :
|
||||||
std::logic_error);
|
std::logic_error);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Login to the storage server, using the data read from the
|
* Login to the authentication server, using the data read from the
|
||||||
* configuration file.
|
* configuration file.
|
||||||
* Returns a new session ID; in case of an error, returns a
|
* Returns a new session ID; in case of an error, returns a
|
||||||
* null pointer.
|
* null pointer.
|
||||||
|
@ -180,7 +180,7 @@ class TestAuthenticationClient :
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logout from the storage server.
|
* Logout from the authentication server.
|
||||||
*
|
*
|
||||||
* @param sessionId the ID of the session to end
|
* @param sessionId the ID of the session to end
|
||||||
* @return true if logged out successfully, false if not
|
* @return true if logged out successfully, false if not
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.1 $
|
Version : $Revision: 1.2 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClientTest.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClientTest.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -60,7 +60,7 @@ using namespace LiveSupport::Authentication;
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestAuthenticationClientTest);
|
CPPUNIT_TEST_SUITE_REGISTRATION(TestAuthenticationClientTest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the configuration file for the authentication client factory daemon.
|
* The name of the configuration file for the authentication client factory.
|
||||||
*/
|
*/
|
||||||
static const std::string configFileName = "etc/testAuthentication.xml";
|
static const std::string configFileName = "etc/testAuthentication.xml";
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClient.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClient.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -39,7 +39,6 @@
|
||||||
#error "Need unistd.h"
|
#error "Need unistd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for testing only, REMOVE THIS later
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <XmlRpcClient.h>
|
#include <XmlRpcClient.h>
|
||||||
|
@ -87,7 +86,7 @@ static const std::string locationPortAttrName = "port";
|
||||||
static const std::string locationPathAttrName = "path";
|
static const std::string locationPathAttrName = "path";
|
||||||
|
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storage server constants: login */
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ authentication server constants: login */
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the login method on the storage server
|
* The name of the login method on the storage server
|
||||||
|
@ -105,7 +104,7 @@ static const std::string loginParamName = "login";
|
||||||
static const std::string passwordParamName = "pass";
|
static const std::string passwordParamName = "pass";
|
||||||
|
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storage server constants: logout */
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ authentication server constants: logout */
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* The name of the logout method on the storage server
|
* The name of the logout method on the storage server
|
||||||
|
@ -163,6 +162,7 @@ WebAuthenticationClient :: configure(const xmlpp::Element & element)
|
||||||
|
|
||||||
if (!(attribute = locationConfigElement
|
if (!(attribute = locationConfigElement
|
||||||
->get_attribute(locationPortAttrName))) {
|
->get_attribute(locationPortAttrName))) {
|
||||||
|
cerr << "\nmissing port #\n";
|
||||||
std::string eMsg = "Missing attribute ";
|
std::string eMsg = "Missing attribute ";
|
||||||
eMsg += locationPortAttrName;
|
eMsg += locationPortAttrName;
|
||||||
throw std::invalid_argument(eMsg);
|
throw std::invalid_argument(eMsg);
|
||||||
|
@ -189,7 +189,7 @@ WebAuthenticationClient :: configure(const xmlpp::Element & element)
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Login to the storage server.
|
* Login to the authentication server.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
Ptr<SessionId>::Ref
|
Ptr<SessionId>::Ref
|
||||||
WebAuthenticationClient :: login(const std::string & login,
|
WebAuthenticationClient :: login(const std::string & login,
|
||||||
|
@ -220,7 +220,7 @@ WebAuthenticationClient :: login(const std::string & login,
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Logout from the storage server.
|
* Logout from the authentication server.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
const bool
|
const bool
|
||||||
WebAuthenticationClient :: logout(Ptr<SessionId>::Ref sessionId)
|
WebAuthenticationClient :: logout(Ptr<SessionId>::Ref sessionId)
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.5 $
|
Version : $Revision: 1.1 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/include/LiveSupport/Authentication/Attic/WebAuthenticationClient.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClient.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
#ifndef WebAuthenticationClient_h
|
#ifndef WebAuthenticationClient_h
|
||||||
|
@ -63,7 +63,8 @@ using namespace LiveSupport::Core;
|
||||||
/* =============================================================== data types */
|
/* =============================================================== data types */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface to the authentication methods on the php storage server.
|
* An interface to the authentication methods on the php authentication
|
||||||
|
* server (which is currently the same as the storage server).
|
||||||
*
|
*
|
||||||
* This object has to be configured with an XML configuration element
|
* This object has to be configured with an XML configuration element
|
||||||
* called webAuthentication. This element contains a child element
|
* called webAuthentication. This element contains a child element
|
||||||
|
@ -92,7 +93,7 @@ using namespace LiveSupport::Core;
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.5 $
|
* @version $Revision: 1.1 $
|
||||||
*/
|
*/
|
||||||
class WebAuthenticationClient :
|
class WebAuthenticationClient :
|
||||||
virtual public Configurable,
|
virtual public Configurable,
|
||||||
|
@ -106,17 +107,19 @@ class WebAuthenticationClient :
|
||||||
static const std::string configElementNameStr;
|
static const std::string configElementNameStr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the storage server, e.g. "myserver.mycompany.com".
|
* The name of the authentication server, e.g.
|
||||||
|
* "myserver.mycompany.com".
|
||||||
*/
|
*/
|
||||||
std::string storageServerName;
|
std::string storageServerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The port wher the storage server is listening (default is 80).
|
* The port wher the authentication server is listening
|
||||||
|
* (default is 80).
|
||||||
*/
|
*/
|
||||||
int storageServerPort;
|
int storageServerPort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The path to the storage server php page.
|
* The path to the authentication server php page.
|
||||||
*/
|
*/
|
||||||
std::string storageServerPath;
|
std::string storageServerPath;
|
||||||
|
|
||||||
|
@ -157,7 +160,7 @@ class WebAuthenticationClient :
|
||||||
std::logic_error);
|
std::logic_error);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Login to the storage server, using the data read from the
|
* Login to the authentication server, using the data read from the
|
||||||
* configuration file.
|
* configuration file.
|
||||||
* Returns a new session ID; in case of an error, returns a
|
* Returns a new session ID; in case of an error, returns a
|
||||||
* null pointer.
|
* null pointer.
|
||||||
|
@ -169,7 +172,7 @@ class WebAuthenticationClient :
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logout from the storage server.
|
* Logout from the authentication server.
|
||||||
*
|
*
|
||||||
* @param sessionId the ID of the session to end
|
* @param sessionId the ID of the session to end
|
||||||
* @return true if logged out successfully, false if not
|
* @return true if logged out successfully, false if not
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.3 $
|
Version : $Revision: 1.4 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClientTest.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClientTest.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -60,7 +60,7 @@ using namespace LiveSupport::Authentication;
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(WebAuthenticationClientTest);
|
CPPUNIT_TEST_SUITE_REGISTRATION(WebAuthenticationClientTest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the configuration file for the authentication client factory daemon.
|
* The name of the configuration file for the authentication client factory.
|
||||||
*/
|
*/
|
||||||
static const std::string configFileName = "etc/webAuthentication.xml";
|
static const std::string configFileName = "etc/webAuthentication.xml";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue