{
	"info": {
		"_postman_id": "669fdd50-9e2e-4941-addd-bb34d367803e",
		"name": "B3infoServer",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Subscribe",
			"item": [
				{
					"name": "/logout",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "49420fe9-c69f-4b28-a72a-3344176ea23b",
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "http://{{HOST}}/logout",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"logout"
							]
						}
					},
					"response": []
				},
				{
					"name": "/login Unauthorized",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "46400b54-a62e-4fe9-aaf7-e2911722d7ad",
								"exec": [
									"",
									"pm.test(\"Status code is 401\", function () {",
									"    pm.response.to.have.status(401);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"type": "text",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"username\": \"newUser\",\n    \"password\": \"newPassword\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://{{HOST}}/login",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "/subscribe",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "46400b54-a62e-4fe9-aaf7-e2911722d7ad",
								"exec": [
									"",
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"});",
									"pm.test(\"Body matches string\", function () {",
									"    pm.expect(pm.response.text()).to.include(\"OK\");",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"type": "text",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"username\": \"newUser\",\n    \"password\": \"newPassword\",\n    \"email\": \"infob3@yopmail.com\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://{{HOST}}/subscribe",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"subscribe"
							]
						}
					},
					"response": []
				},
				{
					"name": "/login",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "46400b54-a62e-4fe9-aaf7-e2911722d7ad",
								"exec": [
									"",
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"});",
									"pm.test(\"Body matches string\", function () {",
									"    pm.expect(pm.response.text()).to.include(\"OK\");",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"type": "text",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"username\": \"newUser\",\n    \"password\": \"newPassword\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://{{HOST}}/login",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"login"
							]
						}
					},
					"response": []
				}
			],
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "8186213a-f965-4f14-a45f-68336fd4bd83",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"id": "cbec059f-8654-4362-9b32-95d17aa30c39",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Auth",
			"item": [
				{
					"name": "/logout",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "49420fe9-c69f-4b28-a72a-3344176ea23b",
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "http://{{HOST}}/logout",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"logout"
							]
						}
					},
					"response": []
				},
				{
					"name": "/status (visiteur)",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "0b458ccc-9fc3-49bd-a9e6-194bcdbab346",
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"});",
									"pm.test(\"Body matches string\", function () {",
									"    pm.expect(pm.response.text()).to.include(\"Visiteur\");",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://{{HOST}}/status",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"status"
							]
						}
					},
					"response": []
				},
				{
					"name": "/login Unauthorized",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "46400b54-a62e-4fe9-aaf7-e2911722d7ad",
								"exec": [
									"",
									"pm.test(\"Status code is 401\", function () {",
									"    pm.response.to.have.status(401);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"type": "text",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"username\": \"theuser\",\n    \"password\": \"wrongpassword\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://{{HOST}}/login",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "/login Bad Request",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "46400b54-a62e-4fe9-aaf7-e2911722d7ad",
								"exec": [
									"",
									"pm.test(\"Status code is 400\", function () {",
									"    pm.response.to.have.status(400);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"type": "text",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n\t\"wrongkey\": \"anyvalue\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://{{HOST}}/login",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "/login",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "46400b54-a62e-4fe9-aaf7-e2911722d7ad",
								"exec": [
									"",
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"});",
									"pm.test(\"Body matches string\", function () {",
									"    pm.expect(pm.response.text()).to.include(\"OK\");",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"username\": \"theuser\",\n    \"password\": \"thepassword\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "http://{{HOST}}/login",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "/status (Authentifié)",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "bee86d2d-c026-4047-8012-508f2dc3ecb1",
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"});",
									"pm.test(\"Body matches string\", function () {",
									"    pm.expect(pm.response.text()).to.include(\"Authentifié\");",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "http://{{HOST}}/status",
							"protocol": "http",
							"host": [
								"{{HOST}}"
							],
							"path": [
								"status"
							]
						}
					},
					"response": []
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "/random",
			"event": [
				{
					"listen": "test",
					"script": {
						"id": "d7d768c8-15ce-4f8b-8708-bfc3ab4f62d7",
						"exec": [
							"pm.test(\"Status code is 200\", function () {",
							"    pm.response.to.have.status(200);",
							"});",
							"pm.test(\"Body matches string\", function () {",
							"    pm.expect(pm.response.text().startsWith('0.')).to.be.true;",
							"});"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "http://{{HOST}}/random",
					"protocol": "http",
					"host": [
						"{{HOST}}"
					],
					"path": [
						"random"
					]
				}
			},
			"response": []
		}
	],
	"protocolProfileBehavior": {}
}