인프런 커뮤니티 질문&답변

kjkkmk42397님의 프로필 이미지

작성한 질문수

스프링부트 JUnit 테스트 - 시큐리티를 활용한 Bank 애플리케이션

Jwt 인가필터 구현 및 등록완료

jwt 인가필터 규현및 등록

23.12.11 14:05 작성

·

230

0

회원가입은 되는데 로그인 시도 시 에러 뜨고 그전에 에러 메시지에는 아래와 같이 나왔습니다. 어느 부분에서 잘못된것일까여.springframework.security.authentication.InternalAuthenticationServiceException: 인증실패 at shop.mtcoding.bank.config.auth.LoginService.lambda$loadUserByUsername$0(LoginService.java:22) at java.base/java.util.Optional.orElseThrow(Optional.java:408) at shop.mtcoding.bank.config.auth.LoginService.loadUserByUsername(LoginService.java:21) at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:94) at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:133) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:201) at shop.mtcoding.bank.config.jwt.JwtAuthenticationFilter.attemptAuthentication(JwtAuthenticationFilter.java:50) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:217) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)

답변 1

0

최주호님의 프로필 이미지
최주호
지식공유자

2023. 12. 12. 16:22

DB에 ssar 유저이름이 없는것 같아요