You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2023. It is now read-only.
ToopherPython is a Toopher API library that simplifies the task of interfacing with the Toopher API from Python code. This project wrangles all the required OAuth and JSON functionality so you can focus on just using the API.
3
+
ToopherPython is a Toopher API library that simplifies the task of interfacing with the Toopher API from Python code.
4
+
This project wrangles all the dependency libraries and handles the required OAuth and JSON functionality so you can
5
+
focus on just using the API.
4
6
5
7
### Python Version
6
8
* 2.6
@@ -12,20 +14,23 @@ Make sure you visit [https://dev.toopher.com](https://dev.toopher.com) to get ac
12
14
## ToopherApi Workflow
13
15
14
16
### Step 1: Pair
15
-
Before you can enhance your website's actions with Toopher, your customers will need to pair their mobile device's Toopher app with your website. To do this, they generate a unique pairing phrase from within the app on their mobile device. You will need to prompt them for a pairing phrase as part of the Toopher enrollment process. Once you have a pairing phrase, just send it to the Toopher web service and we'll return a pairing ID that you can use whenever you want to authenticate an action for that user.
17
+
Before you can enhance your website's actions with Toopher, your customers will need to pair their mobile device's Toopher app with your website. To do this, they generate a unique pairing phrase from within the app on their mobile device. You will need to prompt them for a pairing phrase as part of the Toopher enrollment process. Once you have a pairing phrase, just send it to the Toopher web service along with your requester credentials and we'll return a pairing ID that you can use whenever you want to authenticate an action for that user.
16
18
17
19
```python
18
20
import toopher
19
21
20
-
# Create an API Object Using Your Credentials
22
+
# Create an API object using your credentials
21
23
api = toopher.ToopherApi("<your consumer key>", "<your consumer secret>")
22
24
23
25
# Step 1 - Pair with their mobile device's Toopher app
You have complete control over what actions you want to authenticate using Toopher (for example: logging in, changing account information, making a purchase, etc.). Just send us the user's pairing ID and a name for the terminal they're using and we'll make sure they actually want it to happen.
30
+
You have complete control over what actions you want to authenticate using Toopher (logging in, changing account
31
+
information, making a purchase, etc.). Just send us the username or pairing ID and we'll make sure they actually want it to happen
32
+
. You can also choose to provide the following optional parameters: terminal name, requester specified ID and
33
+
action name (*default: "Log in"*).
29
34
30
35
```python
31
36
# Step 2 - Authenticate a log in
@@ -38,18 +43,19 @@ if not authentication_request.pending and authentication_request.granted:
38
43
```
39
44
40
45
## ToopherIframe Workflow
46
+
41
47
### Step 1: Embed a request in an IFRAME
42
48
1. Generate an authentication URL by providing a username.
43
49
2. Display a webpage to your user that embeds this URL within an `<iframe>` element.
@@ -74,7 +80,8 @@ if authentication_request_granted:
74
80
If any request runs into an error a `ToopherApiError` will be thrown with more details on what went wrong.
75
81
76
82
### Demo
77
-
Check out `demo.py` for an example program that walks you through the whole process! Just download the contents of this repo, make sure you have the dependencies listed above installed, and then run it like-a-this:
83
+
Check out `demo.py` for an example program that walks you through the whole process! Just download the contents of
84
+
this repo, make sure you have the dependencies installed, and run the command below:
0 commit comments