Adds JWT-based auth with refresh tokens

This commit is contained in:
2026-04-09 15:57:26 -05:00
parent 3a53769421
commit 9633d95e75
21 changed files with 426 additions and 48 deletions

View File

@@ -0,0 +1,18 @@
package net.halfbinary.scavengerhuntapi.config
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.springframework.security.core.AuthenticationException
import org.springframework.security.web.AuthenticationEntryPoint
import org.springframework.stereotype.Component
@Component
class AuthEntrypointJwt: AuthenticationEntryPoint {
override fun commence(
request: HttpServletRequest,
response: HttpServletResponse,
authException: AuthenticationException
) {
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.message)
}
}