{"info":{"_postman_id":"e194d22b-ae77-426a-b52e-5d5b2b2f29c6","name":"JWT with Caffeine Cache","description":"<html><head></head><body><img src=\"https://content.pstmn.io/b0a4a25f-6c66-4592-a5e0-66d44ab8bf68/TG9naW5TaWdudXBMb2dvLnBuZw==\" alt=\"\" height=\"275\" width=\"661\">\n\n<p><em>Watch the demonstartion at :</em> <a href=\"https://youtu.be/_5enBVGXVXs\">https://youtu.be/_5enBVGXVXs</a></p>\n<p><em>This backend application, developed using Spring Boot 3.3.0 and Spring Security 6.X.X, implements a role-based (User/Admin) registration and login system. It leverages Caffeine cache for storing OTPs sent via email for verification purposes. Upon successful registration, the application generates JWT tokens: an access token (valid for 1 hour) and a refresh token (valid for 30 days). These tokens are used to authorize users, ensuring that only verified users with valid tokens can access certain endpoints outside of the \"/api/v1/auth/**\" path.</em></p>\n<p><em>To enhance reliability, a retry mechanism is implemented for email sending, which attempts to resend the OTP up to two more times in case of a system failure. Additionally, the application includes robust validation checks, ensuring that request bodies meet the required criteria.</em></p>\n<p>You can also refer to Swagger documentation by hitting the url \"/swagger-ui.html\"</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"29367403","collectionId":"e194d22b-ae77-426a-b52e-5d5b2b2f29c6","publishedId":"2sA3XJnQvU","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-06-08T08:47:25.000Z"},"item":[{"name":"REGISTER USER","id":"9e002b3b-973d-48cc-b006-28765454f76d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Sarthak\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rsarthakverse123@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+918303913426\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9a9da227-e363-4b0a-9ae2-c0fa6c063d93","name":"REGISTER USER","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"USER\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:52:40 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"firstName\": \"First name can't be blank\"\n}"},{"id":"8ccf4665-1075-459f-b29a-73dcb9dbdcbe","name":"Last name not given","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:53:25 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"lastName\": \"Last name can't be blank\"\n}"},{"id":"0e461bc7-6ecf-4fa3-95d3-6dfd547fee69","name":"Invalid email entered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:54:05 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"Invalid email entered\"\n}"},{"id":"171e0f71-ef4d-4276-8226-070a7b3e6d14","name":"Password format not followed","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"Password\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:54:31 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"password\": \"Password must contain at least 8 characters, one uppercase, one lowercase and one number\"\n}"},{"id":"7c1296cd-2c5f-4d87-9cb4-a69f838de15f","name":"Password not given","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:54:49 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"password\": \"Password can't be blank\"\n}"},{"id":"c00c3862-4f34-4ec8-9714-dc004b6e2797","name":"User already exists and is verified","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:55:14 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User already exists\"\n}"},{"id":"9cea07ed-14a8-493c-8af7-80ae9e0dabe2","name":"Unknown Gender entered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"OTHER\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Forbidden","code":403,"_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":"Sat, 08 Jun 2024 07:55:50 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"Error\": \"note that role must be USER / ADMIN & Gender must be MALE / FEMALE\"\n}"},{"id":"d508d708-d7a7-47e5-851d-b92d152b849f","name":"Unknown role entered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+917007356849\",\r\n    \"role\": \"jhsbnx\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Forbidden","code":403,"_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":"Sat, 08 Jun 2024 07:56:19 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"Error\": \"note that role must be USER / ADMIN & Gender must be MALE / FEMALE\"\n}"},{"id":"10310ef4-f955-4e86-887b-f9080e6a48a7","name":"Phone number format not followed","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Ayush\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"8303913426\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:56:45 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"phoneNumber\": \"Invalid phone number, please enter in the format +(code)XXXXXXXXXX\"\n}"},{"id":"0924afa9-7b6c-48a5-8d05-334f17bce938","name":"multiple fields left unentered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"\",\r\n    \"lastName\": \"\",\r\n    \"email\": \"rastogiayush143@gmail.com\",\r\n    \"password\": \"\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+918303913426\",\r\n    \"role\": \"USER\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 07:57:30 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"firstName\": \"First name can't be blank\",\n    \"lastName\": \"Last name can't be blank\",\n    \"password\": \"Password can't be blank\"\n}"},{"id":"e97bce42-8fa2-49ea-9bcb-c08bfec462ac","name":"successfully sent otp to the email","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Sarthak\",\r\n    \"lastName\": \"Rastogi\",\r\n    \"email\": \"rsarthakverse123@gmail.com\",\r\n    \"password\": \"Password123\",\r\n    \"gender\": \"MALE\",\r\n    \"phoneNumber\": \"+918303913426\",\r\n    \"role\": \"USER\"\r\n}\r\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":"Sat, 08 Jun 2024 07:59:10 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"An email with OTP has been sent to your email address. Kindly verify.\"\n}"}],"_postman_id":"9e002b3b-973d-48cc-b006-28765454f76d"},{"name":"VERIFY REGISTRATION","id":"357264bc-b5f4-4aca-b298-6ea78e9e035b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"otp\" : \"857476\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","verify"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"005abe3f-eeb4-47fd-9791-3280e18ea75d","name":"user successfully verified","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"otp\" : \"528688\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify"},"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":"Sat, 08 Jun 2024 07:59:48 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiVVNFUiIsInN1YiI6InJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzNTg4LCJleHAiOjE3MTc4MzcxODgsImp0aSI6IjkyZjFiMDVhLWQxMDQtNDJiYi04NTI4LTQ1NWNhZDhmY2M2ZSJ9.tm-A9ulgYodSloAJfr8c6WuzP1oHlc0c5H8JB65EEuo\",\n    \"refreshToken\": \"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzNTg4LCJleHAiOjE3MjA0MjU1ODgsImp0aSI6IjBiNGZmYzA0LWNjMDEtNGZiZC1hOTc2LWI4ZWVmOWRlM2Y3MyJ9.NyCB_SfXxag50w-Z19s5G86-uRJYeXdZR84Hp8hAsZ8\",\n    \"firstName\": \"Sarthak\",\n    \"lastName\": \"Rastogi\",\n    \"email\": \"rsarthakverse123@gmail.com\",\n    \"role\": \"USER\",\n    \"verified\": true\n}"},{"id":"aaa1d0f4-023b-4cc9-bfb6-468eb3a573b8","name":"invalid email enetered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse.com\",\r\n    \"otp\" : \"528688\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:01:35 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"enter a valid email\"\n}"},{"id":"4f42b6e0-56f7-4fb3-abf3-2369cbdc648b","name":"user with email does not exist","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthak49@gmail.com\",\r\n    \"otp\" : \"528688\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify"},"status":"Not Found","code":404,"_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":"Sat, 08 Jun 2024 08:02:00 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"user with this email does not exist\"\n}"},{"id":"f94151d4-8fe9-4c84-b985-0651e2b009d4","name":"enter a 6 digit otp only","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"otp\" : \"52868\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:02:29 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"otp\": \"OTP must be 6 characters long\"\n}"},{"id":"849191fc-5877-4739-ae50-98b1eaab77bd","name":"otp expired after 2minutes","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"otp\" : \"528688\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify"},"status":"Request Timeout","code":408,"_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":"Sat, 08 Jun 2024 08:02:57 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Otp has been expired for user rsarthakverse123@gmail.com\"\n}"}],"_postman_id":"357264bc-b5f4-4aca-b298-6ea78e9e035b"},{"name":"LOGIN USER","id":"3ee9cd60-cca0-47a2-9835-5d543a91ac10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"rsarthakverse123@gmail.com\",\r\n    \"password\": \"Password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/login","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"faa16113-4691-42f5-8458-bbb3650d69de","name":"user is not registered with us","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"rsarthak49@gmail.com\",\r\n    \"password\": \"Password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/login"},"status":"Not Found","code":404,"_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":"Sat, 08 Jun 2024 08:04:55 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User with this email does not exist\"\n}"},{"id":"1c8fa048-60d4-4291-a97f-c0a47fd1e692","name":"invalid email entered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"rsarthakverse123.com\",\r\n    \"password\": \"Password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/login"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:05:21 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"Enter a valid email\"\n}"},{"id":"46d26238-fe13-44ca-ab5b-48d386056cf9","name":"invalid credentials","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"rsarthakverse123@gmail.com\",\r\n    \"password\": \"Password12\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/login"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:05:51 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Invalid credentials\"\n}"},{"id":"bfbb0be2-f603-4781-97ca-52b20112a3c6","name":"successfully logged in","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"rsarthakverse123@gmail.com\",\r\n    \"password\": \"Password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/login"},"status":"OK","code":200,"_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":"Sat, 08 Jun 2024 08:06:11 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiVVNFUiIsInN1YiI6InJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MTc4Mzc1NzEsImp0aSI6ImQzZjJjMTg5LWYyOWMtNDUwMS1hNTBjLWQzYWQyNTQ4OGViNyJ9.Ow3mhK-k9pLigu2_w0BBwDd9IBfEhqzgHaOmZ4GN1MM\",\n    \"refreshToken\": \"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MjA0MjU5NzEsImp0aSI6IjkyNDk3NWE2LTY5NGItNDgxZC05ZjhjLTBjMDNiODliN2E4NyJ9.At-QpNdPqReDXUHpP-Eka0OXKAkif_CRA-mnzJ6265c\",\n    \"firstName\": \"Sarthak\",\n    \"lastName\": \"Rastogi\",\n    \"email\": \"rsarthakverse123@gmail.com\",\n    \"role\": \"USER\",\n    \"verified\": true\n}"}],"_postman_id":"3ee9cd60-cca0-47a2-9835-5d543a91ac10"},{"name":"FORGOT PASSWORD & RESEND OTP","id":"e622e29d-c3bc-4c90-9d38-4db98a1d2728","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"rsarthakverse123@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/send-otp","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","send-otp"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f139adca-ee85-4dcd-9f7f-b578d702821c","name":"user is not registered with us","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"rsarthakverse49@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/send-otp"},"status":"Not Found","code":404,"_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":"Sat, 08 Jun 2024 08:06:44 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User with email not found in database\"\n}"},{"id":"f98beafd-31f0-4c2e-acd3-88abff5f3718","name":"invalid email entered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"rsarthakverse123ail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/send-otp"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:07:08 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"enter a valid email\"\n}"}],"_postman_id":"e622e29d-c3bc-4c90-9d38-4db98a1d2728"},{"name":"FORGOT PASSWORD VERIFY","id":"60ce14b3-0191-4111-a059-43454412034a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" :\"rsarthakverse123@gmail.com\",\r\n    \"otp\" : \"235694\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify-otp","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","verify-otp"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f5a3ee8c-d420-49ff-8495-eb97c6f2c524","name":"successfully verified","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" :\"rsarthakverse123@gmail.com\",\r\n    \"otp\" : \"235694\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify-otp"},"status":"OK","code":200,"_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":"Sat, 08 Jun 2024 08:08:03 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"otp verified successfully, now you can change the password\"\n}"},{"id":"415edcf5-c833-41d1-bb45-ff46b50ed88e","name":"invalid email entered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" :\"rsarthakverl.com\",\r\n    \"otp\" : \"235694\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify-otp"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:08:36 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"enter a valid email\"\n}"},{"id":"49db513c-e1ae-4685-91af-95ed91172ed7","name":"user is not registered with us","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" :\"rsarthak49@gmail.com\",\r\n    \"otp\" : \"235694\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/verify-otp"},"status":"Not Found","code":404,"_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":"Sat, 08 Jun 2024 08:09:02 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"iUser with this email does not exist\"\n}"}],"_postman_id":"60ce14b3-0191-4111-a059-43454412034a"},{"name":"RESET PASSWORD","id":"4bebb130-c6c9-4126-a519-3c8d912dd93d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"password\":\"Sarthak@12\",\r\n    \"confirmPassword\":\"Sarthak@12\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/reset-password","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","reset-password"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c02a64e6-9e84-49c7-89c6-5bd24599a8c3","name":"invalid email entered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverseil.com\",\r\n    \"password\":\"Sarthak@12\",\r\n    \"confirmPassword\":\"Sarthak@12\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/reset-password"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:09:22 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \"Enter a valid email\"\n}"},{"id":"edf10568-2553-4dd8-bbfd-5681d0290f9b","name":"user not registered with us","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse49@gmail.com\",\r\n    \"password\":\"Sarthak@12\",\r\n    \"confirmPassword\":\"Sarthak@12\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/reset-password"},"status":"Not Found","code":404,"_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":"Sat, 08 Jun 2024 08:09:51 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"user does not exist with this email\"\n}"},{"id":"26dff563-f12c-43a4-a8d0-4b8330aeb3aa","name":"password not entered correctly","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"password\":\"Sarthak\",\r\n    \"confirmPassword\":\"\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/reset-password"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:10:23 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"password\": \"Password must contain at least one digit, one lowercase, one uppercase, one special character and should be 8 characters long\",\n    \"confirmPassword\": \"Confirm Password and password do not match\"\n}"},{"id":"c120db88-de1f-4bed-8369-9bef25566bb2","name":"password pattern not followed","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"password\":\"Sarthak123\",\r\n    \"confirmPassword\":\"Sarthak123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/reset-password"},"status":"Bad Request","code":400,"_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":"Sat, 08 Jun 2024 08:10:45 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"password\": \"Password must contain at least one digit, one lowercase, one uppercase, one special character and should be 8 characters long\"\n}"},{"id":"2dd4b792-d4f0-4a55-8f8b-17d94352554b","name":"password reset successfully","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\",\r\n    \"password\":\"Sarthak@12\",\r\n    \"confirmPassword\":\"Sarthak@12\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/auth/reset-password"},"status":"OK","code":200,"_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":"Sat, 08 Jun 2024 08:11:10 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Password has been reset successfully\"\n}"}],"_postman_id":"4bebb130-c6c9-4126-a519-3c8d912dd93d"},{"name":"GET REFRESHED TOKEN","id":"c2441f6d-fda5-46fe-ab14-f0d9b88f66e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/v1/auth/getRefreshToken?refreshToken=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MjA0MjU5NzEsImp0aSI6IjkyNDk3NWE2LTY5NGItNDgxZC05ZjhjLTBjMDNiODliN2E4NyJ9.At-QpNdPqReDXUHpP-Eka0OXKAkif_CRA-mnzJ6265c","urlObject":{"protocol":"http","port":"8080","path":["api","v1","auth","getRefreshToken"],"host":["localhost"],"query":[{"key":"refreshToken","value":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MjA0MjU5NzEsImp0aSI6IjkyNDk3NWE2LTY5NGItNDgxZC05ZjhjLTBjMDNiODliN2E4NyJ9.At-QpNdPqReDXUHpP-Eka0OXKAkif_CRA-mnzJ6265c"}],"variable":[]}},"response":[{"id":"66015532-8786-48c2-af7e-5f397a9bf8e7","name":"incorrect jwt given","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8080/api/v1/auth/getRefreshToken?refreshToken=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MjA0MjU5NzEsImp0aSI6IjkyNDk3NWE2LTY5NGItNDgxZC05ZjhjLTBjMDNiODliN2E4NyJ9.At-QpNdPqReDXUHpP-Eka0OXKAkif_CRA-mnzJ6265","protocol":"http","host":["localhost"],"port":"8080","path":["api","v1","auth","getRefreshToken"],"query":[{"key":"refreshToken","value":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MjA0MjU5NzEsImp0aSI6IjkyNDk3NWE2LTY5NGItNDgxZC05ZjhjLTBjMDNiODliN2E4NyJ9.At-QpNdPqReDXUHpP-Eka0OXKAkif_CRA-mnzJ6265"}]}},"status":"Unauthorized","code":401,"_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-Length","value":"0"},{"key":"Date","value":"Sat, 08 Jun 2024 08:11:53 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null},{"id":"438e7966-709a-4e1f-bc3c-3aa89a28d1f4","name":"successful jwt given","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8080/api/v1/auth/getRefreshToken?refreshToken=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MjA0MjU5NzEsImp0aSI6IjkyNDk3NWE2LTY5NGItNDgxZC05ZjhjLTBjMDNiODliN2E4NyJ9.At-QpNdPqReDXUHpP-Eka0OXKAkif_CRA-mnzJ6265c","protocol":"http","host":["localhost"],"port":"8080","path":["api","v1","auth","getRefreshToken"],"query":[{"key":"refreshToken","value":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIjcmVmcmVzaHJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODMzOTcxLCJleHAiOjE3MjA0MjU5NzEsImp0aSI6IjkyNDk3NWE2LTY5NGItNDgxZC05ZjhjLTBjMDNiODliN2E4NyJ9.At-QpNdPqReDXUHpP-Eka0OXKAkif_CRA-mnzJ6265c"}]}},"status":"OK","code":200,"_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":"Sat, 08 Jun 2024 08:12:05 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiVVNFUiIsInN1YiI6InJzYXJ0aGFrdmVyc2UxMjNAZ21haWwuY29tIiwiaWF0IjoxNzE3ODM0MzI1LCJleHAiOjE3MTc4Mzc5MjUsImp0aSI6IjA5MzkyN2Y2LTNmYjQtNDQxZS04MzRjLTM3NDIzODdmNjVmMSJ9.VabHqNv55n5UPGenyE67pOXdHZRFoqhPbg8KjtDq978\",\n    \"firstName\": \"Sarthak\",\n    \"lastName\": \"Rastogi\",\n    \"email\": \"rsarthakverse123@gmail.com\",\n    \"role\": \"USER\"\n}"}],"_postman_id":"c2441f6d-fda5-46fe-ab14-f0d9b88f66e8"},{"name":"GET USER INFO","id":"aeb1edae-af27-451a-9337-c356063a52fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/profile/myProfile","urlObject":{"protocol":"http","port":"8080","path":["api","v1","profile","myProfile"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"732194c5-e934-4824-baed-3e125d09f13a","name":"jwt not used as bearer","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/profile/myProfile"},"status":"Unauthorized","code":401,"_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-Length","value":"0"},{"key":"Date","value":"Sat, 08 Jun 2024 08:12:48 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null},{"id":"101e941e-cbde-4130-8457-7f2c792edfe7","name":"user information recieved","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"rsarthakverse123@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/profile/myProfile"},"status":"OK","code":200,"_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":"Sat, 08 Jun 2024 08:13:33 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 152,\n    \"email\": \"rsarthakverse123@gmail.com\",\n    \"firstName\": \"Sarthak\",\n    \"lastName\": \"Rastogi\",\n    \"phoneNumber\": \"+918303913426\",\n    \"gender\": \"MALE\",\n    \"role\": \"USER\",\n    \"profilePicture\": \"https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_960_720.png\",\n    \"isOfficiallyEnabled\": true\n}"}],"_postman_id":"aeb1edae-af27-451a-9337-c356063a52fb"},{"name":"cron job","id":"f32407ac-82fa-4a24-845d-f3e4a97e7b16","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"https://jwt-authentication-authorization-for.onrender.com/api/v1/auth/hello","urlObject":{"protocol":"https","path":["api","v1","auth","hello"],"host":["jwt-authentication-authorization-for","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"c451faba-8f3a-4629-a71f-d2e4006b0299","name":"cron job....just to keep the render running","originalRequest":{"method":"POST","header":[],"url":"http://localhost:8080/api/v1/auth/hello"},"status":"OK","code":200,"_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":"Sat, 08 Jun 2024 08:22:21 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"This Api is automated, for doing cronJob so that render does not get turned off\"\n}"}],"_postman_id":"f32407ac-82fa-4a24-845d-f3e4a97e7b16"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"key":"id","value":"1"},{"key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}