Skip to content

Commit

Permalink
πŸ› CORS 였λ₯˜ μˆ˜μ •
Browse files Browse the repository at this point in the history
- μ„œλΉ„μŠ€ μ½”λ“œλ₯Ό μˆ˜μ •ν•˜μ˜€μŠ΅λ‹ˆλ‹€.
  • Loading branch information
Ganghee-Lee-0522 committed Jan 12, 2024
1 parent 1a99cb9 commit e38a808
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand All @@ -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");
Expand Down

0 comments on commit e38a808

Please sign in to comment.