Skip to content

Commit

Permalink
✨ Health Check 엔드포인트 수정 및 인증 설정 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
RetepMil committed Oct 1, 2023
1 parent 91fc4d9 commit 5453db8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ class JwtAuthenticationFilter(
) : GenericFilterBean() {
override fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain?) {
logger.debug("JWT 필터 로직 실행")
val httpRequest = request as HttpServletRequest

if (httpRequest.requestURI == "/health") {
chain?.doFilter(request, response)
return
}

// HttpServletRequest의 accessToken 값에 대한 검증을 실시
val token = resolveAccessToken(request as HttpServletRequest)
val token = resolveAccessToken(httpRequest)
if (token != null && jwtTokenProvider.validateToken(token) == JwtCode.ACCESS) {
val authentication = jwtTokenProvider.getAuthentication(token)
SecurityContextHolder.getContext().authentication = authentication
Expand Down

0 comments on commit 5453db8

Please sign in to comment.