Skip to content

dkstm95/spring-boot-3-jwt-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reference

기술 스택

  • 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

API

공통 응답

  • 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": ".."
}

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}

About

Simple jwt project by spring boot 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages