{ "info": { "_postman_id": "36d3c2c4-9abe-4457-9975-40575fe809ac", "name": "Auth", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "40701166" }, "item": [ { "name": "회원가입", "item": [ { "name": "회원가입 요청", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Email\": \"user@example.com\",\n \"Password\": \"password123\",\n \"Name\": \"홍길동\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/register", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "register" ] }, "description": "이메일, 비밀번호, 별명으로 회원가입을 요청합니다. 인증 메일이 발송됩니다." }, "response": [] }, { "name": "회원가입 완료", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/auth/registration/user@example.com", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "registration", "user@example.com" ] }, "description": "이메일 인증 후 회원가입을 완료합니다. isVerified-Registration 쿠키가 필요합니다." }, "response": [] } ] }, { "name": "인증번호", "item": [ { "name": "이메일 인증번호 검증", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Email\": \"user@example.com\",\n \"Code\": \"123456\",\n \"Type\": 1\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/verify-email", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "verify-email" ] }, "description": "이메일 인증번호를 검증합니다. Type: 1=Registration, 2=ForgotPassword" }, "response": [] }, { "name": "이메일 인증번호 재전송", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Email\": \"user@example.com\",\n \"Type\": 1\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/resend-email", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "resend-email" ] }, "description": "이메일 인증번호를 재전송합니다. Type: 1=Registration, 2=ForgotPassword" }, "response": [] } ] }, { "name": "비밀번호 재설정", "item": [ { "name": "비밀번호 재설정 요청", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Email\": \"user@example.com\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/forgot-password", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "forgot-password" ] }, "description": "비밀번호 재설정을 요청합니다. 이메일 인증 후 비밀번호를 변경할 수 있습니다." }, "response": [] }, { "name": "비밀번호 재설정 처리", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Email\": \"user@example.com\",\n \"Password\": \"newpassword123\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/reset-password", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "reset-password" ] }, "description": "비밀번호를 재설정합니다. isVerified-ForgotPassword 쿠키가 필요합니다." }, "response": [] } ] }, { "name": "JWT", "item": [ { "name": "토큰 재발급", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RefreshToken\": \"{{refreshToken}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/refresh-token", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "refresh-token" ] }, "description": "RefreshToken으로 새 AccessToken과 RefreshToken을 재발급합니다." }, "response": [] } ] }, { "name": "로그인", "event": [ { "listen": "test", "script": { "exec": [ "var res = pm.response.json();\r", "\r", "if (res.success && res.data.accessToken) {\r", " pm.environment.set(\"accessToken\", res.data.accessToken);\r", "}\r", "\r", "if (res.success && res.data.refreshToken) {\r", " pm.environment.set(\"refreshToken\", res.data.refreshToken);\r", "}" ], "type": "text/javascript", "packages": {}, "requests": {} } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Email\": \"dev@web.or.kr\",\n \"Password\": \"password123\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/login", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "login" ] }, "description": "이메일/비밀번호로 로그인합니다. AccessToken, RefreshToken을 반환합니다." }, "response": [] }, { "name": "구글 로그인", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Google ID Token 자동 발급 (refresh_token 방식)", "// 최초 1회: OAuth Playground에서 refresh_token 발급 후 환경변수에 저장", "// https://developers.google.com/oauthplayground", "// scope: openid profile email", "", "pm.sendRequest({", " url: 'https://oauth2.googleapis.com/token',", " method: 'POST',", " header: { 'Content-Type': 'application/x-www-form-urlencoded' },", " body: {", " mode: 'urlencoded',", " urlencoded: [", " { key: 'client_id', value: pm.environment.get('googleClientId') },", " { key: 'client_secret', value: pm.environment.get('googleClientSecret') },", " { key: 'refresh_token', value: pm.environment.get('googleRefreshToken') },", " { key: 'grant_type', value: 'refresh_token' }", " ]", " }", "}, (err, res) => {", " if (err) { console.error('Google token error:', err); return; }", " const idToken = res.json().id_token;", " if (idToken) {", " pm.environment.set('googleIdToken', idToken);", " console.log('Google ID Token 발급 완료');", " } else {", " console.error('id_token 없음:', JSON.stringify(res.json()));", " }", "});" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "var res = pm.response.json();", "", "if (res.success && res.data && res.data.accessToken) {", " pm.environment.set('accessToken', res.data.accessToken);", "}", "", "if (res.success && res.data && res.data.refreshToken) {", " pm.environment.set('refreshToken', res.data.refreshToken);", "}" ] } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Credential\": \"{{googleIdToken}}\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/auth/google-login", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "google-login" ] }, "description": "Google OAuth ID Token으로 로그인합니다. 신규 회원은 자동 가입됩니다.\n\n[환경변수 필요]\n- googleClientId: GCP OAuth 클라이언트 ID\n- googleClientSecret: GCP OAuth 클라이언트 Secret\n- googleRefreshToken: OAuth Playground에서 1회 발급 (https://developers.google.com/oauthplayground → scope: openid profile email)" }, "response": [] }, { "name": "로그아웃", "request": { "method": "POST", "header": [], "url": { "raw": "{{baseUrl}}/api/auth/logout", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "logout" ] }, "description": "로그아웃합니다. RefreshToken을 무효화합니다." }, "response": [] }, { "name": "내 정보 조회", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/auth/profile", "host": [ "{{baseUrl}}" ], "path": [ "api", "auth", "profile" ] }, "description": "현재 로그인한 회원의 프로필 정보를 조회합니다." }, "response": [] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{accessToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "packages": {}, "requests": {}, "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "packages": {}, "requests": {}, "exec": [ "" ] } } ] }