E58A explained the 3 parameters in the api · ptarjan/python-oauth@185aca0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 185aca0

Browse files
committed
explained the 3 parameters in the api
1 parent 21f06db commit 185aca0

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,31 @@
22

33
This library was born out of pain while using the existing python oauth libraries. It simply makes some helper classes to reduce the mistakes that are made with using the existing library.
44

5-
Here is how to do 3-legged OAuth in Google App Engine.
5+
# 3 Methods to care about
6+
7+
## def start():
8+
9+
Starts the process with your provider. @return (user, url). Give the `user.get_key()` string as a cookie, and redirect them to the url.
10+
11+
## def verify(user, token, verifier):
12+
13+
Verifies the user authorized your correctly. The parameters are
14+
* user - The `user.get_key()` from the `start()` method
15+
* token - The GET parameter `oauth_token`
16+
* verifier - The GET parameter `oauth_verifier`
17+
18+
## def fetch(url, user):
19+
20+
Does an oauth authenticated fetch. @return a file-like object from `urllib2.urlopen()`. The paremters
21+
22+
* url - The remote url to request
23+
* user - The `user.get_key()` from the `start()` method
24+
25+
And that's it!
26+
27+
# Examples
28+
29+
## 3-legged OAuth in Google App Engine
630

731
$ cp google_appengine/new_project_template cool_oauth_app
832
$ cd cool_oauth_app

0 commit comments

Comments
 (0)
0