1. Vladimir Mihailenco
  2. django-oauth-plus


Comments (0)

Files changed (6)

File oauth_provider/decorators.py Modified

View file
  • Ignore whitespace
  • Hide word diff
 from oauth2 import Error
-    from functools import wraps, update_wrapper
+    from functools import update_wrapper
 except ImportError:
-    from django.utils.functional import wraps, update_wrapper  # Python 2.3, 2.4 fallback.
+    from django.utils.functional import update_wrapper  # Python 2.3, 2.4 fallback.
-from django.contrib.auth import REDIRECT_FIELD_NAME
 from django.utils.translation import ugettext as _
 from utils import initialize_server_request, send_oauth_error, get_oauth_request

File oauth_provider/managers.py Modified

View file
  • Ignore whitespace
  • Hide word diff
 from django.db import models
-from django.contrib.auth.models import User
-from consts import KEY_SIZE, SECRET_SIZE
 class ConsumerManager(models.Manager):
     def create_consumer(self, name, user=None):

File oauth_provider/tests.py Modified

View file
  • Ignore whitespace
  • Hide word diff
 Django installation
-There are a few steps for setting up a proper installation. The `OAuth Python
-library`_ is required and must be patched (at least for the moment).
+First, install dependencies through pip::
-.. _`OAuth Python library`: http://oauth.googlecode.com/svn/code/python/oauth/
-You can find a custom version of the module at the root level of django-oauth.
+    pip install -r requirements.txt
 You need to specify the OAuth provider application in your settings and to 
 sync your database thanks to the ``syncdb`` command. Then add it to your 

File oauth_provider/utils.py Modified

View file
  • Ignore whitespace
  • Hide word diff
 from django.conf import settings
 from django.http import HttpResponse, HttpResponseBadRequest
-from consts import MAX_URL_LENGTH, OUT_OF_BAND
+from consts import MAX_URL_LENGTH
 OAUTH_REALM_KEY_NAME = getattr(settings, 'OAUTH_REALM_KEY_NAME', '')
 OAUTH_SIGNATURE_METHODS = getattr(settings, 'OAUTH_SIGNATURE_METHODS', ['plaintext', 'hmac-sha1'])
         parameters = dict(request.REQUEST.items())
     oauth_request = oauth.Request.from_request(request.method, 
-                                              request.build_absolute_uri(), 
+                                              request.build_absolute_uri(request.path), 
                                               query_string=request.META.get('QUERY_STRING', ''))

File requirements.txt Modified

View file
  • Ignore whitespace
  • Hide word diff
--e git://github.com/simplegeo/python-oauth2@1f9640f8467a90fcc20be6bbb8909d21bad308f6#egg=oauth2-1.2.1-py2.6-dev

File setup.py Modified

View file
  • Ignore whitespace
  • Hide word diff
 from setuptools import setup, find_packages
-    name='django-oauth',
-    version='1.1',
-    description='Support of OAuth in Django.',
+    name='django-oauth-plus',
+    version='2.0',
+    description='Support of OAuth 1.0a in Django using python-oauth2.',
     author='David Larlet',
-    url='http://code.welldev.org/django-oauth/',
+    url='http://code.welldev.org/django-oauth-plus/',
-        'Development Status :: 5 - Production/Stable',
+        'Development Status :: 4 - Beta',
         'Environment :: Web Environment',
         'Intended Audience :: Developers',
         'License :: OSI Approved :: BSD License',