modified authentication module and gLiveSupport to use the

personalized development environment if available
This commit is contained in:
maroy 2005-04-13 15:52:20 +00:00
parent 4f6ce9b50e
commit 827d6ed31d
11 changed files with 256 additions and 38 deletions

View file

@ -22,7 +22,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.2 $
# Version : $Revision: 1.3 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/bin/user_setup.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
@ -271,6 +271,10 @@ cat $modules_dir/archiveServer/var/conf_only.php.template \
| sed -e "$replace_sed_string" \
> $configdir/archiveServer.conf.php
cat $modules_dir/authentication/etc/webAuthentication.xml.template \
| sed -e "$replace_sed_string" \
> $configdir/webAuthentication.xml
cat $modules_dir/db/etc/connectionManagerFactory.xml.template \
| sed -e "$replace_sed_string" \
> $configdir/connectionManagerFactory.xml
@ -299,6 +303,10 @@ cat $products_dir/scheduler/etc/scheduler.xml.template \
| sed -e "$replace_sed_string" \
> $configdir/scheduler.xml
cat $products_dir/gLiveSupport/etc/gLiveSupport.xml.template \
| sed -e "$replace_sed_string" \
> $configdir/gLiveSupport.xml
#-------------------------------------------------------------------------------
# Create the public html directory, and links to the PHP directories

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE webAuthentication [
<!ELEMENT webAuthentication (location) >
<!ELEMENT location EMPTY >
<!ATTLIST location server CDATA #REQUIRED >
<!ATTLIST location port NMTOKEN #REQUIRED >
<!ATTLIST location path CDATA #REQUIRED >
]>
<webAuthentication>
<location server="ls_php_host" port="ls_php_port"
path="/ls_php_urlPrefix/storageServer/var/ls_alib_xmlRpcPrefix"/>
</webAuthentication>

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.5 $
Author : $Author: maroy $
Version : $Revision: 1.6 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.cxx,v $
------------------------------------------------------------------------------*/
@ -62,7 +62,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(AuthenticationClientFactoryTest);
/**
* The name of the configuration file for the authentication client factory.
*/
static const std::string configFileName = "etc/authenticationClient.xml";
static const std::string configFileName = "authenticationClient.xml";
/* =============================================== local function prototypes */
@ -79,9 +79,9 @@ AuthenticationClientFactoryTest :: setUp(void) throw ()
Ptr<AuthenticationClientFactory>::Ref
acf = AuthenticationClientFactory::getInstance();
try {
Ptr<xmlpp::DomParser>::Ref parser(
new xmlpp::DomParser(configFileName, true));
const xmlpp::Document * document = parser->get_document();
xmlpp::DomParser parser;
const xmlpp::Document * document = getConfigDocument(parser,
configFileName);
const xmlpp::Element * root = document->get_root_node();
acf->configure(*root);

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.2 $
Author : $Author: maroy $
Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/AuthenticationClientFactoryTest.h,v $
------------------------------------------------------------------------------*/
@ -42,6 +42,8 @@
#include <cppunit/extensions/HelperMacros.h>
#include "LiveSupport/Core/BaseTestMethod.h"
#include "LiveSupport/Authentication/AuthenticationClientFactory.h"
namespace LiveSupport {
@ -60,11 +62,11 @@ using namespace LiveSupport::Core;
/**
* Unit test for the AuthenticationClientFactory class.
*
* @author $Author: fgerlits $
* @version $Revision: 1.2 $
* @author $Author: maroy $
* @version $Revision: 1.3 $
* @see AuthenticationClientFactory
*/
class AuthenticationClientFactoryTest : public CPPUNIT_NS::TestFixture
class AuthenticationClientFactoryTest : public BaseTestMethod
{
CPPUNIT_TEST_SUITE(AuthenticationClientFactoryTest);
CPPUNIT_TEST(firstTest);

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.6 $
Author : $Author: maroy $
Version : $Revision: 1.7 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClientTest.cxx,v $
------------------------------------------------------------------------------*/
@ -62,7 +62,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(TestAuthenticationClientTest);
/**
* The name of the configuration file for the authentication client factory.
*/
static const std::string configFileName = "etc/testAuthentication.xml";
static const std::string configFileName = "testAuthentication.xml";
/* =============================================== local function prototypes */
@ -77,9 +77,9 @@ void
TestAuthenticationClientTest :: setUp(void) throw ()
{
try {
Ptr<xmlpp::DomParser>::Ref parser(
new xmlpp::DomParser(configFileName, true));
const xmlpp::Document * document = parser->get_document();
xmlpp::DomParser parser;
const xmlpp::Document * document = getConfigDocument(parser,
configFileName);
const xmlpp::Element * root = document->get_root_node();
tac.reset(new TestAuthenticationClient());

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.2 $
Author : $Author: maroy $
Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/TestAuthenticationClientTest.h,v $
------------------------------------------------------------------------------*/
@ -42,6 +42,8 @@
#include <cppunit/extensions/HelperMacros.h>
#include "LiveSupport/Core/BaseTestMethod.h"
#include "TestAuthenticationClient.h"
namespace LiveSupport {
@ -60,11 +62,11 @@ using namespace LiveSupport::Core;
/**
* Unit test for the TestAuthenticationClient class.
*
* @author $Author: fgerlits $
* @version $Revision: 1.2 $
* @author $Author: maroy $
* @version $Revision: 1.3 $
* @see TestAuthenticationClient
*/
class TestAuthenticationClientTest : public CPPUNIT_NS::TestFixture
class TestAuthenticationClientTest : public BaseTestMethod
{
CPPUNIT_TEST_SUITE(TestAuthenticationClientTest);
CPPUNIT_TEST(firstTest);

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.9 $
Author : $Author: maroy $
Version : $Revision: 1.10 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClientTest.cxx,v $
------------------------------------------------------------------------------*/
@ -62,7 +62,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(WebAuthenticationClientTest);
/**
* The name of the configuration file for the authentication client factory.
*/
static const std::string configFileName = "etc/webAuthentication.xml";
static const std::string configFileName = "webAuthentication.xml";
/* =============================================== local function prototypes */
@ -77,9 +77,9 @@ void
WebAuthenticationClientTest :: setUp(void) throw ()
{
try {
Ptr<xmlpp::DomParser>::Ref parser(
new xmlpp::DomParser(configFileName, true));
const xmlpp::Document * document = parser->get_document();
xmlpp::DomParser parser;
const xmlpp::Document * document = getConfigDocument(parser,
configFileName);
const xmlpp::Element * root = document->get_root_node();
wac.reset(new WebAuthenticationClient());

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: fgerlits $
Version : $Revision: 1.5 $
Author : $Author: maroy $
Version : $Revision: 1.6 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/authentication/src/WebAuthenticationClientTest.h,v $
------------------------------------------------------------------------------*/
@ -42,6 +42,8 @@
#include <cppunit/extensions/HelperMacros.h>
#include "LiveSupport/Core/BaseTestMethod.h"
#include "WebAuthenticationClient.h"
namespace LiveSupport {
@ -60,11 +62,11 @@ using namespace LiveSupport::Core;
/**
* Unit test for the WebAuthenticationClient class.
*
* @author $Author: fgerlits $
* @version $Revision: 1.5 $
* @author $Author: maroy $
* @version $Revision: 1.6 $
* @see WebAuthenticationClient
*/
class WebAuthenticationClientTest : public CPPUNIT_NS::TestFixture
class WebAuthenticationClientTest : public BaseTestMethod
{
CPPUNIT_TEST_SUITE(WebAuthenticationClientTest);
CPPUNIT_TEST(firstTest);

View file

@ -0,0 +1,70 @@
#!/bin/sh
#-------------------------------------------------------------------------------# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LiveSupport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/bin/gLiveSupport_devenv.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# System V runlevel style invoke script for the LiveSupport Scheduler
# This script is only used in the LiveSupport development environment
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Determine directories, files
#-------------------------------------------------------------------------------
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd;`
bindir=$basedir/bin
etcdir=$basedir/etc
libdir=$basedir/lib
tmpdir=$basedir/tmp
usrdir=`cd $basedir/../../usr; pwd;`
#-------------------------------------------------------------------------------
# Set up the environment
#-------------------------------------------------------------------------------
export LD_LIBRARY_PATH=$usrdir/lib:$LD_LIBRARY_PATH
if [ -x $tmpdir/gLiveSupport ]; then
gLiveSupport_exe=$tmpdir/gLiveSupport
else
echo "Can't find scheduler executable.";
fi
if [ -f ~/.livesupport/gLiveSupport.xml ]; then
config_file=~/.livesupport/gLiveSupport.xml
elif [ -f $etcdir/gLiveSupport.xml ]; then
config_file=$etcdir/gLiveSupport.xml
else
echo "Can't find configuration file.";
fi
mode=$1
echo "using configuration file: $config_file";
$gLiveSupport_exe -c $config_file

View file

@ -20,8 +20,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: fgerlits $
# Version : $Revision: 1.26 $
# Author : $Author: maroy $
# Version : $Revision: 1.27 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
#
# @configure_input@
@ -44,6 +44,7 @@ BASE_DIR = @builddir@
DOC_DIR = ${BASE_DIR}/doc
DOXYGEN_DIR = ${DOC_DIR}/doxygen
COVERAGE_DIR = ${DOC_DIR}/coverage
BIN_DIR = ${BASE_DIR}/bin
ETC_DIR = ${BASE_DIR}/etc
SRC_DIR = ${BASE_DIR}/src
TMP_DIR = ${BASE_DIR}/tmp
@ -132,7 +133,7 @@ TEST_RESULTS = ${DOC_DIR}/testResults.xml
TEST_XSLT = ../etc/testResultToHtml.xsl
G_LIVESUPPORT_EXE = ${TMP_DIR}/gLiveSupport
G_LIVESUPPORT_CFG = ${ETC_DIR}/gLiveSupport.xml
G_LIVESUPPORT_SH = ${BIN_DIR}/gLiveSupport_devenv.sh
G_LIVESUPPORT_CFG = ${ETC_DIR}/gLiveSupport.xml
TEST_RUNNER = ${TMP_DIR}/testRunner
@ -255,7 +256,7 @@ run_tests: ${TEST_RUNNER}
${TEST_RUNNER} -o ${TEST_RESULTS} -s ${TEST_XSLT}
run: all
${G_LIVESUPPORT_EXE} -c ${G_LIVESUPPORT_CFG}
${G_LIVESUPPORT_SH}
install: ${SCHEDULER_EXE}
-${MAKE} -C ${STORAGE_SERVER_DIR} db_init

View file

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE gLiveSupport [
<!ELEMENT gLiveSupport (resourceBundle,
supportedLanguages,
widgetFactory,
authenticationClientFactory,
storageClientFactory,
schedulerClientFactory,
audioPlayer) >
<!ELEMENT resourceBundle EMPTY >
<!ATTLIST resourceBundle path CDATA #REQUIRED >
<!ATTLIST resourceBundle locale CDATA #REQUIRED >
<!ELEMENT supportedLanguages (language+) >
<!ELEMENT language EMPTY >
<!ATTLIST language locale CDATA #REQUIRED >
<!ATTLIST language name CDATA #REQUIRED >
<!ELEMENT widgetFactory EMPTY >
<!ATTLIST widgetFactory path CDATA #REQUIRED >
<!ELEMENT authenticationClientFactory (testAuthentication|
webAuthentication)>
<!ELEMENT testAuthentication (user) >
<!ELEMENT webAuthentication (location) >
<!ELEMENT location EMPTY >
<!ATTLIST location server CDATA #REQUIRED >
<!ATTLIST location port NMTOKEN #REQUIRED >
<!ATTLIST location path CDATA #REQUIRED >
<!ELEMENT user EMPTY >
<!ATTLIST user login CDATA #REQUIRED >
<!ATTLIST user password CDATA #REQUIRED >
<!ELEMENT storageClientFactory (testStorage|webStorage) >
<!ELEMENT testStorage (playlist*, audioClip*) >
<!ATTLIST testStorage tempFiles CDATA #REQUIRED >
<!ELEMENT playlist (playlistElement*) >
<!ATTLIST playlist id NMTOKEN #REQUIRED >
<!ATTLIST playlist playlength NMTOKEN #REQUIRED >
<!ELEMENT playlistElement ((audioClip|playlist), fadeInfo?) >
<!ATTLIST playlistElement id NMTOKEN #REQUIRED >
<!ATTLIST playlistElement relativeOffset NMTOKEN #REQUIRED >
<!ELEMENT audioClip EMPTY >
<!ATTLIST audioClip id NMTOKEN #REQUIRED >
<!ATTLIST audioClip playlength NMTOKEN #REQUIRED >
<!ATTLIST audioClip title CDATA #REQUIRED >
<!ATTLIST audioClip uri CDATA #REQUIRED >
<!ELEMENT fadeInfo EMPTY >
<!ATTLIST fadeInfo id NMTOKEN #REQUIRED >
<!ATTLIST fadeInfo fadeIn NMTOKEN #REQUIRED >
<!ATTLIST fadeInfo fadeOut NMTOKEN #REQUIRED >
<!ELEMENT webStorage (location) >
<!ATTLIST webStorage tempFiles CDATA #REQUIRED >
<!ELEMENT schedulerClientFactory (schedulerDaemonXmlRpcClient) >
<!ELEMENT schedulerDaemonXmlRpcClient EMPTY >
<!ATTLIST schedulerDaemonXmlRpcClient xmlRpcHost CDATA #REQUIRED >
<!ATTLIST schedulerDaemonXmlRpcClient xmlRpcPort NMTOKEN #REQUIRED >
<!ATTLIST schedulerDaemonXmlRpcClient xmlRpcUri CDATA #REQUIRED >
<!ELEMENT audioPlayer (helixPlayer) >
<!ELEMENT helixPlayer EMPTY >
<!ATTLIST helixPlayer dllPath CDATA #REQUIRED >
]>
<gLiveSupport>
<resourceBundle path = "./tmp/gLiveSupport"
locale = "en"
/>
<supportedLanguages>
<language locale="en" name="English"/>
<language locale="hu" name="Magyar"/>
</supportedLanguages>
<widgetFactory path = "var/widgets/" />
<authenticationClientFactory>
<webAuthentication>
<location server="ls_php_host" port="ls_php_port"
path="/ls_php_urlPrefix/storageServer/var/ls_alib_xmlRpcPrefix"/>
</webAuthentication>
</authenticationClientFactory>
<storageClientFactory>
<webStorage tempFiles="file:///ls_install_dir/tmp/webStorageClient" >
<location server="ls_php_host" port="ls_php_port"
path="/ls_php_urlPrefix/storageServer/var/ls_alib_xmlRpcPrefix"/>
</webStorage>
</storageClientFactory>
<schedulerClientFactory>
<schedulerDaemonXmlRpcClient xmlRpcHost = "ls_scheduler_host"
xmlRpcPort = "ls_scheduler_port"
xmlRpcUri = "/ls_scheduler_xmlRpcPrefix"
/>
</schedulerClientFactory>
<audioPlayer>
<helixPlayer dllPath = "ls_install_dir/lib/helix"/>
</audioPlayer>
</gLiveSupport>