사용자 id → session으로 관리

refreshtoken, logout 추가

Page Method 내용 path requestParam responseParam status
회원가입 페이지 POST /user/join users(userId, nickname, password) {
”id”: id
} 성공: 200
로그인 페이지 POST /user/login userId,
password token = {
accessToken: accessToken,
refreshToken: refreshToken
} 200
아이디 중복확인 GET /user/userid/:userId userId 성공 : 200
아이디 중복 : 409
닉네임 중복확인 GET /user/nickname/:nickname nickname 성공 : 200
아이디 중복 : 409
정보입력 페이지 POST 정보 입력 /user/info {
”userId”: userId,
"custom”: “value1,value2”
} 성공: create(200)
정보입력 페이지 GET 정보 /user/info 토큰 {
"custom”: “value1,value2”
}
정보입력 페이지 DELETE 정보 삭제 /user/info 토큰 nothing or msg 성공: 204
실패: 400
정보변경 위한 비밀번호 확인 POST /user/password/valid 성공: 200
실패: 401
닉네임 변경 > 중복확인 api 먼저 거치고 성공했을때만 버튼 활성화 되도록,,, POST /user/nickname {
nickname
}
비밀번호 변경 > 비밀번호 확인 api 거치고… POST /user/password {
newPassword1
newPassword2
} 성공: 200
실패: 401 (newPw1≠newPw2)
피싱 체험 페이지 GET 화면 렌더링 /simulation {
"type": "msg",
"num": 1,
"red": [
"msg"
]
} simulType, vNum/mNum/sMum (사용자가 완료하지 않은 체험 id 중 가장 작은 수),
red
피싱 체험 페이지 - history /simulation/history history(type,simulNum)
피싱 체험 페이지 - 푸시/아이콘에서 터치 GET if 푸시 알림 터치
(simulType으로 결정)
correct/inc~ → 일단은 정답/오답 알림 메시지 모두 return /simulation/msg/{vNum} num data_voice(contents,correct,incorrect)
GET if 푸시 알림 터치
(simulType으로 결정)

