User API
UserTerm 테이블에서 사용하는 enum 값입니다. 아래 표를 참고해서 enum 변수명으로 요청 body에 배열 형태로 보내주시면 됩니다.
일반 사용자의 경우, 1번 약관을 필수로 봅니다.
공인중개사의 경우, 1번과 2번 약관을 필수로 봅니다.
필수 약관이 동의로 간주되지 않을 경우, 오류로 간주합니다.
Enum 변수명 | Description |
---|---|
SERVICE_USED_AGREE |
서비스 이용 약관에 대한 동의 |
PERSONAL_INFO_NOTI |
개인정보 수집 이용에 대한 안내 |
PERSONAL_INFO_USED_AGREE |
개인정보 수집 및 이용 동의 |
MARKETING_ADVERTISEMENT_AGREE |
마케팅 활용 및 광고성 정보 수신 동의 |
!! 공지 !!
23.09.23 이전까지 User 테이블 내 email 컬렴명으로 사용하던 모든 데이터를 userName(user_name)으로 변경하였습니다. 해당 부분들에 대해 클라이언트 측에서 동일하게 변경 작업을 진행해주셔야 합니다.
API URL, DTO 를 잘 확인해주세요!
1-1. 회원가입
Request
POST /api/v1/users/sign-up HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 312
Host: localhost:8080
{
"userName" : "test_jhouse_com",
"password" : "abcdefG123!",
"nick_name" : "테스트유저1",
"phone_num" : "01011111111",
"age" : "20대 미만",
"join_paths" : [ "네이버 카페", "인스타그램" ],
"terms" : [ "PERSONAL_INFO_NOTI", "SERVICE_USED_AGREE" ],
"email" : "zzangu@jhouse.com"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 83
{
"code" : "C0002",
"message" : "비밀번호 형식에 맞지 않습니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 80
{
"code" : "C0002",
"message" : "닉네임 형식에 맞지 않습니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 83
{
"code" : "C0002",
"message" : "전화번호 형식에 맞지 않습니다."
}
1-2. 공인중개사 회원가입
공인중개사 등록번호는 숫자로 구성된 14개의 문자열만 유효합니다.
사업자등록번호는 숫자로 구성된 10개의 문자열만 유효합니다.
Request
POST /api/v1/agents/sign-up HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 628
Host: localhost:8080
{
"userName" : "agent_jhouse_com",
"password" : "abcdefG123!",
"nick_name" : "공인중개사1",
"phone_num" : "01044444441",
"age" : "20대 미만",
"join_paths" : [ "네이버 카페", "인스타그램" ],
"terms" : [ "PERSONAL_INFO_NOTI", "SERVICE_USED_AGREE" ],
"agent_code" : "1234567890",
"business_code" : "12345678901234",
"company_name" : "주말내집",
"agent_name" : "오도리",
"company_phone_num" : "0212345671",
"assistant_name" : null,
"company_address" : "서울특별시",
"company_address_detail" : "강남구",
"company_email" : "agent@duaily.net",
"estate" : "아파트"
}
Request Field
Path | Type | Description |
---|---|---|
|
|
사용자 로그인 아이디 |
|
|
비밀번호 |
|
|
닉네임 |
|
|
전화번호 |
|
|
연령대 |
|
|
가입 경로 |
|
|
약관 동의 내역 ( enum 변수명으로 보내야 합니다. ) |
|
|
공인중개사 등록번호 |
|
|
사업자 등록번호 |
|
|
공인중개사 사무소 상호명 |
|
|
대표자 이름 |
|
|
공인중개사 사무소 대표 전화번호 |
|
|
중개 보조원명 |
|
|
공인중개사 사무소 주소 |
|
|
공인중개사 사무소 상세 주소 |
|
|
공인중개사 이메일 |
|
|
주거래 매물 |
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
2. 로그인
Request
POST /api/v1/users/sign-in HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 66
Host: localhost:8080
{
"userName" : "test_jhouse_com",
"password" : "abcdefG123!"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Set-Cookie: RefreshToken=eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3MTE5NzM0NzJ9._w-xM_PvY-2LEh_v6NpOYfqG2pyIAjumhLXrI1gF_MGhDlSAEjKrsLI33sDaGDjEiHvJ1i2n1UDmMiMrNyTSDw; Path=/; Domain=localhost; Max-Age=604800; Expires=Mon, 1 Apr 2024 12:11:12 GMT; Secure; HttpOnly; SameSite=None
Content-Type: application/json;charset=UTF-8
Content-Length: 299
{
"code" : "SUCCESS",
"message" : "성공",
"data" : {
"access_token" : "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzIsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.Ppa-zw8hU0ZfKpg4oi8ZSVA0vGF47omI7nhJICTlEyhXMTTUKZgiYMQD0c14dx2sD-pUZizePu7OWFyrGsOR9g"
}
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 79
{
"code" : "U0001",
"message" : "존재하지 않는 아이디입니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 82
{
"code" : "U0002",
"message" : "비밀번호가 일치하지 않습니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 83
{
"code" : "C0002",
"message" : "비밀번호 형식에 맞지 않습니다."
}
3. 토큰 재발급
Request
POST /api/v1/users/reissue HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 234
Host: localhost:8080
Cookie: RefreshToken=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzQsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.ZTAQ7tmA14Jxqe6UyFtthTNjsqPux3I7gSq0jfhqSaAOl4GTAPv07keuJd5iO6jD6X_WqMhZuKedX87qZEr9OA
{
"access_token" : "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzQsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.ZTAQ7tmA14Jxqe6UyFtthTNjsqPux3I7gSq0jfhqSaAOl4GTAPv07keuJd5iO6jD6X_WqMhZuKedX87qZEr9OA"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Set-Cookie: RefreshToken=eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3MTE5NzM0NzR9.6RkTr8ORLHqZd54vC-xDowk1787B4UCcToqzUoDg4Y37EzJz9n6dRsC5ScADytD0Cb3XRMbb9zvm14QgJueiYg; Path=/; Domain=localhost; Max-Age=604800; Expires=Mon, 1 Apr 2024 12:11:14 GMT; Secure; HttpOnly; SameSite=None
Content-Type: application/json;charset=UTF-8
Content-Length: 299
{
"code" : "SUCCESS",
"message" : "성공",
"data" : {
"access_token" : "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzQsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.ZTAQ7tmA14Jxqe6UyFtthTNjsqPux3I7gSq0jfhqSaAOl4GTAPv07keuJd5iO6jD6X_WqMhZuKedX87qZEr9OA"
}
}
4. 로그아웃
Request
POST /api/v1/users/logout HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzIsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.Ppa-zw8hU0ZfKpg4oi8ZSVA0vGF47omI7nhJICTlEyhXMTTUKZgiYMQD0c14dx2sD-pUZizePu7OWFyrGsOR9g
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Set-Cookie: RefreshToken=eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3MTE5NzM0NzJ9._w-xM_PvY-2LEh_v6NpOYfqG2pyIAjumhLXrI1gF_MGhDlSAEjKrsLI33sDaGDjEiHvJ1i2n1UDmMiMrNyTSDw; Path=/; Domain=localhost; Max-Age=0; Expires=Thu, 1 Jan 1970 00:00:00 GMT; Secure; HttpOnly; SameSite=None
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
5. 이메일 중복 검사
Request
POST /api/v1/users/check/email HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 54
Host: localhost:8080
{
"email" : "zzangu@jhouse.com",
"code" : "5335"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"code" : "SUCCESS",
"message" : "성공",
"data" : true
}
6. 닉네임 중복 검사
Request
POST /api/v1/users/check/nick-name HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 30
Host: localhost:8080
{
"nick_name" : "testuser"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"code" : "SUCCESS",
"message" : "성공",
"data" : true
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 80
{
"code" : "C0002",
"message" : "닉네임 형식에 맞지 않습니다."
}
7. 인증문자 전송
Request
POST /api/v1/users/send/sms HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 33
Host: localhost:8080
{
"phone_num" : "01011111111"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 83
{
"code" : "C0002",
"message" : "전화번호 형식에 맞지 않습니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 79
{
"code" : "U0000",
"message" : "이미 가입된 전화번호입니다."
}
8. 인증문자 검증
Request
POST /api/v1/users/check/sms HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 52
Host: localhost:8080
{
"phone_num" : "01011111111",
"code" : "0308"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"code" : "SUCCESS",
"message" : "성공",
"data" : true
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 83
{
"code" : "C0002",
"message" : "전화번호 형식에 맞지 않습니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 83
{
"code" : "C0002",
"message" : "인증번호 형식에 맞지 않습니다."
}
9. 닉네임 수정
Request
PUT /api/v1/users/update/nick-name HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzQsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.ZTAQ7tmA14Jxqe6UyFtthTNjsqPux3I7gSq0jfhqSaAOl4GTAPv07keuJd5iO6jD6X_WqMhZuKedX87qZEr9OA
Accept: application/json
Content-Length: 30
Host: localhost:8080
{
"nick_name" : "testuser"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 79
{
"code" : "U0005",
"message" : "이미 존재하는 닉네임입니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 80
{
"code" : "C0002",
"message" : "닉네임 형식에 맞지 않습니다."
}
10. 비밀번호 수정
Request
PUT /api/v1/users/update/password HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzUsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.WCfu0LNYbqIa4TSBhp5wUWksScAOEgtUMsVzZkME3Vr6RUSufcmDAu2grE_rtSUeDs-V1afxVD3vzDeCcgi09Q
Accept: application/json
Content-Length: 32
Host: localhost:8080
{
"password" : "abcdFGH123!"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 69
{
"code" : "U0006",
"message" : "비밀번호가 같습니다."
}
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 83
{
"code" : "C0002",
"message" : "비밀번호 형식에 맞지 않습니다."
}
11. 유저 정보 조회
주말내집에서는 총 3가지 타입으로 사용자를 분류합니다.
Authority는 관리자와 관리자가 아닌 사용자를 구분하는 용도입니다.
UserType은 일반 사용자, 공인중개사, 관리자(프론트/서버)를 구분하는 용도입니다.
UserType은 테크 블로그에서 관리자 내부 구분자로 사용되다가 공인중개사의 추가로 모든 사용자 타입을 구분하는 용도로 사용되고 있습니다.
분류 | Authority | UserType |
---|---|---|
일반 사용자 |
USER |
NONE |
공인중개사 |
USER |
AGENT |
관리자 |
ADMIN |
WEB |
관리자2 |
ADMIN |
SERVER |
Request
GET /api/v1/users HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzMsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.I-cDkhwb6uhfO6ghP6YtA72lXrYlPvgsg4T_rGYrFzh1AItnjSgU3AXoMnyGJqdPTJxnR_a5f5w3APX3rzJe1A
Accept: application/json
Host: localhost:8080
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 620
{
"code" : "SUCCESS",
"message" : "성공",
"data" : {
"id" : 37518,
"userName" : "test_jhouse_com",
"nick_name" : "테스트유저1",
"phone_num" : "01011111111",
"authority" : "USER",
"age" : "TEN",
"profile_image_url" : "https://duaily-content.s3.ap-northeast-2.amazonaws.com/default_profile_image.png",
"userType" : "NONE",
"email" : "zzangu@jhouse.com",
"suspenseReason" : null,
"reportedAt" : null,
"agentCode" : null,
"companyName" : null,
"companyAddress" : null,
"companyPhoneNum" : null,
"agentName" : null,
"assistantName" : null
}
}
12. 회원정보 수정
Request
PUT /api/v1/users HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzMsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.I-cDkhwb6uhfO6ghP6YtA72lXrYlPvgsg4T_rGYrFzh1AItnjSgU3AXoMnyGJqdPTJxnR_a5f5w3APX3rzJe1A
Accept: application/json
Content-Length: 127
Host: localhost:8080
{
"password" : "abcdefG123!",
"nick_name" : "nickname",
"new_password" : "abcdefg12345!",
"phone_num" : "01012345678"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
회원탈퇴 시, 사용되는 enum
enum 값 | Description |
---|---|
ROW_USE |
이용빈도 낮음 |
RE_JOIN |
재가입 |
INSUFFICIENT_CONTENT |
콘텐츠 및 정보 부족 |
PERSONAL_PROTECTION |
개인 정보 보호 |
ETC |
기타 |
위의 표에 나와 있는 description을 사용자가 선택하게 됩니다. 그 description을 그대로 복붙해서 요청 body에 넣어주시면 됩니다.
13. 유저 탈퇴
Request
POST /api/v1/users/withdrawal HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzIsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.Ppa-zw8hU0ZfKpg4oi8ZSVA0vGF47omI7nhJICTlEyhXMTTUKZgiYMQD0c14dx2sD-pUZizePu7OWFyrGsOR9g
Accept: application/json
Content-Length: 109
Host: localhost:8080
{
"reason" : [ "이용빈도 낮음", "콘텐츠 및 정보 부족", "기타" ],
"content" : "content!"
}
Response - Success
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
Response - Fail
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 76
{
"code" : "U0008",
"message" : "이미 탈퇴신청 되었습니다."
}
14. 이메일 인증번호 전송
Request
POST /api/v1/users/send/email HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 35
Host: localhost:8080
{
"email" : "zzangu@jhouse.com"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
이메일 전송 실패 시, 500 에러코드로 반환됩니다.
15. 이메일 인증번호 검증
Request
POST /api/v1/users/check/email HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 54
Host: localhost:8080
{
"email" : "zzangu@jhouse.com",
"code" : "5335"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"code" : "SUCCESS",
"message" : "성공",
"data" : true
}
이메일 인증코드는 전화번호 인증과 동일하게 3분의 유효시간을 설정해두었습니다. 해당 코드는 레디스에서 관리합니다. 성 인증 실패 시, 반환되는 데이터는 false 입니다.
16. 아이디 중복 검사
아이디는 로그인 시, 사용되는 값입니다.
Request
POST /api/v1/users/check/user-name HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 36
Host: localhost:8080
{
"userName" : "test_jhouse_com"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"code" : "SUCCESS",
"message" : "성공",
"data" : true
}
17. 이메일 수정
이메일 수정 시, 이메일 인증을 거쳐야 합니다.
Request
PUT /api/v1/users/update/email HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzMsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.I-cDkhwb6uhfO6ghP6YtA72lXrYlPvgsg4T_rGYrFzh1AItnjSgU3AXoMnyGJqdPTJxnR_a5f5w3APX3rzJe1A
Accept: application/json
Content-Length: 40
Host: localhost:8080
{
"email" : "testToTest@jmhouse.com"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
18. 전화번호 수정
전화번호 수정 시, 전화번호 인증을 거쳐야 합니다.
Request
PUT /api/v1/users/update/phone HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzMsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.I-cDkhwb6uhfO6ghP6YtA72lXrYlPvgsg4T_rGYrFzh1AItnjSgU3AXoMnyGJqdPTJxnR_a5f5w3APX3rzJe1A
Accept: application/json
Content-Length: 33
Host: localhost:8080
{
"phone_num" : "01012344321"
}
Path | Type | Description |
---|---|---|
|
|
전화번호 |
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 48
{
"code" : "SUCCESS",
"message" : "성공"
}
19. 비밀번호 확인
Request
POST /api/v1/users/check/password HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0X2pob3VzZV9jb20iLCJleHAiOjE3MTEzNzA0NzQsImF1dGgiOiJVU0VSIiwidHlwZSI6Ik5PTkUifQ.ZTAQ7tmA14Jxqe6UyFtthTNjsqPux3I7gSq0jfhqSaAOl4GTAPv07keuJd5iO6jD6X_WqMhZuKedX87qZEr9OA
Accept: application/json
Content-Length: 32
Host: localhost:8080
{
"password" : "abcdefG123!"
}
Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"code" : "SUCCESS",
"message" : "성공",
"data" : true
}