{"info":{"_postman_id":"ed592bb6-1d0d-44d1-b84b-c7e7dcc84021","name":"User Authentication and Authorization","description":"<html><head></head><body><p>A simple user authentication and authorization module</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"43712221","collectionId":"ed592bb6-1d0d-44d1-b84b-c7e7dcc84021","publishedId":"2sBXinGVqS","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-03-30T09:05:26.000Z"},"item":[{"name":"Register User","id":"473e414a-0afd-45a4-b708-e98a583f2dd1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"rjun\",\r\n  \"email\": \"arjun@gmail.com\",\r\n  \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/register","description":"<p>This is used to create registration</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"230dd5f0-520c-4201-842e-66c91455fea6","name":"Register User Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"ananth\",\r\n  \"email\": \"ananth@gmail.com\",\r\n  \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/register"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"42"},{"key":"ETag","value":"W/\"2a-nMoFx54+czTntmSLXl3mqIsZV4A\""},{"key":"Date","value":"Mon, 30 Mar 2026 08:35:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User registered successfully\"\n}"}],"_postman_id":"473e414a-0afd-45a4-b708-e98a583f2dd1"},{"name":"Login User","id":"a894b6f3-a520-447a-b981-fdea42a1f5e4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"ananth\",\r\n  \"email\": \"ananth@gmail.com\",\r\n  \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/login","description":"<p>This is used to create login token</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8f3f0ee9-be91-47ae-8bbe-6da5701475b8","name":"Login User Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"ananth\",\r\n  \"email\": \"ananth@gmail.com\",\r\n  \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/login"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"183"},{"key":"ETag","value":"W/\"b7-dNhLnpZHzjdAxaJ0VS50nhN3QVw\""},{"key":"Date","value":"Mon, 30 Mar 2026 08:53:01 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5Y2EzNWUwOTkwYTI5YTlmZjgzMGYwOCIsImlhdCI6MTc3NDg2MDc4MSwiZXhwIjoxNzc0ODY0MzgxfQ.31PBCE5KP9cm1gpc9nBomlaF_OLz8mTkb4LhcNxLK-A\"\n}"}],"_postman_id":"a894b6f3-a520-447a-b981-fdea42a1f5e4"},{"name":"Get User Profile","id":"bb90a5c3-b3de-425f-a47b-58d5ee701ef6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"ananth\",\r\n  \"email\": \"ananth@gmail.com\",\r\n  \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/profile","description":"<p>This is used to get user profile with logged token</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","profile"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9b638c65-128f-4978-90a0-3c3b4f5280e1","name":"Get User Profile Response","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"ananth\",\r\n  \"email\": \"ananth@gmail.com\",\r\n  \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/profile"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"87"},{"key":"ETag","value":"W/\"57-m7VCn6d4KCIvIF46MssoA0PC7ow\""},{"key":"Date","value":"Mon, 30 Mar 2026 08:58:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"69ca39ba186059e72f24138c\",\n    \"username\": \"arjun\",\n    \"email\": \"arjun@gmail.com\",\n    \"__v\": 0\n}"}],"_postman_id":"bb90a5c3-b3de-425f-a47b-58d5ee701ef6"}]}