diff --git a/src/cds/src/main/kotlin/org/icpclive/cds/atcoder/AtcoderDataSource.kt b/src/cds/src/main/kotlin/org/icpclive/cds/atcoder/AtcoderDataSource.kt index b110fae73..4fbf741c6 100644 --- a/src/cds/src/main/kotlin/org/icpclive/cds/atcoder/AtcoderDataSource.kt +++ b/src/cds/src/main/kotlin/org/icpclive/cds/atcoder/AtcoderDataSource.kt @@ -43,10 +43,10 @@ internal class ContestData( val StandingsData: List ) -internal class AtcoderDataSource(val settings: AtcoderSettings) : FullReloadContestDataSource(5.seconds) { +internal class AtcoderDataSource(val settings: AtcoderSettings, creds: Map) : FullReloadContestDataSource(5.seconds) { val teamIds = Enumerator() val problemIds = Enumerator() - private val loader = jsonLoader(settings.network, ClientAuth.CookieAuth("REVEL_SESSION", settings.sessionCookie)) { "https://atcoder.jp/contests/${settings.contestId}/standings/json" } + private val loader = jsonLoader(settings.network, ClientAuth.CookieAuth("REVEL_SESSION", settings.sessionCookie.get(creds))) { "https://atcoder.jp/contests/${settings.contestId}/standings/json" } var submissionId: Int = 1 val runs = mutableMapOf, List>() diff --git a/src/cds/src/main/kotlin/org/icpclive/cds/settings/CDSSettings.kt b/src/cds/src/main/kotlin/org/icpclive/cds/settings/CDSSettings.kt index 036c2d282..c09795f53 100644 --- a/src/cds/src/main/kotlin/org/icpclive/cds/settings/CDSSettings.kt +++ b/src/cds/src/main/kotlin/org/icpclive/cds/settings/CDSSettings.kt @@ -230,7 +230,7 @@ class CodeDrillsSettings( @Serializable class AtcoderSettings( val contestId: String, - val sessionCookie: String, + val sessionCookie: Credential, @Serializable(with = HumanTimeSerializer::class) val startTime: Instant, @Serializable(with = DurationInSecondsSerializer::class) @@ -238,7 +238,7 @@ class AtcoderSettings( override val emulation: EmulationSettings? = null, override val network: NetworkSettings? = null ) : CDSSettings() { - override fun toDataSource(creds: Map) = AtcoderDataSource(this) + override fun toDataSource(creds: Map) = AtcoderDataSource(this, creds) } @SerialName("cms")