]> git.parisson.com Git - django-social-auth.git/commitdiff
Google OAuth is always enabled because of anon access, small comment fix
authorMatías Aguirre <matiasaguirre@gmail.com>
Wed, 16 Feb 2011 05:05:48 +0000 (03:05 -0200)
committerMatías Aguirre <matiasaguirre@gmail.com>
Wed, 16 Feb 2011 05:05:48 +0000 (03:05 -0200)
social_auth/backends/__init__.py
social_auth/backends/google.py

index 0e5e31a09a5f03132b795d9ff1ace35188c71239..2d00e5155d94b3098c1283fa72ff5f909c0c0941 100644 (file)
@@ -70,9 +70,10 @@ class SocialAuthBackend(ModelBackend):
         verification is made by kwargs inspection for current backend
         name presence.
         """
-        # Validate backend and arguments. Require that the OAuth response
-        # be passed in as a keyword argument, to make sure we don't match
-        # the username/password calling conventions of authenticate.
+        # Validate backend and arguments. Require that the Social Auth
+        # response be passed in as a keyword argument, to make sure we
+        # don't match the username/password calling conventions of
+        # authenticate.
         if not (self.name and kwargs.get(self.name) and 'response' in kwargs):
             return None
 
index 292ff36b6590a41cf18da7e9f56ac123ea963fd5..981eb11c6516366535453d01875614dc9584efd2 100644 (file)
@@ -124,6 +124,11 @@ class GoogleOAuth(BaseGoogleOAuth):
         except AttributeError:
             return 'anonymous', 'anonymous'
 
+    @classmethod
+    def enabled(cls):
+        """Google OAuth is always enabled because of anonymous access"""
+        return True
+
 
 # Backend definition
 BACKENDS = {