{
	"info": {
		"_postman_id": "3406f839-b0d8-46db-95c5-5840bc0177d0",
		"name": "Identity",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "13863230"
	},
	"item": [
		{
			"name": "Tenants",
			"item": [
				{
					"name": "Find Tenants",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/tenants",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants"
							],
							"query": [
								{
									"key": "active",
									"value": "true",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Tenant By Id",
					"request": {
						"auth": {
							"type": "bearer"
						},
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/tenants/21bbc2d6-0986-43c7-8691-2b59dc3282b8",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants",
								"21bbc2d6-0986-43c7-8691-2b59dc3282b8"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Tenant By Label",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/tenants/label/Best-co",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants",
								"label",
								"Best-co"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Tenant",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"My Best Tenant Company\",\n  \"label\": \"Best-co\",\n  \"auth0ConnectionId\": \"conId_1232323\",\n  \"identityProviderName\": \"BestCo, Google Account\"\n}"
						},
						"url": {
							"raw": "{{identity}}/tenants",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants"
							]
						}
					},
					"response": []
				},
				{
					"name": "Activate/Deactivate Tenant",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{identity}}/tenants/21bbc2d6-0986-43c7-8691-2b59dc3282b8/activate",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants",
								"21bbc2d6-0986-43c7-8691-2b59dc3282b8",
								"activate"
							]
						}
					},
					"response": []
				},
				{
					"name": "Add Idnetity Provider to Identity",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"auth0ConnectionId\": \"con_99888\",\n  \"identityProviderName\": \"BestCo User Database\"\n}"
						},
						"url": {
							"raw": "{{identity}}/tenants/21bbc2d6-0986-43c7-8691-2b59dc3282b8/identity-providers",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants",
								"21bbc2d6-0986-43c7-8691-2b59dc3282b8",
								"identity-providers"
							]
						}
					},
					"response": []
				}
			],
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			]
		},
		{
			"name": "Identities",
			"item": [
				{
					"name": "Find Identities",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"disabled": true
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "http://localhost:8091/identities?active=true&tenantId=21bbc2d6-0986-43c7-8691-2b59dc3282b8",
							"protocol": "http",
							"host": [
								"localhost"
							],
							"port": "8091",
							"path": [
								"identities"
							],
							"query": [
								{
									"key": "active",
									"value": "true"
								},
								{
									"key": "tenantId",
									"value": "21bbc2d6-0986-43c7-8691-2b59dc3282b8"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Identity By Id",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/identities/05ef9a2f-aa5e-4d36-9e90-ea7aec85e225",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identities",
								"05ef9a2f-aa5e-4d36-9e90-ea7aec85e225"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Identity By Mapping",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/identities/mapping/google-oauth2|110732328901226042218/4fd1e9bc-562a-45cd-b6ab-904c902f756d",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identities",
								"mapping",
								"google-oauth2|110732328901226042218",
								"4fd1e9bc-562a-45cd-b6ab-904c902f756d"
							]
						},
						"description": "/identities/mapping/{auth0UserId}/{identityProviderId}"
					},
					"response": []
				},
				{
					"name": "Create Identity",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Russell Allen (NF.io)\",\n  \"email\":\"anEmailAddress@bob.com\",\n  \"tenantId\": \"21bbc2d6-0986-43c7-8691-2b59dc3282b8\"\n}"
						},
						"url": {
							"raw": "{{identity}}/identities",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identities"
							]
						}
					},
					"response": []
				},
				{
					"name": "Activate/Deactivate Identity",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{identity}}/identities/05ef9a2f-aa5e-4d36-9e90-ea7aec85e225/activate",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identities",
								"05ef9a2f-aa5e-4d36-9e90-ea7aec85e225",
								"activate"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Identity Info",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Jumpin Jack Flash\",\n  \"email\": null\n}"
						},
						"url": {
							"raw": "{{identity}}/identities/05ef9a2f-aa5e-4d36-9e90-ea7aec85e225",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identities",
								"05ef9a2f-aa5e-4d36-9e90-ea7aec85e225"
							]
						}
					},
					"response": []
				},
				{
					"name": "Map Auth0 User to Identity",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"auth0UserId\": \"auth0|5abab49e0be6766e041776e7\",\n  \"identityProviderId\": \"6494ae5f-8972-4625-b2ca-d1529125aaa1\"\n}"
						},
						"url": {
							"raw": "{{identity}}/identities/2a7b0840-b155-4498-9ca1-226347e9e840/mapping",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identities",
								"2a7b0840-b155-4498-9ca1-226347e9e840",
								"mapping"
							]
						}
					},
					"response": []
				}
			],
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			]
		},
		{
			"name": "Invitations",
			"item": [
				{
					"name": "Find Invitations",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"disabled": true
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/invitations?toTenantId=21bbc2d6-0986-43c7-8691-2b59dc3282b8",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations"
							],
							"query": [
								{
									"key": "fromIdentityId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								},
								{
									"key": "toTenantId",
									"value": "21bbc2d6-0986-43c7-8691-2b59dc3282b8"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Invitation By ID",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/invitations/75690163-7b5b-4164-aaa7-7a2a134ff633",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations",
								"75690163-7b5b-4164-aaa7-7a2a134ff633"
							],
							"query": [
								{
									"key": "active",
									"value": "true",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Invitation",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"invitationUrl\": \"https://google.com\",\n  \"invitedEmailAddress\": \"allenru@gmail.com\",\n  \"toTenantId\": \"bb21c1fa-440c-11e8-8b41-0242ac130002\"\n}"
						},
						"url": {
							"raw": "{{identity}}/invitations",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Invitation",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{identity}}/invitations/21bbc2d6-0986-43c7-8691-2b59dc3282b8/decline",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations",
								"21bbc2d6-0986-43c7-8691-2b59dc3282b8",
								"decline"
							]
						}
					},
					"response": []
				},
				{
					"name": "Accept/Decline Invitation copy",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{identity}}/invitations/MR6slWoOHS6Wm8qKoacskbW9evyJAVXiSoeC/decline",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations",
								"MR6slWoOHS6Wm8qKoacskbW9evyJAVXiSoeC",
								"decline"
							],
							"query": [
								{
									"key": "active",
									"value": "true",
									"disabled": true
								}
							]
						}
					},
					"response": []
				}
			],
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			]
		},
		{
			"name": "Identity Permissions",
			"item": [
				{
					"name": "Find Identity Permissions",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"disabled": true
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/identity-permissions",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identity-permissions"
							],
							"query": [
								{
									"key": "identityId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								},
								{
									"key": "serviceId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								},
								{
									"key": "tenantId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Identity Permission By Id",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"disabled": true
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/identity-permissions/33d4480f-f40d-49df-94d9-ea210ae04924",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identity-permissions",
								"33d4480f-f40d-49df-94d9-ea210ae04924"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Identity Permission",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"identityId\": \"33d4480f-f40d-49df-94d9-ea210ae04924\",\n  \"serviceId\": \"33d4480f-f40d-49df-94d9-ea210ae04924\",\n  \"tenantId\": \"33d4480f-f40d-49df-94d9-ea210ae04924\"\n}"
						},
						"url": {
							"raw": "{{identity}}/identity-permissions",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identity-permissions"
							]
						}
					},
					"response": []
				},
				{
					"name": "Delete Identity Permission",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{identity}}/identity-permissions/33d4480f-f40d-49df-94d9-ea210ae04924",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identity-permissions",
								"33d4480f-f40d-49df-94d9-ea210ae04924"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Identity Operations",
			"item": [
				{
					"name": "Find Identity Operations",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"disabled": true
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/operations",
							"host": [
								"{{identity}}"
							],
							"path": [
								"operations"
							],
							"query": [
								{
									"key": "identityId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								},
								{
									"key": "serviceId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								},
								{
									"key": "tenantId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Identity Operation By Id",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"disabled": true
							},
							{
								"key": "Authorization",
								"value": "Bearer {{token}}"
							}
						],
						"url": {
							"raw": "{{identity}}/operations/88aac108-7cb6-446b-9eaf-8dbf102a7660",
							"host": [
								"{{identity}}"
							],
							"path": [
								"operations",
								"88aac108-7cb6-446b-9eaf-8dbf102a7660"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Login Flow",
			"item": [
				{
					"name": "Initiate Interactive Authorization",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"tenantLabel\":\"Not Real\"\n}"
						},
						"url": {
							"raw": "{{identity}}/tenants/authorize",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants",
								"authorize"
							],
							"query": [
								{
									"key": "identityId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								},
								{
									"key": "serviceId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								},
								{
									"key": "tenantId",
									"value": "33d4480f-f40d-49df-94d9-ea210ae04924",
									"disabled": true
								}
							]
						},
						"description": "Send the name of the tenant you wish to login to.  Copy the nfToken value from the response, and apply it to the nfToken query parameter of the following url (depending on environment):\n\nhttps://net-foundry.auth0.com/authorize?audience=http://localhost:8080/&scope=&response_type=token&client_id=Nj0lD350qAw3jlV4DBBG8K7sXXT2SklU&redirect_uri=http://localhost:8080&nonce=n&state=s&nf_token=\n\nhttps://netfoundry-sandbox.auth0.com/authorize?audience=https://gateway.sandbox.netfoundry.io/&scope=&response_type=token&client_id=6WXzPe5Zu3Z0VjJDbwZcsZ71JeGRDJOp&redirect_uri=http://localhost:4200/callback&nonce=n&state=s&nfToken="
					},
					"response": []
				}
			]
		},
		{
			"name": "Invitation Flow",
			"item": [
				{
					"name": "Get Invitation By Key",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{identity}}/invitations/key/iZvvvywpPQkLTO0iRofkieVAEk6OOZ4meLKh",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations",
								"key",
								"iZvvvywpPQkLTO0iRofkieVAEk6OOZ4meLKh"
							]
						}
					},
					"response": []
				},
				{
					"name": "Decline Invitation By Key",
					"request": {
						"method": "PUT",
						"header": [],
						"url": {
							"raw": "{{identity}}/invitations/key/iZvvvywpPQkLTO0iRofkieVAEk6OOZ4meLKh/decline",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations",
								"key",
								"iZvvvywpPQkLTO0iRofkieVAEk6OOZ4meLKh",
								"decline"
							]
						}
					},
					"response": []
				},
				{
					"name": "Initiate Accept Invitation",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"intermediateReturnUrl\":\"http://localhost:8080?hi=something\"}"
						},
						"url": {
							"raw": "{{identity}}/invitations/key/ItnwThO4wTThnO6RMITkSWnYVLgnFOOYbTrS/accept-initiate",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations",
								"key",
								"ItnwThO4wTThnO6RMITkSWnYVLgnFOOYbTrS",
								"accept-initiate"
							]
						}
					},
					"response": []
				},
				{
					"name": "Accept Invitation",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"intermediateReturnUrl\":\"http://localhost:8080?hi=something\"}"
						},
						"url": {
							"raw": "{{identity}}/invitations/key/ItnwThO4wTThnO6RMITkSWnYVLgnFOOYbTrS/accept-initiate",
							"host": [
								"{{identity}}"
							],
							"path": [
								"invitations",
								"key",
								"ItnwThO4wTThnO6RMITkSWnYVLgnFOOYbTrS",
								"accept-initiate"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Registration Flow",
			"item": [
				{
					"name": "Get Identity Provider Types",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{identity}}/identity-provider-types",
							"host": [
								"{{identity}}"
							],
							"path": [
								"identity-provider-types"
							]
						}
					},
					"response": []
				},
				{
					"name": "Initiate Tenant Registration",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "",
								"value": "",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"tenantName\": \"ACME World Wide Global Bussiness, inc\",\n  \"tenantLabel\": \"ACME\",\n  \"identityProviders\": [\n  \t{\n  \t\t\"identityProviderName\": \"ACME Google Account\",\n  \t\t\"identityProviderTypeId\": \"474342c9-9d52-4da8-ba20-3ad04a9666b1\"\n  \t},\n  \t{\n  \t\t\"identityProviderName\": \"ACME user/pass\",\n  \t\t\"identityProviderTypeId\": \"91cff470-70d9-4e99-bfd8-3c7920d6a552\"\n  \t}\n  \t],\n  \t\"intermediateReturnUrl\": \"http://google.com\"\n}"
						},
						"url": {
							"raw": "{{identity}}/tenants/register-initiate",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants",
								"register-initiate"
							]
						}
					},
					"response": []
				},
				{
					"name": "Tenant Registration",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "",
								"value": "",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"registrationToken\": \"lkflFDSOFHFGFHFOGHDSFDSLFGHFGHOH\"\n}"
						},
						"url": {
							"raw": "{{identity}}/tenants/register",
							"host": [
								"{{identity}}"
							],
							"path": [
								"tenants",
								"register"
							]
						}
					},
					"response": []
				}
			]
		}
	]
}