Skip to content

Django OIDC Authentication Hub

Wendy Edwards edited this page Oct 29, 2015 · 6 revisions

This project will provide an OpenID Connect authentication hub for Coders for Sanders applications. It should work at a basic level now with user/password authentication.

The primary goal is to replace standard Django user/pass authentication with Django-allauth custom authentication backend to allow users to log in via social media. Other goals include adding support for a private claim so that the server will return group information, and (possibly) adding an endpoint for dynamic client registration.

To run the project, first create a virtual environment. In Python 2.x, you do it like this:

$ virtualenv project_env

Then use your virtual environment.

$ source project_env/bin/activate

cd into the project directory

Then install the requirements.

$ pip install -r requirements.txt

Set up the database

$ python manage.py migrate

Create RSA key

$ python manage.py creatersakey

Set up your admin account

$ python manage.py createsuperuser

Finally run server

$ python manage.py runserver

You can visit the project at http://localhost:8000 . To create users, log in to the admin interface. You should then be able to use the logins and passwords you created to log in.

References

https://github.com/juanifioren/django-oidc-provider

https://github.com/pennersr/django-allauth

Clone this wiki locally