]> git.parisson.com Git - django-social-auth.git/commitdiff
make BaseOAuth2 behave like ConsumerBasedOAuth when requesting an access token leads...
authorMichael Armida <me@marmida.org>
Tue, 6 Mar 2012 06:35:45 +0000 (22:35 -0800)
committerMichael Armida <me@marmida.org>
Tue, 6 Mar 2012 06:35:45 +0000 (22:35 -0800)
social_auth/backends/__init__.py

index ceaffcfdae544f499ac7a9d07e3fa6e55d002623..766bb6fad2f43c00edd97fc0f42bb5a01bfa8b2e 100644 (file)
@@ -658,6 +658,11 @@ class BaseOAuth2(BaseOAuth):
 
         try:
             response = simplejson.loads(urlopen(request).read())
+        except HTTPError, e:
+            if e.code == 400:
+                raise AuthCanceled(self)
+            else:
+                raise
         except (ValueError, KeyError):
             raise AuthUnknownError(self)