Imported Google Group message.
Sender:Martin Buhr
.
Date:Thursday, 17 September 2015 11:40:39 UTC+1.
Hi Ian,
I installed our quick start just to make sure I wasn’t going mad, I’ve documented the whole flow below - this is confirmed to work (you might want to destroy your mongoDB and recreate though), this in quite long, but here goes:
- Create the org:
POST /admin/organisations/ HTTP/1.1
Host: 192.168.99.100:3000
admin-auth: 12345
Content-Type: application/json
Cache-Control: no-cache
{ “owner_name”:“test-org”, “owner_slug”:“test-slug”, “cname_enabled”:false }
{
“Status”: “OK”,
“Message”: “Org created”,
“Meta”: “55fa95889395390001000001”
}
- Create the Super user:
POST /admin/users/ HTTP/1.1
Host: 192.168.99.100:3000
admin-auth: 12345
Content-Type: application/json
Cache-Control: no-cache
{ “first_name”:“Super”, “last_name”:“User”, “email_address":"[email protected]”, “password”:“”, “org_id”:“”, “active”:true }
{
“Status”: “OK”,
“Message”: “16c92076bd784da073ccb586d169c5fc”,
“Meta”: “”
}
- Create the Org user and attach to Org ID:
POST /admin/users/ HTTP/1.1
Host: 192.168.99.100:3000
admin-auth: 12345
Content-Type: application/json
Cache-Control: no-cache
{ “first_name”:“Regular”, “last_name”:“User”, “email_address":"[email protected]”, “password”:“empty”, “org_id”:“55fa95889395390001000001”, “active”:true }
{
“Status”: “OK”,
“Message”: “907ca683c0314bca6d995a64bb406358”,
“Meta”: “”
}
- List the users so far (SU Token):
GET /api/users/ HTTP/1.1
Host: 192.168.99.100:3000
Authorization: 16c92076bd784da073ccb586d169c5fc
Content-Type: application/json
Cache-Control: no-cache
{
“users”: [
{
“api_model”: {},
“first_name”: “Super”,
“last_name”: “User”,
“email_address”: “[email protected]”,
“password”: “”,
“org_id”: “”,
“active”: true,
"id": "55fa95acc47445dc8a42fce7",
"access_key": "16c92076bd784da073ccb586d169c5fc"
},
{
"api_model": {},
"first_name": "Regular",
"last_name": "User",
"email_address": "[email protected]",
"password": "empty",
"org_id": "55fa95889395390001000001",
"active": true,
"id": "55fa9605c47445dc8a42fce8",
"access_key": "907ca683c0314bca6d995a64bb406358"
}
],
"pages": 0
}
- Reset the users password (we need their user ID for that), either with the SU’s access key, or the user we just created:
POST /api/users/55fa9605c47445dc8a42fce8/actions/reset HTTP/1.1
Host: 192.168.99.100:3000
Authorization: 16c92076bd784da073ccb586d169c5fc
Content-Type: application/json
Cache-Control: no-cache
{“new_password”:“test123”}
{
“Status”: “OK”,
“Message”: “User password updated”,
“Meta”: “”
}
Then log in at http://tyk.docker:3000/
Login should work (u:[email protected] p:test123).
I’m not sure what is happening on your instance, but the above flow was replicated twice - suggest using a clean setup (remove your containers and load them again).
Let me know how you get on.
Cheers,
Martin