-
Notifications
You must be signed in to change notification settings - Fork 0
1.1) Auth Request Sample
Jong1 edited this page Nov 4, 2023
·
1 revision
Warning
모든 Request, Response가 존재하지 않을 수 있습니다
curl --location 'http://localhost:8080/auth/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"email" : "[email protected]",
"nickName" : "적셔",
"password" : "11111111",
"role" : "USER"
}'
{
"createAt": "2023-10-17 08:55:42",
"updateAt": "2023-10-17 08:55:42",
"id": 3,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "적셔",
"thumbnail": null,
"role": "USER",
"oauthInfo": null,
"status": null,
"loginType": "DEFAULT"
}
curl --location 'http://localhost:8080/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email" : "[email protected]",
"password" : "11111111"
}'
{
"token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NTMzMjc2LCJleHAiOjE2OTc1NjkyNzYsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.ys5w2OBBcScP-yWnHn9-_RDgHlvCuQU5Apkp9gK9J0YfZG2Ckueg4B-4Q5xOQTu3-hjOVtQSHgtCw-54-CU5Rg"
}
curl --location 'http://localhost:8080/mypage' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAzNTQ1LCJleHAiOjE2OTc2Mzk1NDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.RjqfcRyI9JzgEDqOxWC9xk_ZBns9skxns3V0F9qdLpjl7mTyjl5CyWjQ5xa7MueXYgq2V3TFTiYqaBttizAIeA' \
--header 'language: KO'
{
"userId": 1,
"email": "[email protected]",
"thumbnail": null,
"nickName": "관리자"
}
curl --location 'http://localhost:8080/mypage/mylist/article?page=0&limit=5' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAzNTQ1LCJleHAiOjE2OTc2Mzk1NDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.RjqfcRyI9JzgEDqOxWC9xk_ZBns9skxns3V0F9qdLpjl7mTyjl5CyWjQ5xa7MueXYgq2V3TFTiYqaBttizAIeA' \
--header 'language: KO'
curl --location 'http://localhost:8080/mypage/mylist/reply?page=0&limit=5' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAzNTQ1LCJleHAiOjE2OTc2Mzk1NDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.RjqfcRyI9JzgEDqOxWC9xk_ZBns9skxns3V0F9qdLpjl7mTyjl5CyWjQ5xa7MueXYgq2V3TFTiYqaBttizAIeA' \
--header 'language: KO'
curl --location 'http://localhost:8080/mypage/mylist/like?page=0&limit=5' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAzNTQ1LCJleHAiOjE2OTc2Mzk1NDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.RjqfcRyI9JzgEDqOxWC9xk_ZBns9skxns3V0F9qdLpjl7mTyjl5CyWjQ5xa7MueXYgq2V3TFTiYqaBttizAIeA' \
--header 'language: KO'
[
{
"createAt": "2023-10-18 02:54:24",
"updateAt": "2023-10-18 02:54:24",
"boardId": 1,
"articleId": 7,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "너무귀여운 우리 응애미쯔",
"content": "<b>사랑해 ~~~~~~~알라쀼~~~</b>",
"createdUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
},
{
"createAt": "2023-10-17 11:26:00",
"updateAt": "2023-10-17 11:26:00",
"boardId": 1,
"articleId": 6,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "미쯔야~",
"content": "<b>사랑해 ~~~~~~~</b>",
"createdUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
},
{
"createAt": "2023-10-17 11:25:36",
"updateAt": "2023-10-17 11:25:36",
"boardId": 3,
"articleId": 5,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "엘라스틴했어요",
"content": "<p>배고파요 흑흑흑</p>",
"createdUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
},
{
"createAt": "2023-10-17 11:25:20",
"updateAt": "2023-10-17 11:25:20",
"boardId": 2,
"articleId": 4,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "오리엔탈",
"content": "<div>유니티</div>",
"createdUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
},
{
"createAt": "2023-10-17 11:24:56",
"updateAt": "2023-10-17 11:24:56",
"boardId": 2,
"articleId": 3,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 1,
"contentLanguage": "KO",
"title": "근우야!!!!!",
"content": "잘하자",
"createdUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
}
]
[
{
"createAt": "2023-10-18 04:17:02",
"updateAt": "2023-10-18 04:17:02",
"articleId": 7,
"replyId": 9,
"orgReplyLanguage": "KO",
"createUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "응애응애 너무 졸린 점심이에요~~~~"
},
{
"createAt": "2023-10-17 12:05:33",
"updateAt": "2023-10-17 12:05:33",
"articleId": 5,
"replyId": 8,
"orgReplyLanguage": "EN",
"createUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "나는 매우 슬프다"
},
{
"createAt": "2023-10-17 12:05:20",
"updateAt": "2023-10-17 12:05:20",
"articleId": 5,
"replyId": 7,
"orgReplyLanguage": "KO",
"createUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "뿌애애애애애애앵"
},
{
"createAt": "2023-10-17 12:05:00",
"updateAt": "2023-10-17 12:05:00",
"articleId": 5,
"replyId": 6,
"orgReplyLanguage": "KO",
"createUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "코드싸개가 흑흑흑"
},
{
"createAt": "2023-10-17 12:04:30",
"updateAt": "2023-10-17 12:04:30",
"articleId": 4,
"replyId": 5,
"orgReplyLanguage": "KO",
"createUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "여기 사람있어요ㅠㅠㅠㅠ"
}
]
[
{
"createAt": "2023-10-17 11:24:56",
"updateAt": "2023-10-17 11:24:56",
"boardId": 2,
"articleId": 3,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 1,
"contentLanguage": "KO",
"title": "근우야!!!!!",
"content": "잘하자",
"createdUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
},
{
"createAt": "2023-10-17 11:25:20",
"updateAt": "2023-10-17 11:25:20",
"boardId": 2,
"articleId": 4,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "오리엔탈",
"content": "<div>유니티</div>",
"createdUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 04:44:57",
"updateAt": "2023-10-18 04:44:57",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
}
]
curl --location --request PUT 'http://localhost:8080/mypage' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjA3MTA1LCJleHAiOjE2OTc2NDMxMDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.eV0-PuDE1og7c4Q7mJAM_-CGDCKIrhiCiO2BymuBXEV8d_-6WLwmXBRKYPbYFlcABdx8hKMEu7DpT8sHndq99Q' \
--header 'language: KO' \
--header 'Content-Type: application/json' \
--data '{
"password" : "2222",
"nickName" : "야 뽕세환~"
}'
{
"result": true,
"message": "수정이 완료되었습니다."
}
curl --location --request PUT 'http://localhost:8080/mypage/thumnail' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjA3MTA1LCJleHAiOjE2OTc2NDMxMDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.eV0-PuDE1og7c4Q7mJAM_-CGDCKIrhiCiO2BymuBXEV8d_-6WLwmXBRKYPbYFlcABdx8hKMEu7DpT8sHndq99Q' \
--header 'language: KO' \
--header 'Content-Type: application/json' \
--data '{
"thumnail": "local/abc/j.jpg"
}'
curl --location --request PUT 'http://localhost:8080/mypage/thumnail' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjA3MTA1LCJleHAiOjE2OTc2NDMxMDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.eV0-PuDE1og7c4Q7mJAM_-CGDCKIrhiCiO2BymuBXEV8d_-6WLwmXBRKYPbYFlcABdx8hKMEu7DpT8sHndq99Q' \
--header 'language: KO' \
--header 'Content-Type: application/json' \
--data '{
"thumbnail": ""
}'
{
"result": true,
"message": "수정이 완료되었습니다."
}
{
"result": false,
"message": "요청 Path가 없습니다."
}
footertest