]> git.parisson.com Git - django-social-auth.git/commitdiff
Remove ERROR_KEY/NAME_KEY
authorMatías Aguirre <matiasaguirre@gmail.com>
Mon, 19 Sep 2011 21:24:52 +0000 (18:24 -0300)
committerMatías Aguirre <matiasaguirre@gmail.com>
Mon, 19 Sep 2011 21:24:52 +0000 (18:24 -0300)
social_auth/models.py
social_auth/views.py

index 4522a6ab9c0b9db400e7bf6be4bac4898072e9a9..6d052017e4eeec0862488f0a6b3dfdf691f059fb 100644 (file)
@@ -6,6 +6,7 @@ from django.conf import settings
 
 from social_auth.fields import JSONField
 
+
 # If User class is overridden, it *must* provide the following fields
 # and methods work with django-social-auth:
 #
index 79a55f32bf46f7731231c60ba917578ed95470b7..4de8b8d73c02277d80fa3acb38b3cce1a8f9eabf 100644 (file)
@@ -40,8 +40,6 @@ SOCIAL_AUTH_LAST_LOGIN = _setting('SOCIAL_AUTH_LAST_LOGIN',
 SESSION_EXPIRATION = _setting('SOCIAL_AUTH_SESSION_EXPIRATION', True)
 BACKEND_ERROR_REDIRECT = _setting('SOCIAL_AUTH_BACKEND_ERROR_URL',
                                   LOGIN_ERROR_URL)
-ERROR_KEY = _setting('SOCIAL_AUTH_BACKEND_ERROR', 'socialauth_backend_error')
-NAME_KEY = _setting('SOCIAL_AUTH_BACKEND_KEY', 'socialauth_backend_name')
 SANITIZE_REDIRECTS = _setting('SOCIAL_AUTH_SANITIZE_REDIRECTS', True)
 
 
@@ -81,16 +79,6 @@ def dsa_view(redirect_name=None):
                 else:
                     logger.warn('Messages framework not in place, some '+
                                 'errors have not been shown to the user.')
-                # What's the use in this, having not both the messages
-                # framework and decent logging in place?
-                # Also: do we really want to share all and any errors back
-                # to the user, in a security-wise sensitive application?
-                #
-                # else:
-                #     if ERROR_KEY:  # store error in session
-                #         request.session[ERROR_KEY] = msg
-                #     if NAME_KEY:  # store the backend name for convenience
-                #         request.session[NAME_KEY] = backend_name
                 return HttpResponseRedirect(BACKEND_ERROR_REDIRECT)
         return wrapper
     return dec