From ebd3ce7b36aaff7903f7fd2092a893595ef7c31d Mon Sep 17 00:00:00 2001 From: seokjin8678 Date: Thu, 23 May 2024 00:17:05 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=86=A0=ED=81=B0=20Subject=EC=97=90?= =?UTF-8?q?=20=EC=8B=9D=EB=B3=84=EC=9E=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 하위 호환성을 지키기 위해 기존 방식은 유지 --- .../auth/infrastructure/AdminAuthenticationTokenProvider.java | 1 + .../auth/infrastructure/MemberAuthenticationTokenProvider.java | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/src/main/java/com/festago/auth/infrastructure/AdminAuthenticationTokenProvider.java b/backend/src/main/java/com/festago/auth/infrastructure/AdminAuthenticationTokenProvider.java index 00cd23d01..fe572fb13 100644 --- a/backend/src/main/java/com/festago/auth/infrastructure/AdminAuthenticationTokenProvider.java +++ b/backend/src/main/java/com/festago/auth/infrastructure/AdminAuthenticationTokenProvider.java @@ -18,6 +18,7 @@ public class AdminAuthenticationTokenProvider { public TokenResponse provide(AdminAuthentication adminAuthentication) { return tokenProviderTemplate.provide(EXPIRATION_MINUTES, jwtBuilder -> jwtBuilder + .subject(adminAuthentication.getId().toString()) .claim(ADMIN_ID_KEY, adminAuthentication.getId()) .audience().add(Role.ADMIN.name()).and() ); diff --git a/backend/src/main/java/com/festago/auth/infrastructure/MemberAuthenticationTokenProvider.java b/backend/src/main/java/com/festago/auth/infrastructure/MemberAuthenticationTokenProvider.java index 9b3c2907c..830acc15e 100644 --- a/backend/src/main/java/com/festago/auth/infrastructure/MemberAuthenticationTokenProvider.java +++ b/backend/src/main/java/com/festago/auth/infrastructure/MemberAuthenticationTokenProvider.java @@ -18,6 +18,7 @@ public class MemberAuthenticationTokenProvider { public TokenResponse provide(MemberAuthentication memberAuthentication) { return tokenProviderTemplate.provide(EXPIRATION_MINUTES, jwtBuilder -> jwtBuilder + .subject(memberAuthentication.getId().toString()) .claim(MEMBER_ID_KEY, memberAuthentication.getId()) .audience().add(Role.MEMBER.name()).and() );