Skip to content
This is an unfinished fork of oauth2app. Do not use this fork!
Python JavaScript Shell
Pull request Compare This branch is 11 commits ahead, 7 commits behind hiidef:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs
examples
oauth2provider
tests/testsite
.gitignore
LICENSE.txt
README.rst
ez_setup.py
setup.py

README.rst

Warning

The code in here is still a work in progress. Do not use this.

Installation

If easy_install is available, you can use:

easy_install https://github.com/hiidef/oauth2app/tarball/master

Introduction

The oauth2app module helps Django site operators provide an OAuth 2.0 interface. The module is registered as an application.

How to set up the OAuth2 provider

In settings.py, add 'oauth2provider' to INSTALLED_APPS.

INSTALLED_APPS = (
    ...,
    'oauth2provider'
)

Sync the DB models.

python manage.py syncdb

In urls.py, add the oauth2provider URL patterns:

urlpatterns = patterns('',
    ...
    url(r'^oauth2/', include('oauth2provider.urls')),
    ...
)

How to set up a sample OAuth2 consumer

TODO: move this all into django-oauth2consumer.

Create client models.

from oauth2app.models import Client

Client.objects.create(
    name="My Sample OAuth 2.0 Client",
    user=user)

Examples

An example Django project demonstrating client and server functionality is available in the repository.

https://github.com/hiidef/oauth2app/tree/develop/examples/mysite

Something went wrong with that request. Please try again.