{"info":{"_postman_id":"3837dc8e-88e0-48c7-9f2f-98e7546e5f99","name":"SpringJWT","description":"<html><head></head><body><p>This API collection demonstrates the basics of JWT-based authentication. It allows users to register, sign in, and test JWT functionality by accessing a protected endpoint.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"36681432","collectionId":"3837dc8e-88e0-48c7-9f2f-98e7546e5f99","publishedId":"2sAXqwXeJP","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"589AAF"},"publishDate":"2024-09-24T18:35:11.000Z"},"item":[{"name":"sign up","id":"33a5a486-9d5e-45e0-9bbf-65f0a51940ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"test@mail.com\",\n    \"password\": \"12345\",\n    \"name\": \"Gayanuka\",\n    \"role\": \"Admin\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register","description":"<p>This endpoint allows new users to register by providing their email, password, name, and role. Upon successful registration, user data is stored for authentication. A JWT token is generated and which can be used for secure access to protected resources.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"022c54ae-b93d-4176-beb3-04a0545e7e6c","name":"example response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"test@mail.com\",\n    \"password\": \"12345\",\n    \"name\": \"Gayanuka\",\n    \"role\": \"Admin\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Tue, 24 Sep 2024 18:20:10 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 201,\n    \"message\": \"Success\",\n    \"data\": {\n        \"email\": \"test@mail.com\",\n        \"token\": \"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QG1haWwuY29tIiwicm9sZSI6IkRBU0hfQURNSU4iLCJleHAiOjE3MjgyMzg4MTAsImlhdCI6MTcyNzIwMjAxMH0.8KQcu01WzXZJzs6PPcCNPPjDutx4HhFyVln4JpqEX2ujST0SCkNF6zDsttk7ugHuwrKb8YTosa2OnQsAz1__eg\",\n        \"refreshToken\": null\n    }\n}"}],"_postman_id":"33a5a486-9d5e-45e0-9bbf-65f0a51940ca"},{"name":"sign in","id":"a1d2a52a-7a6c-4b9e-95b8-35ab0f42adac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"test@mail.com\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/authenticate","description":"<p>Users can log in by providing their email and password. A JWT token is generated upon successful authentication, which can be used for secure access to protected resources.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","authenticate"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8c2dc6df-c4de-494d-ba40-9054188e8b7e","name":"example resopnse","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"test@mail.com\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/authenticate"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Tue, 24 Sep 2024 18:21:14 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 201,\n    \"message\": \"Success\",\n    \"data\": {\n        \"email\": \"test@mail.com\",\n        \"token\": \"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QG1haWwuY29tIiwicm9sZSI6IkRBU0hfQURNSU4iLCJleHAiOjE3MjgyMzg4NzQsImlhdCI6MTcyNzIwMjA3NH0.24U3StdWZnGm3HdfVXs92SsSNTy1hIVW7DFTPkKQaH2PsqN0HUUT3yJIqltU2hWuzFJeKqhnvp5q68i35gj2EA\",\n        \"refreshToken\": null\n    }\n}"}],"_postman_id":"a1d2a52a-7a6c-4b9e-95b8-35ab0f42adac"},{"name":"test method","id":"dd85b3f4-83fb-4090-ac69-5bcd68b025c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8080/api/v1/blog/newMethod","description":"<p>This is a protected endpoint that requires a valid JWT token for access. It is used to verify that the token-based authentication is working correctly.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","v1","blog","newMethod"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"38864d60-7b1f-46c5-91de-046224793227","name":"example response","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8080/api/v1/blog/newMethod"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"text/plain;charset=UTF-8"},{"key":"Content-Length","value":"2"},{"key":"Date","value":"Tue, 24 Sep 2024 18:21:41 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"HI"}],"_postman_id":"dd85b3f4-83fb-4090-ac69-5bcd68b025c4"}]}