{"info":{"_postman_id":"606b7760-1cc3-47b0-a655-40b11345e21d","name":"Go Auth-API","description":"<html><head></head><body><p>Endpoint documentation of an email/password authenticated API written in GoLang.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5420516","collectionId":"606b7760-1cc3-47b0-a655-40b11345e21d","publishedId":"2s8ZDa1gS4","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2023-01-22T21:04:33.000Z"},"item":[{"name":"Root API endpoint","id":"05eca35a-303a-4446-9195-06a47d845c0e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5050/api/v1","urlObject":{"path":["api","v1"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"05eca35a-303a-4446-9195-06a47d845c0e"},{"name":"Login","id":"50302211-9c57-4312-9536-4d22b32cda5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\" : \"alex@reddico.co.uk\",\n    \"password\" : \"password2\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/login","urlObject":{"path":["api","v1","login"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[{"id":"93ef7fde-df17-44af-b670-ece59bf98e9a","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\" : \"sjmc11@gmail.com\",\n    \"password\" : \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Sun, 22 Jan 2023 21:10:45 GMT"},{"key":"Content-Length","value":"231"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User token generated\",\n    \"token\": \"4dbbf0d1b118414c0e9525a6834f2510\",\n    \"user\": {\n        \"id\": 33,\n        \"name\": \"Gerald Callow\",\n        \"email\": \"sjmc11@gmail.com\",\n        \"role\": 1,\n        \"created_at\": 1674236993,\n        \"updated_at\": 1674419969,\n        \"last_login\": 1674421156\n    }\n}"}],"_postman_id":"50302211-9c57-4312-9536-4d22b32cda5e"},{"name":"Register","id":"ead0b138-acff-4883-a419-620bbc1e774f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Holly\",\n    \"last_name\": \"Yelland\",\n    \"email\": \"holly@reddico.co.uk\",\n    \"password\": \"password\",\n    \"role\": 1\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/register","urlObject":{"path":["api","v1","register"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"ead0b138-acff-4883-a419-620bbc1e774f"},{"name":"User get","id":"e6965dfe-075e-4dd4-9a0b-ba4d388dd7d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"<API_TOKEN>","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:5050/api/v1/user","urlObject":{"path":["api","v1","user"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"e6965dfe-075e-4dd4-9a0b-ba4d388dd7d1"},{"name":"User get by ID","id":"baadfb67-9e6e-4d37-a164-d928b4eba928","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"<API_TOKEN>","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:5050/api/v1/user/1","urlObject":{"path":["api","v1","user","1"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"baadfb67-9e6e-4d37-a164-d928b4eba928"},{"name":"User update","id":"e83a24b2-8b30-4938-b027-29469f9c7d39","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"<API_TOKEN>","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Alex\",\n    \"last_name\": \"Cole\",\n    \"role\": 2,\n    \"id\": 1\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/user/update","urlObject":{"path":["api","v1","user","update"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"e83a24b2-8b30-4938-b027-29469f9c7d39"},{"name":"User delete","id":"378e39ad-b861-4502-8c27-2cdd3cf72d05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"<API_TOKEN>","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"id\": 3\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/user/delete","urlObject":{"path":["api","v1","user","delete"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"378e39ad-b861-4502-8c27-2cdd3cf72d05"},{"name":"Request password reset","id":"bd792e39-f7a5-4901-a6d6-8a5b9f3beb04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"alex@reddico.co.uk\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/reset-password/request","urlObject":{"path":["api","v1","reset-password","request"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd792e39-f7a5-4901-a6d6-8a5b9f3beb04"},{"name":"Check reset pw code","id":"184d3c3f-f6fa-4b02-b1a6-a901139a9376","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"2bd07171b17ff2b6377259b273e2810c","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"auth_code\": \"3891a313f049e7c16a0229a7ad16e428\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/reset-password/check","urlObject":{"path":["api","v1","reset-password","check"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"184d3c3f-f6fa-4b02-b1a6-a901139a9376"},{"name":"Do password reset","id":"ecd4c08e-41df-4dcb-9c54-f7977062600d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"2bd07171b17ff2b6377259b273e2810c","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"alex@reddico.co.uk\",\n    \"password\": \"password\",\n    \"pass_confirm\": \"password\",\n    \"auth_code\": \"3891a313f049e7c16a0229a7ad16e428\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5050/api/v1/reset-password/update","urlObject":{"path":["api","v1","reset-password","update"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"ecd4c08e-41df-4dcb-9c54-f7977062600d"},{"name":"Admin only","id":"1c9de1bb-6b39-44a8-bf9d-e970fcfeb4cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"<API_TOKEN>","type":"text"}],"url":"http://localhost:5050/api/v1/admin","urlObject":{"path":["api","v1","admin"],"host":["http://localhost:5050"],"query":[],"variable":[]}},"response":[],"_postman_id":"1c9de1bb-6b39-44a8-bf9d-e970fcfeb4cf"}],"event":[{"listen":"prerequest","script":{"id":"16e2cd90-69fa-4f79-99f9-6857fa0b72a0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"71195d2e-fd4f-4ca8-9f69-a9486515919c","type":"text/javascript","exec":[""]}}],"variable":[{"key":"token","value":"<API_TOKEN>"},{"key":"APIURL","value":"http://localhost:5050"}]}