규칙
Header
Authorization= jwt token
ex)
Authorization: jwt eyJ0eXAiOiJKV1QiLCJzI1NiJ9.....
Request-regulation
parameter sending으로 묶어서 보냄
ex) parameter key sending
{"sending":{"email":"asd@naver.com, "password":"abcd", ......}}
Response-regulation
response 는 json을 string 형태로 변환하여 반환. 클라이언트에서 추출하여 사용할 데이터는 payload로 묶어서 보낸다.
ex) response basic structure
payload 안에 처리할 데이터를 넣어주고 밖에는 response 메시지를 적어준
"{\"payload\": {\"result\": true, \"code\": \"9028\"}, \"message\": \"Send success\"}"
SignUp, login, Auto Login
회원가입 플로우
이메일 인증 -> 회원가입 -> 토큰 발급(토큰이 정 발급되면 바로 로그인이 되도록 로직을 짜 준다)
Last updated
Was this helpful?