From 60011663bf7d7b513c38d0b0ebf286ea862071ff Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 16 Jun 2024 17:43:46 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20access=20token=20=EC=9E=AC=EB=B0=9C?= =?UTF-8?q?=EA=B8=89=20API=EB=A5=BC=20=EC=9C=84=ED=95=9C=20DTO=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/auth/dto/AccessTokenResponse.java | 10 ++++++++++ .../api/auth/dto/RefreshTokenRequest.java | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/AccessTokenResponse.java create mode 100644 src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/RefreshTokenRequest.java diff --git a/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/AccessTokenResponse.java b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/AccessTokenResponse.java new file mode 100644 index 0000000..ab400f2 --- /dev/null +++ b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/AccessTokenResponse.java @@ -0,0 +1,10 @@ +package com.sanbosillok.sanbosillokserver.api.auth.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; + +@Data +@AllArgsConstructor +public class AccessTokenResponse { + private String accessToken; +} diff --git a/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/RefreshTokenRequest.java b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/RefreshTokenRequest.java new file mode 100644 index 0000000..01245ec --- /dev/null +++ b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/RefreshTokenRequest.java @@ -0,0 +1,10 @@ +package com.sanbosillok.sanbosillokserver.api.auth.dto; + +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +public class RefreshTokenRequest { + private String refreshToken; +} From 01270460b148b4a42a3df8639f186ee27bc8e2f1 Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 16 Jun 2024 17:44:39 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20LoginResponse=EC=97=90=20refresh=20?= =?UTF-8?q?token=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sanbosillokserver/api/auth/dto/LoginResponse.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/LoginResponse.java b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/LoginResponse.java index 33b5d20..716fc3a 100644 --- a/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/LoginResponse.java +++ b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/LoginResponse.java @@ -4,10 +4,12 @@ @Data public class LoginResponse { + private String refreshToken; private String accessToken; private String role; - public LoginResponse(String accessToken, String role) { + public LoginResponse(String refreshToken, String accessToken, String role) { + this.refreshToken = refreshToken; this.accessToken = accessToken; this.role = role; } From 95f8b7e66b25e52202d9286bf6eceb860cb067fb Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 16 Jun 2024 17:45:04 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20CustomUserDetails=EC=97=90=20getId?= =?UTF-8?q?=20=EB=A9=94=EC=84=9C=EB=93=9C=20=EC=B6=94=EA=B0=80=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sanbosillokserver/api/auth/dto/CustomUserDetails.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/CustomUserDetails.java b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/CustomUserDetails.java index 76aacf6..aa586f6 100644 --- a/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/CustomUserDetails.java +++ b/src/main/java/com/sanbosillok/sanbosillokserver/api/auth/dto/CustomUserDetails.java @@ -34,6 +34,8 @@ public String getUsername() { return member.getUsername(); } + public Long getId() { return member.getId(); } + @Override public boolean isAccountNonExpired() { return true;