1. BisonVert MakinaCorpus
  2. django-oauthclient


Alexis Metaireau  committed fa1ec61

oauthclient "is_oauth_authenticated" return *True* when the user is authenticated. Update using functions accordingly

  • Participants
  • Parent commits b5df77f
  • Branches default

Comments (0)

Files changed (1)

File oauthclient/utils.py

View file
  • Ignore whitespace
     provider identifier.
-    return not (identifier + '_oauth_token' and identifier + '_oauth_token_secret' in request.session)
+    return (identifier + '_oauth_token' and identifier + '_oauth_token_secret' in request.session)
 def need_oauth_authentication(identifier, force=False):
     """Decorator when oauth authentication is needed.
     def wrapper(func):
         def wrapped(*args, **kwargs):
             request = args[0]
-            if force or is_oauth_authenticated(request=request,
+            if force or not is_oauth_authenticated(request=request,
                 return redirect('%s?next=%s' % (