diff --git a/src/main/java/com/newfit/reservation/common/auth/jwt/TokenProvider.java b/src/main/java/com/newfit/reservation/common/auth/jwt/TokenProvider.java index 2f312a4b..b4cd404b 100644 --- a/src/main/java/com/newfit/reservation/common/auth/jwt/TokenProvider.java +++ b/src/main/java/com/newfit/reservation/common/auth/jwt/TokenProvider.java @@ -122,7 +122,7 @@ public Authentication getAnonymousAuthentication(String token) { Claims claims = getClaims(token); Set authorities = Collections.singleton(new SimpleGrantedAuthority(Role.GUEST.getDescription())); - return new UsernamePasswordAuthenticationToken(new org.springframework.security.core.userdetails.User(claims.getSubject(), "", authorities), token, authorities); + return new UsernamePasswordAuthenticationToken(new org.springframework.security.core.userdetails.User("anonymous", "", authorities), token, authorities); } private List getAuthorityIdList(String token) {