Log auth verify entry
All checks were successful
build-and-deploy / build-deploy (push) Successful in 26s

This commit is contained in:
androidlover5842
2026-01-26 21:33:13 +05:30
parent 8f47725f13
commit 7ec8d6d350

View File

@@ -7,6 +7,7 @@ import com.android.trisolarisserver.repo.PropertyUserRepo
import com.android.trisolarisserver.security.MyPrincipal
import com.google.firebase.auth.FirebaseAuth
import jakarta.servlet.http.HttpServletRequest
import org.slf4j.LoggerFactory
import org.springframework.security.core.annotation.AuthenticationPrincipal
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
@@ -21,12 +22,14 @@ class Auth(
private val appUserRepo: AppUserRepo,
private val propertyUserRepo: PropertyUserRepo
) {
private val logger = LoggerFactory.getLogger(Auth::class.java)
@PostMapping("/verify")
fun verify(
@AuthenticationPrincipal principal: MyPrincipal?,
request: HttpServletRequest
): AuthResponse {
logger.info("Auth verify hit, principalPresent={}", principal != null)
return buildAuthResponse(principal ?: resolvePrincipalFromHeader(request))
}