http://localhost:8080https://{YOUR_BACKEND_HOST}:{PORT}application/jsonaccessToken이 필요한 요청에는 HTTP 헤더에
Authorization: Bearer {accessToken}
logout에서는 refreshToken을 동일하게 Authorization 헤더에 실어 보냅니다.
POST /auth/signup
Request Body (UserSignupRequest)
| 필드 | 타입 | 설명 |
|---|---|---|
| String | 필수, 최대 100자, 이메일 형식 | |
| password | String | 필수, 8~100자, 대·소문자·숫자 포함 |
| username | String | 필수, 최대 100자 |
| phoneNumber | String | 선택, 01012345678 형식 |
| hasAsthma | Boolean | 필수, 천식 여부 |
| hasAllergy | Boolean | 필수, 알레르기 여부 |
| notificationEnabled | Boolean | 필수, 알림 on/off |
| nightNotificationEnabled | Boolean | 필수, 야간 알림 on/off |
| warningEnabled | Boolean | 필수, 경고 on/off |
| nightWarningEnabled | Boolean | 필수, 야간 경고 on/off |
Response: 200 OK
{
"userId": 1,
"email": "[email protected]",
"username": "홍길동",
"phoneNumber": "01012345678",
"hasAsthma": false,
"hasAllergy": true,
"isVerified": false,
"createdAt": "2025-05-14T04:12:00Z",
"updatedAt": "2025-05-14T04:12:00Z",
"notificationEnabled": true,
"nightNotificationEnabled": false,
"warningEnabled": true,
"nightWarningEnabled": false
}
POST /auth/login
Request Body (LoginRequest)
{
"email": "[email protected]",
"password": "P@ssw0rd1"
}
Response: 200 OK (TokenResponse)
{
"accessToken": "{JWT_ACCESS_TOKEN}",
"refreshToken": "{JWT_REFRESH_TOKEN}"
}
POST /auth/refresh?refreshToken={JWT_REFRESH_TOKEN}