Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

회원가입 API SPEC #69

Open
4 of 9 tasks
korea8378 opened this issue Jan 15, 2020 · 0 comments
Open
4 of 9 tasks

회원가입 API SPEC #69

korea8378 opened this issue Jan 15, 2020 · 0 comments
Assignees
Labels
API SPEC API SPEC

Comments

@korea8378
Copy link
Contributor

korea8378 commented Jan 15, 2020

회원가입 API SPEC

  • 별자리, 이메일, 비밀번호, 아이디, FCMToken을 입력하여 회원가입을 할 수 있다.
  • 회원가입되면 사용자의 정보와 인증용&재발급용 토큰을 발급받는다.

Request

HTTP Method URI
POST /users/sign-up
  • Header
Name Value Description
Authorization JWT 회원가입용 JWT
  • parameter
Name Type Description
  • example
curl -X POST "http://localhost:8080/users/sign-up" -H "accept: */*" -H "Authorization: Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMzODQifQ.eyJpc3MiOiJBUEkgU2VydmVyIiwic3ViIjoiU2lnbiBVcCBUb2tlbiIsImV4cCI6MTU4MDQ5NjIxMCwiaWF0IjoxNTgwNDA5ODEwLCJlbWFpbCI6ImtvcmVhODM3OEBuYXZlci5jb20ifQ.mD32IUroKxfpgP8ek2fhzya7CuGQYHYN2CxKHv_rnheq0RWXqLSa92RyiXx2mhhH" -H "Time-Zone: KST" -H "Content-Type: application/json" -d "{ \"constellation\": \"물병자리\", \"email\": \"[email protected]\", \"password\": \"test\", \"userId\": \"test\",\"fcmToken\":\"e_cpiq4ia8A:APA91bF2fLZbUWzI7cKNLfthSbYHaImfdRykHtu7Oq1iRFxpybiGs12tz84oFnaeJ-03Uu2tDD0EszGIfuqbazsYmB9ukqDQqlQkR0k7c55MqEu46ZCTxXstMGg_3HM4fHGpKpKqypMH\"}"


Response

Success

  • Status: 200 OK
  • Header
Name Value Description
content-type application/json
date
{
  "tokens": {
    "authenticationToken": "eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMzODQifQ.eyJpc3MiOiJBUEkgU2VydmVyIiwic3ViIjoiQXV0aGVudGljYXRpb24gVG9rZW4iLCJleHAiOjE1ODA0OTY0NzAsImlhdCI6MTU4MDQxMDA3MCwidXNlcklkIjoidGVzdCIsImlkIjoxfQ.KaRR9Ma9aq674zORQQys1Esz3p0yxT52Sn8crR3-q6GzZZ3tXKnGNO1k1a6TgAFS",
    "refreshToken": "eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMzODQifQ.eyJpc3MiOiJBUEkgU2VydmVyIiwic3ViIjoiUmVmcmVzaCBUb2tlbiIsImV4cCI6MTU4MzAwMjA3MCwiaWF0IjoxNTgwNDEwMDcwLCJ1c2VySWQiOiJ0ZXN0IiwiaWQiOjF9.1T3N12hYeVZe32eeRsHRY3gsGIsNoS9dyNXYii8dYjguMxGGsx1X-tIXGPkeDDqd"
  },
  "user": {
    "id": 1,
    "userId": "test",
    "constellation": "물병자리",
    "timeZone": "KST",
    "horoscopeAlarmFlag": true,
    "questionAlarmFlag": true,
    "horoscopeTime": "23:00:00",
    "questionTime": "13:00:00"
  }
}

Fail

Status Description
400 BAD_REQUEST 잘 못 된 요청
401 UNAUTHORIZED 인증 실패
500 Internal Server Error unknown server error

400 BAD_REQUEST

//Request Worn Field
{
  "error": {
    "code": 4001,
    "message": "Request Field Null or Wrong Form - Check Request Field"
  }
}
//Not Found Constellation
{
  "error": {
    "code": 4005,
    "message": “Not Found Constellation”
  }
}
//Exists UserId
{
  "error": {
    "code": 4006,
    "message": “Exists UserId”
  }
}

401 UNAUTHORIZED

//Fail Authentication
{
  "error": {
    "code": 4101,
    "message": "Fail Authentication - check token”
  }
}

Check List

  • issue 제목은 유의미한가?
  • issue 내용은 issue 내용만 확인하고도 모르는 사람도 파악할 수 있을 정도로 기술되었는가? (무엇을, 언제, 어디서...)
  • reference가 있다면 추가했는가?
  • 관련 issue가 있다면 추가했는가?
  • 유의미한 Label을 추가했는가?
  • Assginees를 추가했는가?
  • Estimate를 추가했는가?
  • 관련 Milestone이 있다면 추가했는가?
  • 관련 Epics가 있다면 추가했는가?
@korea8378 korea8378 added the API SPEC API SPEC label Jan 15, 2020
@korea8378 korea8378 changed the title 일기 수정 API 회원가입 API SPEC Jan 30, 2020
@korea8378 korea8378 self-assigned this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API SPEC API SPEC
Projects
None yet
Development

No branches or pull requests

1 participant