%F0%9F%8C%B7 USER %F0%9F%8C%B7 - Polaris-Sopterm/Polaris-BACKEND GitHub Wiki

목차


회원가입 API


Decription


유저의 회원가입 API 입니다.

  • 이메일, 비밀번호, 닉네임이 누락된 경우 에러가 발생합니다.
  • 이메일 형식이 올바르지 않을 경우 에러가 발생합니다.

Request


EndPoint

POST /user/v0

Header

application/json

Body Parameter

parameter Type Description
email string 이메일
password string 비밀번호
nickname string 닉네임

Response


{
  "idx": {integer},
  "email": {string},
  "password": {string},
  "nickname": {string},
  "createdAt": {string},
  "updatedAt": {string},
}

사용자 수정 API


Decription


유저의 닉네임을 변경할 수 있습니다

Request


EndPoint

PATCH /user/v0/me

Header

application/json, Authorization Baerer

Body Parameter

parameter Type Description
nickname string 닉네임

Response


{
  "idx": {integer},
  "email": {string},
  "password": {string},
  "nickname": {string},
  "createdAt": {string},
  "updatedAt": {string},
}

이메일 중복 체크 API


Decription


이메일 중복 여부를 확인합니다.

Request


EndPoint

POST /user/v0/checkEmail

Header

application/json

Body Parameter

parameter Type Description
email string 이메일

Response


{
  "email": {string},
  "isDuplicated": false,
}

로그인 API


Decription


이메일과 비밀번호를 이용해 로그인합니다.

Request


EndPoint

POST /auth/v0

Header

Body Parameter

parameter Type Description
email string(email)' 이메일
password string 비밀번호

Response


{
  "accessToken": {string(jwt)},
  "refreshToken": {string},
}

회원탈퇴 API


Decription


유저 회원탈퇴 API 입니다.

Request


EndPoint

DELETE /user/v0

Header

application/json token: Bearer

Response


{
  "isSuccess": true,
}

로그아웃 API


Decription


로그아웃 합니다.

Request


EndPoint

DELETE /auth/v0

Header

Body Parameter

Response


200

{
  "isSuccess": true
},

AccessToken 재발급 api


Decription


액세스 토큰을 재발급 받습니다.

Request


EndPoint

PUT /auth/v0

Header

Body Parameter

parameter Type Description
refreshToken string' 재발급 토큰

Response


{
  "accessToken": {string(jwt)},
  "refreshToken": {string},
}
⚠️ **GitHub.com Fallback** ⚠️