| author | durandn |
| Tue, 12 Apr 2016 11:59:08 +0200 | |
| changeset 65 | c765c06f0b91 |
| parent 6 | 39cecdd5260e |
| child 90 | 00c9bb0f6f37 |
| permissions | -rw-r--r-- |
|
6
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
1 |
# METAEDUCATION DJANGO APP |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
2 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
3 |
# INSTALLATION |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
4 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
5 |
$ mkvirtualenv mtdc_renkan_env |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
6 |
$ pip install -r requirement.txt |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
7 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
8 |
# CONFIGURATION |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
9 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
10 |
Configure dev.py.tmpl according to your environment and rename it dev.py |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
11 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
12 |
# TEST AND DEV |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
13 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
14 |
$ Python manage.py runserver 0.0.0.0:8001 |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
15 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
16 |
It is important to run the server on localhost:8001 if you are going to test with the flask OAuth server in the /oauth/ folder |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
17 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
18 |
Then we need to configure the Django-Allauth Social App. |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
19 |
You will need a Client ID and Client Secret registered by the OAuth server that you will interact with. |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
20 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
21 |
For this you need to log into the admin panel (after creating an admin superuser), and add an entry in the "Social Application" table. |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
22 |
You must assign a site to Renkan Social Application, which will be the base URL of Renkan (on test and dev, 127.0.0.1:8001) |