회원 인증(Auth)

1. 회원가입

1.1. 성공 201

http-request

POST /auth HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 121
Host: docs.api.com

{
  "email" : "user@test.com",
  "password" : "passWORD123!",
  "nickname" : "testUser1",
  "authKey" : "11111111"
}
Path
Type
Description

email

String

valid email

password

String

valid password

nickname

String

valid nickname

authKey

String

auth key

http-response

Path
Type
Description

accessToken

String

set client’s local storage

refreshToken

String

set client’s cookie

avatarPath

String

profile image path

1.2. 실패 400_유효성 검사

http-request

Path
Type
Description

email

String

invalid email

password

String

password

nickname

String

nickname

authKey

String

auth Key

http-response

1.3. 실패 404_인증키

http-request

Path
Type
Description

email

String

valid email

password

String

valid password

nickname

String

valid nickname

authKey

String

auth key is only valid for one hour

http-response

1.4. 실패 409_중복_이메일

http-request

Path
Type
Description

email

String

exist email

password

String

valid password

nickname

String

valid nickname

authKey

String

auth Key

http-response

1.5. 실패 409_중복_닉네임

http-request

Path
Type
Description

email

String

valid email

password

String

valid password

nickname

String

이미 존재하는 닉네임.

authKey

String

auth Key

http-response


2. 이메일 인증 메일 전송

2.1. 성공 201

http-request

Path
Type
Description

email

String

the same email can only be verified once every 5 minutes.

http-response

2.2. 실패 409_시간 제한

http-request

Path
Type
Description

email

String

the same email can only be verified once every 5 minutes.

http-response

2.3. 실패 409_이미 존재하는 이메일

http-request

Path
Type
Description

email

String

이미 존재하는 이메일

http-response


3. 이메일 인증

3.1. 성공 200

http-request

Path
Type
Description

authKey

String

user authKey

email

String

user email

http-response

Path
Type
Description

authKey

String

set in user’s useState And send when requestJoin

3.2. 실패 404_존재하지_않음

http-request

Path
Type
Description

authKey

String

invalid authKey

email

String

user email

http-response


4. 닉네임 중복 확인

4.1. 성공 200

http-request

Path
Type
Description

nickname

String

중복되지 않는 닉네임

http-response

4.2. 실패 400_유효성 검사

http-request

Path
Type
Description

nickname

String

유효성 검사 실패, 닉네임은 null이거나 공백일 수 없으며 닉네임 규정을 충족해야합니다.

http-response

4.3. 실패 409_닉네임 중복

http-request

Path
Type
Description

nickname

String

이미 존재하는 닉네임 요청

http-response

5. 로그인

5.1. 성공 201

http-request

Path
Type
Description

email

String

valid user email

password

String

valid user password

http-response

Path
Type
Description

accessToken

String

accessToken, set client’s LocalStorage

refreshToken

String

refreshToken, set client’s Cookie

avatarPath

String

profile image remote path

5.2. 실패 401 잘못된 입력값

http-request

Path
Type
Description

email

String

Invalid email or not found email

password

String

Invalid password or not found email

http-response

response-fields


6. 로그아웃

6.1. 성공 204

http-request

http-response

6.2. 실패 404

http-request

http-response

response-fields

7. 리프레시 토큰 갱신

7.1. 성공 201

http-request

http-response

Path
Type
Description

accessToken

String

set client’s localStorage

refreshToken

String

set client’s cookie

avatarPath

String

user profile image

7.2. 실패 401_유효하지 않은 토큰

http-request

http-response

response-fields

7.3. 실패 404_존재하지 않는 토큰

http-request

http-response

response-fields


8. 비밀번호 변경

8.1. 성공 200

http-request

Path
Type
Description

originalPassword

String

변경 전 패스워드

newPassword

String

유효성 검사 실패 패스워드

http-response

8.2. 실패 409_잘못된 패스워드

http-request

Path
Type
Description

originalPassword

String

변경 전 패스워드

newPassword

String

유효성 검사 실패 패스워드

http-response

8.3. 실패 409_잘못된 패스워드

http-request

Path
Type
Description

originalPassword

String

기존 패스워드(잘못된 값 입력)

newPassword

String

변경 희망 패스워드

http-response


9. 비밀번호 찾기_이메일 인증

9.1. 성공 201_이메일 전송

http-request

Path
Type
Description

email

String

user email

http-response

9.2. 실패 404_존재하지 않는 이메일

http-request

Path
Type
Description

email

String

존재하지 않는 유저 메일일 경우

http-response

9.3. 실패 409_5분내_요청_이력

http-request

Path
Type
Description

email

String

5분 내에 해당 이메일로 인증키를 요청한 이력이 있을 경우

http-response


10. 비밀번호 찾기_임시패스워드 발급

10.1. 성공 200_이메일 전송

http-request

Path
Type
Description

email

String

유저 이메일

authKey

String

인증키

http-response

10.2. 실패 400_유효성 검사

http-request

Path
Type
Description

email

String

이메일

authKey

Null

인증키

http-response

10.3. 실패 404_존재하지 않는 인증키

http-request

Path
Type
Description

email

String

유저 이메일

authKey

String

잘못된 인증키

http-response


11. 회원탈퇴

11.1. 성공 204

http-request

Path
Type
Description

password

String

올바르지 않은 (database 등록값과 다른) 패스워드

http-response

11.2. 실패 400_유효성 검사

http-request

Path
Type
Description

password

String

패스워드 유효성 검사 실패 (null이거나 공백, 혹은 알 수 없는 문자열 오류)

http-response

11.3. 실패 409_잘못된 패스워드

http-request

Path
Type
Description

password

String

올바르지 않은 (database 등록값과 다른) 패스워드

http-response

Last updated

Was this helpful?