Skip to content

Working example of django-rest-framework using OAuth2Authentication (django-oauth2-provider) and SessionAuthentication.

Notifications You must be signed in to change notification settings

erkarl/django-rest-framework-oauth2-provider-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-rest-framework-oauth2-provider

Working example of django-rest-framework using OAuth2Authentication (django-oauth2-provider) and SessionAuthentication for browseable API. Cross-Origin Resource Sharing is also enabled via django-cors-headers.

Client side example for Ember.js available at ember-app-kit-simple-auth.

Requirements

  • You should have virtualenv installed.
  • Make sure your SSH keys are set up properly for GitHub.

Install

Clone this repo, set up and activate a virtualenv:

git clone git@github.com:erkarl/django-rest-framework-oauth2-provider-example.git
cd django-rest-framework-oauth2-provider-example
virtualenv env
source env/bin/activate

Setup dependencies:

make install

Run the server

make server

Launch http://localhost:7000 in your browser.

Default username is ar and pasword ar with a preconfigured client already set up.

...in case you'd like to start fresh:

rm db.sqlite3
make initdb

...then head over to Django admin and create your first client.

Tests

make test 

About

Working example of django-rest-framework using OAuth2Authentication (django-oauth2-provider) and SessionAuthentication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages