]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/localauth/authentication.py
init the Facebook api inside check_login_status() method. This used to cause troubles...
[osqa.git] / forum_modules / localauth / authentication.py
old mode 100755 (executable)
new mode 100644 (file)
index 3169a99..837b756
@@ -1,18 +1,19 @@
-from forum.authentication.base import AuthenticationConsumer, ConsumerTemplateContext, InvalidAuthentication\r
-from forms import ClassicLoginForm\r
-\r
-class LocalAuthConsumer(AuthenticationConsumer):\r
-    def process_authentication_request(self, request):\r
-        form_auth = ClassicLoginForm(request.POST)\r
-\r
-        if form_auth.is_valid():\r
-            return form_auth.get_user()\r
-        else:\r
-            raise InvalidAuthentication(" ".join(form_auth.errors.values()[0]))\r
-\r
-class LocalAuthContext(ConsumerTemplateContext):\r
-    mode = 'STACK_ITEM'\r
-    weight = 1000\r
-    human_name = 'Local authentication'\r
-    stack_item_template = 'modules/localauth/loginform.html'\r
-    show_to_logged_in_user = False
\ No newline at end of file
+from forum.authentication.base import AuthenticationConsumer, ConsumerTemplateContext, InvalidAuthentication
+from forms import ClassicLoginForm
+
+class LocalAuthConsumer(AuthenticationConsumer):
+    def process_authentication_request(self, request):
+        form_auth = ClassicLoginForm(request.POST)
+
+        if form_auth.is_valid():
+            return form_auth.get_user()
+        else:
+            raise InvalidAuthentication(" ".join(form_auth.errors.values()[0]))
+
+class LocalAuthContext(ConsumerTemplateContext):
+    mode = 'STACK_ITEM'                      
+    weight = 1000
+    human_name = 'Local authentication'
+    stack_item_template = 'modules/localauth/loginform.html'
+    show_to_logged_in_user = False
+