django-oauthost 0.3.0

This reusable Django application introduces OAuth2 server functionality.

http://github.com/idlesign/django-oauthost

What's that

django-oauthost is a reusable application for Django, introducing OAuth2 server.

It allows to guard your application views with OAuth 2.0 in quite a trivial way.

  1. Register your client using Django Admin or API:

    from oauthost.toolbox import register_client
    
    ...
    
    # Define some scopes to restrict our client to.
    my_scopes = ['polls:vote']
    
    # `user` might be `request.user` if in a view.
    register_client('My OAuth Client', 'my_client', 'http://someurl.com/myclient/', user, scopes_list=my_scopes)
    
    ...
    
  2. Decorate your views with oauth_required (suppose in polls.views):

    from oauthost.decorators import oauth_required
    
    @oauth_required(scope_auto=True)
    def vote(request, poll_id, variant_id):
        ...
    
  3. Attach oauthost.urls to project urls (in urls.py):

    from oauthost.urls import urlpatterns as oauthost_urlpatterns
    
    urlpatterns = ...  # Your actual urlpatterns are ommited.
    
    urlpatterns += oauthost_urlpatterns
    

    After that authorization endpoint is available at { BASE_URL }auth/.

    Token endpoint is available at { BASE_URL }token/.

That's all for oauthost, connect using your client.

More information is available, read the docs!

Author

Igor 'idle sign' Starikov

Pip

django-oauthost==0.3.0

Classifiers

  • Programming Language :: Python :: 3.3
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 2
  • Programming Language :: Python
  • Operating System :: OS Independent
  • License :: OSI Approved :: BSD License
  • Intended Audience :: Developers
  • Framework :: Django
  • Environment :: Web Environment
  • Development Status :: 4 - Beta
File Type Python Version Uploaded On Downloads
django-oauthost-0.3.0.tar.gz Source June 10, 2014 608
Version Release Date
0.3.0 June 10, 2014
0.2.0 June 9, 2014
0.1.0 July 4, 2013
0.0.3 July 19, 2012
0.0.2 Jan. 11, 2012
0.0.1 Jan. 10, 2012
Date Package Version Action
Nov. 4, 2014, 1:31 p.m. django-oauthost 0.1.0 Release Created
Nov. 4, 2014, 1:31 p.m. django-oauthost 0.2.0 Release Created
Nov. 4, 2014, 1:31 p.m. django-oauthost 0.3.0 Release Created
Nov. 4, 2014, 1:31 p.m. django-oauthost 0.0.2 Release Created
Nov. 4, 2014, 1:31 p.m. django-oauthost 0.0.3 Release Created
Nov. 4, 2014, 1:31 p.m. django-oauthost 0.0.1 Release Created
Nov. 4, 2014, 1:31 p.m. django-oauthost Package Created