This is an example of OAuth 2 Server.
Find more details on http://lepture.com/en/2013/create-oauth-server
$ pip install -r requirements.txt
-
Start your provider server with:
$ python app.py
-
Visit http://127.0.0.1:5000/ and fill a username.
-
And then visit http://127.0.0.1:5000/client
-
Take the client key and client secret, and modify our client.py script with the key and secret. Specifically update
CLIENT_ID
andCLIENT_SECRET
variables on lines 5-6. -
Start the client server with:
$ python client.py
-
Visit http://localhost:8000, everything should work correctly. We will be redirected to a confirm page, if we choose yes, client will obtain a pair of access token and secret.
-
Finally, if you visit http://localhost:8000 you can access the authorized data: