fix(auth): update InternalAuthFilter to use @ApplicationScoped and add index-dependency configuration
Build & Test (NowChessSystems) TeamCity build failed
Build & Test (NowChessSystems) TeamCity build failed
This commit is contained in:
@@ -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
|
||||
|
||||
+3
-3
@@ -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 = "")
|
||||
|
||||
Reference in New Issue
Block a user