From e38a808518b120e4f09ec3cb117fe8816d00fb40 Mon Sep 17 00:00:00 2001 From: Ganghee-Lee-0522 Date: Sat, 13 Jan 2024 03:19:32 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20CORS=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 서비스 코드를 수정하였습니다. --- .../committersserver/auth/config/AuthenticationUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/AuthenticationUtils.java b/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/AuthenticationUtils.java index b50dfe1..5103195 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/AuthenticationUtils.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/AuthenticationUtils.java @@ -14,7 +14,7 @@ public static String getNickname() { Authentication authentication = getAuthentication(); if (authentication != null) { - return getCustomAuthenticationToken(authentication).getName(); + return String.valueOf(getCustomAuthenticationToken(authentication).getName()); } // 커스텀 필요 throw new UsernameNotFoundException("Nickname not found in the current Authentication context"); @@ -25,7 +25,7 @@ public static Long getMemberId() { Authentication authentication = getAuthentication(); if (authentication != null) { - return getCustomAuthenticationToken(authentication).getMemberId(); + return Long.valueOf(getCustomAuthenticationToken(authentication).getMemberId()); } // 커스텀 필요 throw new UsernameNotFoundException("Member ID not found in the current Authentication context"); @@ -35,7 +35,7 @@ public static Role getRole() { Authentication authentication = getAuthentication(); if(authentication != null) { - return getCustomAuthenticationToken(authentication).getRole(); + return Role.valueOf(getCustomAuthenticationToken(authentication).getRole().toString()); } // 커스텀 필요 throw new UsernameNotFoundException("Role not found in the current Authentication context");