This commit is contained in:
juanifioren 2015-02-27 17:40:54 -03:00
commit 08c81fef0b
2 changed files with 16 additions and 10 deletions

View file

@ -2,9 +2,9 @@
Django OIDC Provider Django OIDC Provider
#################### ####################
OpenID Connect Provider implementation for Django. Django OIDC Provider can help you providing out of the box all the endpoints, data and logic needed to add OpenID Connect capabilities to your Django projects.
Read docs for more info. https://github.com/juanifioren/django-oidc-provider/wiki Read docs for more info. https://github.com/juanifioren/django-oidc-provider/blob/master/doc.md
************* *************
Running tests Running tests

22
doc.md
View file

@ -12,6 +12,7 @@ Before getting started there are some important things that you should know:
# Table Of Contents # Table Of Contents
- [Requirements](#requirements)
- [Installation](#installation) - [Installation](#installation)
- [Settings](#settings) - [Settings](#settings)
- [Users And Clients](#users-and-clients) - [Users And Clients](#users-and-clients)
@ -19,6 +20,11 @@ Before getting started there are some important things that you should know:
- [Server Endpoints](#server-endpoints) - [Server Endpoints](#server-endpoints)
- [Claims And Scopes](#claims-and-scopes) - [Claims And Scopes](#claims-and-scopes)
## Requirements
- Python 2.7.*.
- Django 1.7.*.
## Installation ## Installation
Install the package using pip. Install the package using pip.
@ -26,7 +32,7 @@ Install the package using pip.
```bash ```bash
pip install django-oidc-provider pip install django-oidc-provider
# Or latest code from repo. # Or latest code from repo.
pip install git+https://github.com/juanifioren/django-oidc-provider.git#egg=openid_provider pip install git+https://github.com/juanifioren/django-oidc-provider.git#egg=oidc_provider
``` ```
Add it to your apps. Add it to your apps.
@ -39,7 +45,7 @@ INSTALLED_APPS = (
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'openid_provider', 'oidc_provider',
# ... # ...
) )
``` ```
@ -49,7 +55,7 @@ Add the provider urls.
```python ```python
urlpatterns = patterns('', urlpatterns = patterns('',
# ... # ...
url(r'^openid/', include('openid_provider.urls', namespace='openid_provider')), url(r'^openid/', include('oidc_provider.urls', namespace='oidc_provider')),
# ... # ...
) )
``` ```
@ -70,10 +76,10 @@ LOGIN_URL = '/accounts/login/'
# OPTIONAL SETTINGS. # OPTIONAL SETTINGS.
DOP_CODE_EXPIRE = 60*10 # 10 min. OIDC_CODE_EXPIRE = 60*10 # 10 min.
DOP_EXTRA_SCOPE_CLAIMS = MyAppScopeClaims, OIDC_EXTRA_SCOPE_CLAIMS = MyAppScopeClaims,
DOP_IDTOKEN_EXPIRE = 60*10, # 10 min. OIDC_IDTOKEN_EXPIRE = 60*10, # 10 min.
DOP_TOKEN_EXPIRE = 60*60 # 1 hour. OIDC_TOKEN_EXPIRE = 60*60 # 1 hour.
``` ```
## Users And Clients ## Users And Clients
@ -221,4 +227,4 @@ See how we create our own scopes using the convention:
If a field is empty or ``None`` will be cleaned from the response. If a field is empty or ``None`` will be cleaned from the response.
**Don't forget to add your class into your app settings.** **Don't forget to add your class into your app settings.**