- https://github.com/ali-bouali/spring-boot-3-jwt-security
- (book) 만들면서 배우는 클린 아키텍처
Java 17
Gradle
Spring Boot 3.2.0
Spring Data JPA
Spring Security
jsonwebtoken
H2 Database
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com.seungilahn
│ │ │ └── springboot3jwttemplate
│ │ │ ├── auth
│ │ │ ├── common
│ │ │ ├── config
│ │ │ └── user
│ │ │ ├── adapter
│ │ │ ├── in
│ │ │ └── out
│ │ │ ├── application
│ │ │ ├── port
│ │ │ ├── in
│ │ │ └── out
│ │ │ └── service
│ │ │ └── domain
- Response
{
"code": 200,
"message": "success",
"data": {}
}
- URL:
/api/v1/signup
- Method:
POST
- Request
{
"email": "[email protected]",
"name": "test",
"phoneNumber": "010-1234-5678",
"password": "test1234",
"role": "USER"
}
- Response
{
"access_token": "..",
"refresh_token": ".."
}
- URL:
/api/v1/signin
- Method:
POST
- Request
{
"email": "[email protected]",
"password": "test1234"
}
- Response
{
"access_token": "..",
"refresh_token": ".."
}
- URL:
/api/v1/auth/signout
- Method:
POST
- Request
{
"refresh_token": ".."
}
- URL:
/api/v1/auth/refresh-token
- Method:
POST
- Request
{
"refresh_token": ".."
}
- Response
{
"access_token": "..",
"refresh_token": ".."
}
- URL:
/api/v1/users
- Method:
PUT
- Header
Authorization: Bearer {access_token}
- Request
{
"name": "test",
"phoneNumber": "010-1234-5678"
}
- URL:
/api/v1/users
- Method:
DELETE
- Header
Authorization: Bearer {access_token}