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

  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • Operating System :: OS Independent
  • Programming Language :: Python
  • Programming Language :: Python :: 2
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.3
  • Development Status :: 4 - Beta
  • License :: OSI Approved :: BSD License
File Type Python Version Uploaded On Downloads
django-oauthost-0.3.0.tar.gz Source June 10, 2014 1,256
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
Aug. 26, 2015, 12:18 a.m. django-oauthost 0.1.0 Release Created
Aug. 26, 2015, 12:18 a.m. django-oauthost 0.2.0 Release Created
Aug. 26, 2015, 12:18 a.m. django-oauthost 0.3.0 Release Created
Aug. 26, 2015, 12:18 a.m. django-oauthost 0.0.2 Release Created
Aug. 26, 2015, 12:18 a.m. django-oauthost 0.0.3 Release Created
Aug. 26, 2015, 12:18 a.m. django-oauthost 0.0.1 Release Created
Aug. 26, 2015, 12:18 a.m. django-oauthost Package Created