Make session refresh retries idempotent
Preserve the successor session for legitimate refresh retries so transient failures no longer revoke the user's session family.
This commit is contained in:
@@ -20,6 +20,24 @@ class DeploymentConsistencyTest : FunSpec({
|
||||
documentedPaths shouldBe EXPECTED_PUBLIC_PATHS
|
||||
}
|
||||
|
||||
test("session refresh idempotency stays aligned across API, schema, and deployment") {
|
||||
val openApi = root.read("docs/openapi.yaml")
|
||||
val migration = root.read(
|
||||
"src/main/resources/db/migration/V29__idempotent_session_refresh.sql",
|
||||
)
|
||||
|
||||
openApi shouldContain "refreshOperationId"
|
||||
migration shouldContain "encrypted_replacement_refresh_token"
|
||||
migration shouldContain "refresh_replay_until"
|
||||
listOf(
|
||||
root.read("src/main/resources/application.yaml"),
|
||||
root.read(".env.example"),
|
||||
root.read("compose.yaml"),
|
||||
).forEach { configuration ->
|
||||
configuration shouldContain "LEGACY_REFRESH_REPLAY_SECONDS"
|
||||
}
|
||||
}
|
||||
|
||||
test("OpenAPI defines admin pagination and response contracts") {
|
||||
val openApi = root.read("docs/openapi.yaml")
|
||||
val sessionSchema = openApi
|
||||
|
||||
Reference in New Issue
Block a user