diff --git a/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareApiClient.kt b/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareApiClient.kt index 95d4ea7..e437ba4 100644 --- a/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareApiClient.kt +++ b/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareApiClient.kt @@ -13,7 +13,7 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient @Consumes(MediaType.APPLICATION_JSON) interface CloudflareApiClient { - data class CredentialRequest(val ttl: Long) + data class CredentialRequest(val ttl: Long, val customIdentifier: String?) data class CredentialResponse(val iceServers: IceServers) { data class IceServers(val urls: List, val username: String, val credential: String) } diff --git a/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareSessionHandler.kt b/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareSessionHandler.kt index d2a0653..858bda3 100644 --- a/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareSessionHandler.kt +++ b/src/main/kotlin/com/faforever/icebreaker/service/cloudflare/CloudflareSessionHandler.kt @@ -31,7 +31,10 @@ class CloudflareSessionHandler( override fun getIceServersSession(sessionId: String): List = cloudflareApiAdapter.requestIceServers( - credentialRequest = CloudflareApiClient.CredentialRequest(ttl = fafProperties.tokenLifetimeSeconds()), + credentialRequest = CloudflareApiClient.CredentialRequest( + ttl = fafProperties.tokenLifetimeSeconds(), + customIdentifier = sessionId, + ), ).let { listOf( Session.Server(