Skip to content

Commit

Permalink
fix: anonymous 사용자의 User 모델의 username 필드가 null이 되지 않도록 수정 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 committed Oct 10, 2023
1 parent d1ff104 commit dd3cb0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public Authentication getAnonymousAuthentication(String token) {
Claims claims = getClaims(token);
Set<SimpleGrantedAuthority> 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<Integer> getAuthorityIdList(String token) {
Expand Down

0 comments on commit dd3cb0c

Please sign in to comment.