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 #67

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

로그인 API SPEC #67

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-in
  • Header
Name Value Description
TIME-ZONE time-zone 클라이언트가 사용하는 타임존
  • parameter
Name Type Description
  • example
curl -X POST "http://localhost:8080/users/sign-in" -H "accept: */*" -H "Time-Zone: KST" -H "Content-Type: application/json" -d "{ \"fcmToken\": \"fcmtoken\", \"password\": \"test\", \"userId\": \"test\"}"


Response

Success

  • Status: 200 OK
  • Header
Name Value Description
content-type application/json
date
{
  "tokens": {
    "authenticationToken": "eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMzODQifQ.eyJpc3MiOiJBUEkgU2VydmVyIiwic3ViIjoiQXV0aGVudGljYXRpb24gVG9rZW4iLCJleHAiOjE1ODA0OTczMTcsImlhdCI6MTU4MDQxMDkxNywidXNlcklkIjoidGVzdCIsImlkIjoxfQ.YPE2iCyT_G78vjahO80GvjHuEqgEMIkC3LNNCDBtcOU_VnJZVspMny2PwePWzNRG",
    "refreshToken": "eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMzODQifQ.eyJpc3MiOiJBUEkgU2VydmVyIiwic3ViIjoiUmVmcmVzaCBUb2tlbiIsImV4cCI6MTU4MzAwMjkxNywiaWF0IjoxNTgwNDEwOTE3LCJ1c2VySWQiOiJ0ZXN0IiwiaWQiOjF9.K_mKmQZ8wasuX2u7_cDEAl_mMEIjBBtQv7G5_RnbAUkWGrloU_MeeZFDl3HC5Ynk"
  },
  "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"
  }
}

401 UNAUTHORIZED

//Nonexistent UserId
{
  "error": {
    "code": 4104,
    "message": "Nonexistent UserId”
  }
}
//Is Not Equal To Password
{
  "error": {
    "code": 4105,
    "message": "Is Not Equal To Password”
  }
}

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 self-assigned this Jan 30, 2020
@korea8378 korea8378 changed the title 오늘의 운세 보기(별자리별) API 로그인 API SPEC 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