README: complete document to use authentic2 as an OAuth2 IdP
This commit is contained in:
parent
1d6b540adb
commit
307b0638fa
69
README
69
README
|
@ -1,57 +1,36 @@
|
|||
How to start
|
||||
============
|
||||
|
||||
To work on portail-citoyen just execute the following lines (command
|
||||
To work on portail-citoyen2 just execute the following lines (command
|
||||
to launch start with $, other lines are expected output)::
|
||||
|
||||
$ pip install -r ./requirements.txt
|
||||
$ cp local_settings.py.example local_settings.py
|
||||
$ ./portail-citoyen syncdb --all # you will be asked to create a new admin user
|
||||
Syncing...
|
||||
Creating tables ...
|
||||
[ snipped ]
|
||||
Creating table cmsplugin_a2servicelistplugin
|
||||
Creating table registration_registrationprofile
|
||||
|
||||
You just installed Django's auth system, which means you don't have any superusers defined.
|
||||
Would you like to create one now? (yes/no): yes
|
||||
Username: admin
|
||||
First name: admin
|
||||
Last name: admin
|
||||
E-mail address: admin@coin.org
|
||||
Password:
|
||||
Password (again):
|
||||
Superuser created successfully.
|
||||
Installing custom SQL ...
|
||||
Installing indexes ...
|
||||
Installed 2 object(s) from 1 fixture(s)
|
||||
|
||||
Synced:
|
||||
> django.contrib.auth
|
||||
[ snipped ]
|
||||
> registration
|
||||
|
||||
Not synced (use migrations):
|
||||
-
|
||||
(use ./manage.py migrate to migrate these)
|
||||
$ ./portail-citoyen migrate --fake
|
||||
[ lots of migrations running ]
|
||||
$ ./portail-citoyen runserver
|
||||
Validating models...
|
||||
|
||||
0 errors found
|
||||
April 12, 2013 - 16:04:50
|
||||
Django version 1.5.1, using settings 'compte_agglo_montpellier.settings'
|
||||
Development server is running at http://127.0.0.1:8000/
|
||||
Quit the server with CONTROL-C.
|
||||
$ ./start.sh
|
||||
|
||||
The application is now usable at http://localhost:8000/
|
||||
|
||||
IdP config
|
||||
----------
|
||||
On subsequent runs, do:
|
||||
|
||||
The environment variable AUTHENTIC2_URL should be defined project environment
|
||||
in order to specify the address of Authentic providing OAuth2 authentication
|
||||
$ ./run.sh
|
||||
|
||||
Using with authentic2 as a source of social accounts
|
||||
----------------------------------------------------
|
||||
|
||||
Install authentic2 and authentic2-idp-oauth2, then set the AUTHENTIC2_URL
|
||||
environment variable to the URL of the homepage of authentic2.
|
||||
|
||||
On Authentic2 you must create an A2Client object on
|
||||
http://authentic/admin/authentic2_idp_oauth2/a2client/add/ with the following settings:
|
||||
|
||||
URL: http://localhost:8000/
|
||||
Redirect URL: http://localhost:8000/accounts/authentic2/login/callback/
|
||||
Client type: confidential
|
||||
|
||||
authentic2 will generate a client id and a client secret for you.
|
||||
|
||||
On portail-citoyen2 you must create a SocialApp object using the client id and
|
||||
client secret your generated in authentic2 on:
|
||||
|
||||
http://localhost:8000/admin/socialaccount/socialapp/add/
|
||||
|
||||
|
||||
Settings
|
||||
|
|
Reference in New Issue