summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorZiad Sawalha <github@highbridgellc.com>2011-04-15 02:35:16 -0500
committerZiad Sawalha <github@highbridgellc.com>2011-04-15 02:35:16 -0500
commit49dee35b10643d89e30cd20b9a5243c2fed112c5 (patch)
treec59ecf070b8e4d953ca37e2044f9c815228bbfa7 /README
parentd7e4a6b3fe5dde811b5af73938e58a17d1842548 (diff)
Updates to identity.py and README
Diffstat (limited to 'README')
-rw-r--r--README32
1 files changed, 32 insertions, 0 deletions
diff --git a/README b/README
index 30a219e6..536ad2df 100644
--- a/README
+++ b/README
@@ -3,3 +3,35 @@ Description
Dependencies:
* Install SQLite3
+
+Setup:
+Install http://pypi.python.org/pypi/setuptools
+sudo easy_install PasteDeploy
+sudo easy_install simplejson
+sudo easy_install -U bottle
+
+Tables:
+CREATE TABLE tenants(tenant_id INTEGER, tenant_desc varchar(255), tenant_enabled INTEGER, PRIMARY KEY(tenant_id ASC));
+
+Issues:
+bottle not in path on Mac OS X (added exception handling to default path)
+
+Demo:
+Start server:
+python identity.py
+
+Add Tenant:
+curl -i -X POST -H "Content-Type: application/json" -d '{"tenant": { "id": "123456", "description": "A description ...", "enabled": true } }' http://localhost:8080/tenants
+
+Get token:
+curl -i -X POST -H "Content-Type: application/json" -d '{"username": "john", "password": "secret" }' http://localhost:8080/tokens
+
+Validate good token:
+curl -i -X GET -H "Content-Type: application/json" http://localhost:8080/token/abcdefghijklmnopqrstuvwxy
+
+Validate bad token:
+curl -i -X GET -H "Content-Type: application/json" http://localhost:8080/token/abcdefghijklmnopqrstuvbad
+
+
+
+