19 lines
612 B
Kotlin
19 lines
612 B
Kotlin
package kr.co.vividnext.sodalive.jwt
|
|
|
|
import org.springframework.security.core.AuthenticationException
|
|
import org.springframework.security.web.AuthenticationEntryPoint
|
|
import org.springframework.stereotype.Component
|
|
import javax.servlet.http.HttpServletRequest
|
|
import javax.servlet.http.HttpServletResponse
|
|
|
|
@Component
|
|
class JwtAuthenticationEntryPoint : AuthenticationEntryPoint {
|
|
override fun commence(
|
|
request: HttpServletRequest,
|
|
response: HttpServletResponse,
|
|
authException: AuthenticationException
|
|
) {
|
|
response.sendError(HttpServletResponse.SC_UNAUTHORIZED)
|
|
}
|
|
}
|