-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
42 lines (27 loc) · 1.61 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
This is a OAuth2.0 implementation for BITSAA as a part of design project of BITS Pilani.
You must have installed
* Python 2.7 or 3.3
* Django > 1.4
* django-oauth-toolkit ( use pip install django-oauth-toolkit )
* django-cors-headers ( pip install django-cors-headers )
Create databases using the two sql files provided.
The following convention has been followed : username=password
root and anubhav are the most used username.
only anubhav is registered user on flipkart.
anubhav and suresh are registered users on bitsaa.
bitsaa and flipkart are two indivisual django projects. The goal is to allow flipkart to fetch user details from bitsaa using OAuth authentication.
We assume you are running bitsaa on http://localhost:8000 . To test authentication code and token generation:
* login to bitsaa ( http://localhost:8000/login )
username : anubhav
password : anubhav
* goto the following link
http://localhost:8000/o/authorize?state=random_state_string&client_id=v%2CrNLDJ%5Es%2A.%5C8Ilnafvu%25rRZ%5DB%27%28%5DZ%5B%2AdLpFZ%3FAN&response_type=code
* click on authorize
* in the form presented fill in the following:
token url : http://localhost:8000/o/token/
client id : v,rNLDJ^s*.\8Ilnafvu%rRZ]B'(]Z[*dLpFZ?AN
client secret : ,|/'kJM2@ j#)ja_(6X%}^a;hl;qbzNQEnN#,fm]$_[RQK"!4P[Fh}s*@Ar$(lSk Mf=bL)G/n Isn.us6-.\>0b$C,`M>q2K*nf9_W)\A)mp*MG"6!&P!87v{g])p>*
* The access token and refresh token generated by the autherization server are viewed. You can obtain more refresh tokens by filling the form with the same details as in previous steps.
TODO:
Automate this step to be called by flipkart instead.
FIX the bugs.