diff options
author | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-25 10:12:13 +0000 |
---|---|---|
committer | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-25 10:12:13 +0000 |
commit | 9d460cf67c3999a0ec7723c377a60df07268b5c8 (patch) | |
tree | c385668c848d9a322a6ec45433af18d00d0f50c7 /python/tests/Provider.py | |
parent | 738257f33a816017ba2edf01288f14f61ca2f21f (diff) | |
download | lasso-9d460cf67c3999a0ec7723c377a60df07268b5c8.tar.gz lasso-9d460cf67c3999a0ec7723c377a60df07268b5c8.tar.xz lasso-9d460cf67c3999a0ec7723c377a60df07268b5c8.zip |
Removed obsolete Python test framework.
Diffstat (limited to 'python/tests/Provider.py')
-rw-r--r-- | python/tests/Provider.py | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/python/tests/Provider.py b/python/tests/Provider.py deleted file mode 100644 index 5f40dad9..00000000 --- a/python/tests/Provider.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: UTF-8 -*- - - -# Lasso Simulator -# By: Emmanuel Raviart <eraviart@entrouvert.com> -# -# Copyright (C) 2004 Entr'ouvert -# http://lasso.entrouvert.org -# -# 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 - - -import lasso - -import abstractweb - - -class ProviderMixin(abstractweb.WebSiteMixin): - lassoServerDump = None - libertyEnabledHeaders = { - 'Liberty-Enabled': 'LIBV=urn:liberty:iff:2003-08,http://projectliberty.org/specs/v1', - } - providerId = None # The Liberty providerID of this web site - sessionTokensByNameIdentifier = None - userIdsByNameIdentifier = None - - def __init__(self): - abstractweb.WebSiteMixin.__init__(self) - self.userIdsByNameIdentifier = {} - self.sessionTokensByNameIdentifier = {} - - def getLassoServer(self): - return lasso.Server.new_from_dump(self.lassoServerDump) - - def getSessionFromNameIdentifier(self, nameIdentifier): - sessionToken = self.sessionTokensByNameIdentifier.get(nameIdentifier, None) - if sessionToken is None: - # The user has no federation on this site or has no authentication assertion for this - # federation. - return None - return self.sessions.get(sessionToken, None) - - def getUserFromNameIdentifier(self, nameIdentifier): - userId = self.userIdsByNameIdentifier.get(nameIdentifier, None) - if userId is None: - # The user has no federation on this site. - return None - return self.users.get(userId, None) |