no longer used

This commit is contained in:
fpeters 2004-02-22 20:16:35 +00:00
parent 7e9955f81d
commit 8f78cc2e89
1 changed files with 0 additions and 132 deletions

View File

@ -1,132 +0,0 @@
# -*- coding: iso-8859-15 -*-
# Glasnost
# By: Odile Bénassy <obenassy@entrouvert.com>
# Romain Chantereau <rchantereau@entrouvert.com>
# Nicolas Clapiès <nclapies@easter-eggs.org>
# Pierre-Antoine Dejace <padejace@entrouvert.be>
# Thierry Dulieu <tdulieu@easter-eggs.com>
# Florent Monnier <monnier@codelutin.com>
# Cédric Musso <cmusso@easter-eggs.org>
# Frédéric Péters <fpeters@entrouvert.be>
# Benjamin Poussin <poussin@codelutin.com>
# Emmanuel Raviart <eraviart@entrouvert.com>
# Sébastien Régnier <regnier@codelutin.com>
# Emmanuel Saracco <esaracco@easter-eggs.com>
#
# Copyright (C) 2000, 2001 Easter-eggs & Emmanuel Raviart
# Copyright (C) 2002 Odile Bénassy, Code Lutin, Thierry Dulieu, Easter-eggs,
# Entr'ouvert, Frédéric Péters, Benjamin Poussin, Emmanuel Raviart,
# Emmanuel Saracco & Théridion
# Copyright (C) 2003 Odile Bénassy, Romain Chantereau, Nicolas Clapiès,
# Code Lutin, Pierre-Antoine Dejace, Thierry Dulieu, Easter-eggs,
# Entr'ouvert, Florent Monnier, Cédric Musso, Ouvaton, Frédéric Péters,
# Benjamin Poussin, Rodolphe Quiédeville, Emmanuel Raviart, Sébastien
# Régnier, Emmanuel Saracco, Théridion & Vecam
#
# This program 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.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
__doc__ = """Glasnost Authentication Method Server Base Classes"""
__version__ = '$Revision$'[11:-2]
import time
import sys
glasnostPythonDir = '/usr/local/lib/glasnost-devel' # changed on make install
sys.path.insert(0, glasnostPythonDir)
import glasnost
import glasnost.common.faults as faults
import glasnost.common.tools_new as commonTools
from glasnost.proxy.DispatcherProxy import getApplicationId, \
getApplicationToken, registerServer, registerVirtualServer
from glasnost.server.ObjectsServer import AdministrableServerMixin, Server
from glasnost.server.tools import *
class AuthenticationMethodServer(AdministrableServerMixin, Server):
def addAccount(self, userId, authenticationDict):
authenticationObject = commonTools.importThing(authenticationDict)
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
result = virtualServer.addAccount(userId, authenticationObject)
return result
def checkAuthentication(self, authenticationDict):
authenticationObject = commonTools.importThing(authenticationDict)
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
return virtualServer.checkAuthentication(authenticationObject)
def deleteAccount(self, authenticationDict):
authenticationObject = commonTools.importThing(authenticationDict)
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
virtualServer.deleteAccount(authenticationObject)
def getAccounts(self):
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
return virtualServer.getAccounts()
def getAccountUserId(self, authenticationDict):
authenticationObject = commonTools.importThing(authenticationDict)
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
return virtualServer.getAccountUserId(authenticationObject)
def hasAccount(self, authenticationDict):
authenticationObject = commonTools.importThing(authenticationDict)
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
return virtualServer.hasAccount(authenticationObject)
def modifyAccount(self, userId, authenticationDict):
authenticationObject = commonTools.importThing(authenticationDict)
virtualServerId = context.getVar('applicationId')
virtualServer = self.getVirtualServer(virtualServerId)
result = virtualServer.modifyAccount(userId, authenticationObject)
return result
def registerPublicMethods(self):
Server.registerPublicMethods(self)
AdministrableServerMixin.registerPublicMethods(self)
self.registerPublicMethod('addAccount')
self.registerPublicMethod('checkAuthentication')
self.registerPublicMethod('deleteAccount')
self.registerPublicMethod('getAccounts')
self.registerPublicMethod('getAccountUserId')
self.registerPublicMethod('hasAccount')
self.registerPublicMethod('modifyAccount')
def startRpcServer(self):
Server.startRpcServer(self)
authenticationProxy = getProxyForServerRole('authentication')
while 1:
try:
authenticationProxy.registerAuthenticationMethod(
self.authenticationMethodName)
except faults.UnknownServerId:
time.sleep(1)
continue
break