로그아웃 추가
서블릿 필터에서 Exception 발생시 처리
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package kr.co.vividnext.sodalive.configs
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import kr.co.vividnext.sodalive.common.ExceptionHandlerFilter
|
||||
import kr.co.vividnext.sodalive.jwt.JwtAccessDeniedHandler
|
||||
import kr.co.vividnext.sodalive.jwt.JwtAuthenticationEntryPoint
|
||||
import kr.co.vividnext.sodalive.jwt.JwtFilter
|
||||
@@ -21,6 +23,7 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
|
||||
@EnableWebSecurity
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||
class SecurityConfig(
|
||||
private val objectMapper: ObjectMapper,
|
||||
private val tokenProvider: TokenProvider,
|
||||
private val accessDeniedHandler: JwtAccessDeniedHandler,
|
||||
private val authenticationEntryPoint: JwtAuthenticationEntryPoint
|
||||
@@ -69,6 +72,7 @@ class SecurityConfig(
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.addFilterBefore(jwtFilter, UsernamePasswordAuthenticationFilter::class.java)
|
||||
.addFilterBefore(ExceptionHandlerFilter(objectMapper), JwtFilter::class.java)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user