changeset 4208:10132d2696dc

Fix tests: make XMLRPC use the new authentication functions
author Florian Krupicka <florian.krupicka@googlemail.com>
date Wed, 09 Jul 2008 16:32:50 +0200
parents 04b0ebc16dec
children 7abbc2bb328d
files MoinMoin/xmlrpc/__init__.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py	Wed Jul 09 16:14:55 2008 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Wed Jul 09 16:32:50 2008 +0200
@@ -30,7 +30,7 @@
 from MoinMoin import log
 logging = log.getLogger(__name__)
 
-from MoinMoin import config, user, wikiutil
+from MoinMoin import auth, config, user, wikiutil
 from MoinMoin.Page import Page
 from MoinMoin.PageEditor import PageEditor
 from MoinMoin.logfile import editlog
@@ -679,12 +679,12 @@
             or the password were wrong.
         """
         id_handler = XmlRpcAuthTokenIDHandler()
+        request = self.request
 
-        u = self.request.cfg.session_handler.start(self.request, id_handler)
-        u = self.request.handle_auth(u, username=username,
-                                     password=password, login=True)
+        request.session = request.cfg.session_service.get_session(request)
 
-        self.request.cfg.session_handler.after_auth(self.request, id_handler, u)
+        u = auth.setup_from_session(request, request.session)
+        u = auth.handle_login(request, u, username=username, password=password)
 
         if u and u.valid:
             return id_handler.token