{"info":{"_postman_id":"a96a730b-3ded-4c2a-80b8-b6fce26fa9c8","name":"Simple JWT API","description":"<html><head></head><body><p>This is a simple API that creates a JSON Web Token (JWT) and decodes it to demonstrate the Containerization and Orchestration of a simple API.</p>\n<h1 id=\"base-url\">Base URL</h1>\n<p>When running locally with the built in flask server, the base url is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">http://127.0.0.1:5000/\n</code></pre>\n<p>When running in a container with a gunicorn server, the base url is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">http://127.0.0.1/\n</code></pre>\n<p>When running as part of a Kubernetes cluster, the base url is whatever external IP is configured or assigned.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Base URL","slug":"base-url"}],"owner":"10868159","collectionId":"a96a730b-3ded-4c2a-80b8-b6fce26fa9c8","publishedId":"SzfCVS1d","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-04-28T03:17:42.000Z"},"item":[{"name":"Health Check","id":"d7d0fef9-662d-4778-b1a1-b696e8ed794e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"/","description":"<p>A simple health check that returns the str \"Healthy\"</p>\n","urlObject":{"path":[""],"query":[],"variable":[]}},"response":[{"id":"cca54768-c32c-4550-b047-6f2d47aae164","name":"Successful Request","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:5000/"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"\"Healthy\""}],"_postman_id":"d7d0fef9-662d-4778-b1a1-b696e8ed794e"},{"name":"Create JWT","id":"a8d92e2c-d4e2-4d85-8785-ab7b9780dd06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": {{email}},\n    \"password\": {{password}}\n}"},"url":"/auth","description":"<p>Create a JWT based on the provided email, password, and secret</p>\n<p>Parameters:</p>\n<ul>\n<li>email (str): Email of the user for the JWT</li>\n<li>password (str): Password of the user for the JWT</li>\n</ul>\n","urlObject":{"path":["auth"],"query":[],"variable":[]}},"response":[{"id":"51752672-6da4-4059-83a9-b2b51f98fe77","name":"Successful Request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"test@example.com\",\n    \"password\": \"Password1!\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/auth"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODkxNzMyNTIsIm5iZiI6MTU4Nzk2MzY1MiwiZW1haWwiOiJ0ZXN0QGV4YW1wbGUuY29tIn0.KQV5QHFsq4AG_W4JCb2seDwUFRkdXwYekjnGfG2qsFw\"\n}"}],"_postman_id":"a8d92e2c-d4e2-4d85-8785-ab7b9780dd06"},{"name":"JWT Contents","id":"6b81111f-b700-467f-8a61-57ba528b32b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}","type":"text"}],"url":"/contents","description":"<p>Get the non-secret part of a user token</p>\n<p>Parameters:</p>\n<ul>\n<li>token (str): A JWT Bearer token in Authorization header</li>\n</ul>\n","urlObject":{"path":["contents"],"query":[],"variable":[]}},"response":[{"id":"1300ca74-0538-40c3-b777-176e9fb015cd","name":"Successful Request","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODkxNzMyNTIsIm5iZiI6MTU4Nzk2MzY1MiwiZW1haWwiOiJ0ZXN0QGV4YW1wbGUuY29tIn0.KQV5QHFsq4AG_W4JCb2seDwUFRkdXwYekjnGfG2qsFw","type":"text"}],"url":"http://127.0.0.1:5000/contents"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"test@example.com\",\n    \"exp\": 1587772932,\n    \"nbf\": 1586563332\n}"}],"_postman_id":"6b81111f-b700-467f-8a61-57ba528b32b7"}]}