Skip to content

Commit

Permalink
chore: log authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
Youthhing committed Dec 25, 2024
1 parent 6cf7b0f commit da998fd
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import lombok.extern.slf4j.Slf4j;
import org.cotato.csquiz.common.config.jwt.JwtTokenProvider;
import org.cotato.csquiz.domain.auth.entity.Member;
import org.cotato.csquiz.domain.auth.service.component.MemberReader;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
Expand Down Expand Up @@ -42,8 +41,6 @@ public class JwtAuthorizationFilter extends OncePerRequestFilter {

private final JwtTokenProvider jwtTokenProvider;

private final MemberReader memberReader;

@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
Expand All @@ -58,8 +55,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
private void setAuthentication(String accessToken) {
Member member = jwtTokenProvider.getMemberByToken(accessToken);
String role = member.getRole().toString();
// log.info("[인증 필터 인증 진행, {}]", memberId);
log.info("Member Role: {}", role);
log.info("authenticated member : <{}> , <{}>", member.getId(), member.getName());

Authentication authenticationToken = new UsernamePasswordAuthenticationToken(member, "",
List.of(new SimpleGrantedAuthority(role)));
Expand Down

0 comments on commit da998fd

Please sign in to comment.