fix(auth): update InternalAuthFilter to use @ApplicationScoped and add index-dependency configuration
Build & Test (NowChessSystems) TeamCity build failed

This commit is contained in:
2026-05-05 06:49:45 +02:00
parent 847b13202c
commit 6e0fd9523e
3 changed files with 9 additions and 5 deletions
@@ -3,6 +3,10 @@ quarkus:
port: 8080
application:
name: nowchess-core
index-dependency:
security:
group-id: de.nowchess
artifact-id: security
redis:
hosts: redis://${REDIS_HOST:localhost}:${REDIS_PORT:6379}
max-pool-wait-time: 500ms
@@ -41,7 +41,7 @@ class InternalAuthFilterHttpTest:
.body("{}")
.when()
.post("/api/board/game")
.then()
.`then`()
.statusCode(401)
@Test
@@ -53,7 +53,7 @@ class InternalAuthFilterHttpTest:
.body("{}")
.when()
.post("/api/board/game")
.then()
.`then`()
.statusCode(401)
@Test
@@ -62,6 +62,6 @@ class InternalAuthFilterHttpTest:
RestAssured.`given`()
.when()
.get("/api/board/game/nonexistent")
.then()
.`then`()
.statusCode(404)
// scalafix:on
@@ -1,6 +1,6 @@
package de.nowchess.security
import jakarta.inject.Singleton
import jakarta.enterprise.context.ApplicationScoped
import jakarta.ws.rs.container.{ContainerRequestContext, ContainerRequestFilter}
import jakarta.ws.rs.core.Response
import jakarta.ws.rs.ext.Provider
@@ -9,7 +9,7 @@ import scala.compiletime.uninitialized
@Provider
@InternalOnly
@Singleton
@ApplicationScoped
class InternalAuthFilter extends ContainerRequestFilter:
@ConfigProperty(name = "nowchess.internal.secret", defaultValue = "")