changeset 3656:6060395dcdf1

rename MoinLogin to MoinAuth for better consistency with other auth classes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 01 Jun 2008 18:25:06 +0200
parents ba99c8023063
children 2ef181f42a41
files MoinMoin/auth/__init__.py MoinMoin/auth/_tests/test_auth.py MoinMoin/config/multiconfig.py contrib/auth_externalcookie/wikiconfig.py wiki/config/more_samples/auth_session_wikiconfig_snippet
diffstat 5 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/__init__.py	Sun Jun 01 17:45:51 2008 +0200
+++ b/MoinMoin/auth/__init__.py	Sun Jun 01 18:25:06 2008 +0200
@@ -213,13 +213,13 @@
     def login_hint(self, request):
         return None
 
-class MoinLogin(BaseAuth):
+class MoinAuth(BaseAuth):
     """ handle login from moin login form """
     def __init__(self):
         BaseAuth.__init__(self)
 
     login_inputs = ['username', 'password']
-    name = 'moin_login'
+    name = 'moin'
     logout_possible = True
 
     def login(self, request, user_obj, **kw):
--- a/MoinMoin/auth/_tests/test_auth.py	Sun Jun 01 17:45:51 2008 +0200
+++ b/MoinMoin/auth/_tests/test_auth.py	Sun Jun 01 18:25:06 2008 +0200
@@ -204,12 +204,12 @@
             trail = request.session['trail']
             assert trail == trail_expected
 
-    def testMoinLoginAuthSession(self):
-        """ run some requests with moin_login auth, check whether session works """
-        from MoinMoin.auth import MoinLogin
+    def testMoinAuthSession(self):
+        """ run some requests with MoinAuth, check whether session works """
+        from MoinMoin.auth import MoinAuth
         from MoinMoin.user import User
-        self.config = self.TestConfig(auth=[MoinLogin()])
-        username = u'MoinLoginAuthTestUser'
+        self.config = self.TestConfig(auth=[MoinAuth()])
+        username = u'MoinAuthTestUser'
         password = u'secret'
         User(self.request, name=username, password=password).save() # create user
         trail_expected = []
--- a/MoinMoin/config/multiconfig.py	Sun Jun 01 17:45:51 2008 +0200
+++ b/MoinMoin/config/multiconfig.py	Sun Jun 01 18:25:06 2008 +0200
@@ -245,7 +245,7 @@
     allow_xslt = False
     antispam_master_url = "http://master.moinmo.in/?action=xmlrpc2"
 
-    auth = [authmodule.MoinLogin()]
+    auth = [authmodule.MoinAuth()]
     # default to http and xmlrpc_applytoken to get old semantics
     # xmlrpc_applytoken shall be removed once that code is changed
     # to have proper session handling and use request.handle_auth()
--- a/contrib/auth_externalcookie/wikiconfig.py	Sun Jun 01 17:45:51 2008 +0200
+++ b/contrib/auth_externalcookie/wikiconfig.py	Sun Jun 01 18:25:06 2008 +0200
@@ -64,9 +64,9 @@
         return user, try_next
 
 class FarmConfig(DefaultConfig):
-    from MoinMoin.auth import MoinLogin
+    from MoinMoin.auth import MoinAuth
     # use ExternalCookie, also allow the usual moin login
-    auth = [ExternalCookie(), MoinLogin()]
+    auth = [ExternalCookie(), MoinAuth()]
 
     # ... (rest of your config follows here) ...
 
--- a/wiki/config/more_samples/auth_session_wikiconfig_snippet	Sun Jun 01 17:45:51 2008 +0200
+++ b/wiki/config/more_samples/auth_session_wikiconfig_snippet	Sun Jun 01 18:25:06 2008 +0200
@@ -4,7 +4,7 @@
 
     # authentication methods used (default shown, see also other snippets):
     #from MoinMoin import auth as authmodule
-    #auth = [authmodule.MoinLogin()]
+    #auth = [authmodule.MoinAuth()]
 
     # auth methods that get a user into "Trusted" group:
     #auth_methods_trusted = ['http', 'xmlrpc_applytoken']