๊ณตํต headers
| Name | Description | optional |
|---|---|---|
access_token |
JWT accessToken |
|
refresh_token |
JWT refreshToken (accessToken์ด ๋ง๋ฃ๋ ๊ฒฝ์ฐ, ์ฌ๋ฐ๊ธ ์ฉ๋๋ก ์ฌ์ฉ) |
๊ณตํต ResponseCode
| Code | Description |
|---|---|
SUCCESS |
success. |
INVALID_TOKEN_ERROR |
invalid token error occurred. |
WRONG_PASSWORD_ERROR |
wrong password error occurred. |
ALREADY_LOGOUT_ERROR |
already logout error occurred. |
AUTH_ERROR |
auth error occurred. |
ACCESS_DENIED_ERROR |
access denied error occurred. |
EXIST_MEMBER |
already member error occurred. |
UNKNOWN_ERROR |
unknown error occurred. |
MANUAL_ERROR |
manual error occurred. |
NOT_FOUNT_ERROR |
not found error occurred. |
INVALID_REQUEST_PARAM |
invalid request parameter error occurred. |
ENCRYPT_ERROR |
encrypt error occurred |
DECRYPT_ERROR |
decrypt error occurred |
์ ์ API
์ ์ ํ์๊ฐ์
POST localhost:8080/api/user/join HTTP/1.1
Request
$ curl 'http://localhost:8080/api/user/join' -i -X POST \
-H 'Content-Type: application/json;charset=utf-8' \
-H 'Accept: application/json' \
-H 'access_token: access_token_value' \
-H 'refresh_token: refresh_token_value' \
-d '{
"username" : "test",
"password" : "test",
"name" : "test",
"phoneNumber" : "01011111111"
}'
| Depth1 | type | Description | optional |
|---|---|---|---|
name |
String |
ํ์ ์ด๋ฆ |
|
username |
String |
๋ก๊ทธ์ธ ID |
|
password |
String |
๋ก๊ทธ์ธ PWD |
|
phoneNumber |
String |
ํ์ ์ ํ๋ฒํธ |
sample
POST /api/user/join HTTP/1.1
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: 100
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value
{
"username" : "test",
"password" : "test",
"name" : "test",
"phoneNumber" : "01011111111"
}
Response
| Depth1 | Depth2 | type | optional | Description | format |
|---|---|---|---|---|---|
resultCode |
|
String |
o |
๊ฒฐ๊ณผ ์ฝ๋ |
|
resultMessage |
|
String |
o |
๊ฒฐ๊ณผ ๋ฉ์ธ์ง |
|
body |
|
Object |
x |
๊ฒฐ๊ณผ |
|
|
id |
Number |
x |
ํ์ SEQ |
|
sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93
{
"resultCode" : "SUCCESS",
"resultMessage" : "success.",
"body" : {
"id" : 1
}
}
์ ์ ๋ก๊ทธ์ธ
POST localhost:8080/api/user/login HTTP/1.1
Request
$ curl 'http://localhost:8080/api/user/login' -i -X POST \
-H 'Content-Type: application/json;charset=utf-8' \
-H 'Accept: application/json' \
-H 'access_token: access_token_value' \
-H 'refresh_token: refresh_token_value' \
-d '{
"username" : "test",
"password" : "test"
}'
| Depth1 | type | Description | optional |
|---|---|---|---|
username |
String |
๋ก๊ทธ์ธ ID |
|
password |
String |
๋ก๊ทธ์ธ PWD |
sample
POST /api/user/login HTTP/1.1
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: 48
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value
{
"username" : "test",
"password" : "test"
}
Response
| Depth1 | Depth2 | type | optional | Description | format |
|---|---|---|---|---|---|
resultCode |
|
String |
o |
๊ฒฐ๊ณผ ์ฝ๋ |
|
resultMessage |
|
String |
o |
๊ฒฐ๊ณผ ๋ฉ์ธ์ง |
|
body |
|
Object |
x |
๊ฒฐ๊ณผ |
|
|
accessToken |
String |
x |
JWT accessToken |
|
|
refreshToken |
String |
x |
JWT refreshToken |
|
sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 165
{
"resultCode" : "SUCCESS",
"resultMessage" : "success.",
"body" : {
"accessToken" : "access_token_value",
"refreshToken" : "refresh_token_value"
}
}
์ ์ ๋ก๊ทธ์์
DELETE localhost:8080/api/user/logout HTTP/1.1
Request
$ curl 'http://localhost:8080/api/user/logout' -i -X DELETE \
-H 'access_token: access_token_value' \
-H 'refresh_token: refresh_token_value'
sample
DELETE /api/user/logout HTTP/1.1
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value
Response
| Depth1 | type | optional | Description | format |
|---|---|---|---|---|
resultCode |
String |
o |
๊ฒฐ๊ณผ ์ฝ๋ |
|
resultMessage |
String |
o |
๊ฒฐ๊ณผ ๋ฉ์ธ์ง |
|
body |
Null |
x |
๊ฒฐ๊ณผ |
|
sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 79
{
"resultCode" : "SUCCESS",
"resultMessage" : "success.",
"body" : null
}
ํ์ API
ํ์ ์กฐํ(๋ก๊ทธ์ธ ID)
GET localhost:8080/api/member/{username} HTTP/1.1
Request
$ curl 'http://localhost:8080/api/member/test' -i -X GET \
-H 'access_token: access_token_value' \
-H 'refresh_token: refresh_token_value'
| Name | Description |
|---|---|
username |
๋ก๊ทธ์ธ ID |
sample
GET /api/member/test HTTP/1.1
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value
Response
| Depth1 | Depth2 | type | optional | Description | format |
|---|---|---|---|---|---|
resultCode |
|
String |
o |
๊ฒฐ๊ณผ ์ฝ๋ |
|
resultMessage |
|
String |
o |
๊ฒฐ๊ณผ ๋ฉ์ธ์ง |
|
body |
|
Object |
x |
๊ฒฐ๊ณผ |
|
|
id |
Number |
x |
ํ์ SEQ |
|
|
username |
String |
x |
๋ก๊ทธ์ธ ID |
|
|
name |
String |
x |
ํ์ ์ด๋ฆ |
|
|
phoneNumber |
String |
o |
ํ์ ์ ํ๋ฒํธ |
|
|
createdAt |
String |
x |
ํ์ ์์ฑ์ผ์ |
yyyy-mm-dd HH:mm:ss |
|
updatedAt |
String |
x |
ํ์ ์์ ์ผ์ |
yyyy-mm-dd HH:mm:ss |
|
imageUrl |
String |
o |
ํ์ ํ๋กํ URL |
|
sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 305
{
"resultCode" : "SUCCESS",
"resultMessage" : "success.",
"body" : {
"id" : 1,
"username" : "test",
"name" : "test",
"phoneNumber" : "01011111111",
"createdAt" : "2025-02-17T17:59:28.911535",
"updatedAt" : "2025-02-17T17:59:28.911551",
"imageUrl" : "https://~~.com"
}
}