예시 : { "scripts": [ ["엄마 나야",1], ["누구야?",2], ["엄마 딸",1], … ], "commentary": "조심!” } | /simulation/msg/{mNum} | num | scripts_msg(contents, response) simulation_data(commentary) | 에러 400 | | | GET | if 푸시 알림 터치 (simulType으로 결정) | /simulation/sns/{sNum} | num | scripts_sns(contents, response) simulation_data(commentary) | | | 피싱 체험 페이지 - 전화 아이콘 | GET | { "simul": [ { "simulNum": 1, "title": "지인 사칭형 - 핸드폰 수리", "commentary": "이렇게 지인을 사칭하며 악성 링크의 클릭을 유도하는 문자는 메신저 피싱의 전형적인 수법입니다! 주의하세요!", ”done”: false }, { "simulNum": 2, "title": "재난 지원금 사칭 - 소상공인 지원", "commentary": "무시하세용~~~" }, { "simulNum": 3, "title": "해외 결제 승인 사기", "commentary": "구매하지 않은 상품의 거래내역이 문자로 올 경우에는 적힌 번호로 전화하지 말고 카드사 또는 은행에 먼저 연락을 해보세요!"}, ”done”: false } | /simulation/voice | | data_voice(simulNum, title, commentary, done) | | | 피싱 체험 페이지 - 보이스 | GET | | /simulation/voice/{vNum} | num | scripts_voice(contents, response, url) simulation_data(commentary) | | | 피싱 체험 페이지 - 메신저 아이콘 | GET | { "simul": [ { "simulNum": 1, "title": "지인 사칭형 - 핸드폰 수리", "commentary": "이렇게 지인을 사칭하며 악성 링크의 클릭을 유도하는 문자는 메신저 피싱의 전형적인 수법입니다! 주의하세요!" }, { "simulNum": 2, "title": "재난 지원금 사칭 - 소상공인 지원", "commentary": "무시하세용~~~" }, { "simulNum": 3, "title": "해외 결제 승인 사기", "commentary": "구매하지 않은 상품의 거래내역이 문자로 올 경우에는 적힌 번호로 전화하지 말고 카드사 또는 은행에 먼저 연락을 해보세요!"}], "done": [3,2] } | /simulation/msg | | data_msg(mNum, title) history(simulNum)>완료여부확인 | | | 피싱 체험 페이지 - 카톡 아이콘 | GET | | /simulation/sns | | data_sns(mNum, title) history(simulNum)>완료여부확인 | | | 피싱 체험 페이지 - 메신저 아이콘 | GET | { "simul": [ { "simulNum": 1, "title": "지인 사칭형 - 핸드폰 수리", "commentary": "이렇게 지인을 사칭하며 악성 링크의 클릭을 유도하는 문자는 메신저 피싱의 전형적인 수법입니다! 주의하세요!" }, { "simulNum": 2, "title": "재난 지원금 사칭 - 소상공인 지원", "commentary": "무시하세용~~~" }, { "simulNum": 3, "title": "해외 결제 승인 사기", "commentary": "구매하지 않은 상품의 거래내역이 문자로 올 경우에는 적힌 번호로 전화하지 말고 카드사 또는 은행에 먼저 연락을 해보세요!"}], "done": [3,2] } | /simulation/msg | | data_msg(mNum, title) history(simulNum)>완료여부확인 | | | 피싱 체험 결과 페이지 - 메신저 | | | /simulation/msg/{mNum}/result | correct or incorrect, simulType, vid or mid or sid 체험 완료 여부 | data_msg(correct or incorrect) 체험 완료 여부 | | | 피싱 완료 | POST | | /simulation/done | type, simulNum

ex. { "type": "msg", "simulNum": 4 } | msg | | | 맞춤형 체험 | POST | | /simulation/custom | type { "type": "msg" } | { "isCustom": [ 1, 5, 7, 9 ] } | 성공: 200 | | 피싱 퀴즈 페이지 | GET | quizNum < id인 퀴즈 목록 불러오기

(사용자가 모두 완료한 상태이면 제일 마지막 번호의 퀴즈 리턴) | /quiz | | data_quiz(id, tag, qText, qAnswer, answer, comm) | | | | | 퀴즈 1개 완료 후, 사용자의 quizNum 업데이트 | /quiz/{id} | | | | | | | | | | | | | 소통하기 페이지 | GET | 글 목록 출력 | /community | | posts(id, title, contents, date, tag, createdAt, updatedAt) | | | | GET | 글 읽기 | /community/{id} | posts(id) | { "post": { "id": 320, "user_nickname": "tester", "title": "test", "contents": "test contents", "tag": "정보", "createdAt": "2023-01-09T19:59:04.000Z", "updatedAt": "2023-01-09T19:59:04.000Z" }, "comment": [] } | 성공: 200 실패: 404(글 삭제됨) | | | POST | 댓글 달기 | /community/comment | comments(post_id, contents) | comments(id) | | | | PATCH | 댓글 수정 | /community/comment/:id | comments(post_id, contents) | { "id": 102, "post_id": 306, "user_nickname": "tester", "contents": "update comment11", "createdAt": "2023-01-09T15:39:37.000Z", "updatedAt": "2023-01-09T15:40:09.504Z" } | 성공: 201 | | | DELETE | 댓글 삭제 | /community/comment/:id | | x | 성공: 204 | | | GET | 글 검색 | /community/keyword/{keyword} | | { "id": 327, "user_nickname": "tester1", "title": "block1", "contents": "test contents", "tag": "정보", "createdAt": "2023-01-10T05:07:39.000Z", "updatedAt": "2023-01-10T05:07:39.000Z" } | | | | POST | 글 작성 | /community/post | posts(title, contents, tag) | | 성공: 201 | | | PATCH | 글 수정 | /community/post/:id | posts(title, contents, tag) | posts(id) | 성공: 201 | | | DELETE | 글 삭제 | /community/post/:id | | x | 성공: 204 | | 차단 및 신고 기능 | GET | 유저, 글, 댓글 차단 | /admin/:type/:value | x | x | 성공: 204 | | | | | | | | | | 비밀번호 변경 | POST | | /user/password | { password newPassword1 newPassword2 } | | | | 닉네임 변경 | POST | | /user/nickname | { nickname } | | | | 정보변경 위한 비밀번호 확인 | POST | | /user/password/valid | | | | | | | | | | | | | | | | | | | | | | | | | | | | | select simulNum from history where user_id= {user_id} AND type=m AND simulNum=1; | | historytable | id(autoincrement) | type(voice/m/s) | simulNum(vNum~) | user_id | | | | 내가 쓴 글/댓글 관리 | /settings/commynitylist | | | | | 정보 얻기 페이지 | 크롤링 | | /info | | | |