User
유저 도메인 API 명세
회원 가입
회원가입
POST http://localhost:8080/users/regist
사용자가 서비스에 가입을 할 수 있도록 합니다.
Request Body
userName*
string
유저의 이름
userId*
string
유저의 아이디
password*
string
유저의 비밀번호
role*
String
유저의 권한
{
"success": true,
"response": null,
"error": null
}{
"success": false,
"response": null,
"error": {
"message": "서버의 알 수 없는 에러입니다.",
"status": 500
}
}{
"success": false,
"response": null,
"error": {
"message": "해당 요청은 잘못되었습니다.",
"status": 400
}
}로그인
로그인
POST http://localhost:8080/users/login
사용자가 서비스에 로그인할 수 있도록 합니다.
헤더로 JWT를 응답합니다.
Request Body
userId*
String
유저의 아이디
password*
String
유저의 비밀번호
회원 정보 조회
회원 정보 조회
GET http://localhost:8080/users
로그인 되어있는 유저의 정보를 조회합니다.
Headers
token*
String
로그인 시 발급받은 JWT
특정 회원 정보 조회
특정 회원 정보 조회
GET http://localhost:8080/users/{id}
게시물에서 클릭한 유저의 정보를 조회합니다.
Request Body
idx*
Long
게시물을 작성한 유저의 고유 ID
회원 주소 추가
회원 주소 추가
POST http://localhost:8080/users/address/add
회원이 보유하고 있는 주소를 보여줍니다.
Headers
token*
String
로그인 시 발급받은 JWT
Request Body
address*
String
회원이 등록한 주소
회원 주소 조회
회원 주소 조회
GET http://localhost:8080/users/address
회원이 등록한 주소를 조회합니다.
Headers
token*
String
로그인 시 발급받은 JWT
회원 정보 수정
회원 정보 수정
PUT http://localhost:8080/users/update
유저의 비밀번호, 닉네임을 수정할 수 있도록 합니다.
비밀번호 변경 시, old, new 패스워드를 모두 입력해야하지만 정보 수정의 경우 닉네임을 변경하지 않을 수도 있기 때문에 Optional로 지정합니다.
닉네임 변경의 경우도 동일합니다.
Headers
token*
String
로그인 시 발급받은 JWT
Request Body
newNickname
String
변경할 닉네임
oldPassword
String
이전 비밀번호
newPassword
String
변경 비밀번호
회원 탈퇴
회원 탈퇴
DELETE http://localhost:8080/users/unregist
회원 탈퇴를 할 수 있도록 합니다.
Headers
token*
String
로그인 시 발급받은 JWT
Last updated