Skip to content

Commit

Permalink
Fixed code after updating ktor to 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
zeldigas committed Mar 1, 2025
1 parent c37944a commit 2e6f841
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import io.ktor.client.plugins.auth.providers.*

interface ConfluenceAuth {

fun create(auth: Auth)
fun create(auth: AuthConfig)

}

data class PasswordAuth(private val username: String, private val password: String) : ConfluenceAuth {
override fun create(auth: Auth) {
override fun create(auth: AuthConfig) {
val creds = BasicAuthCredentials(username, password)
auth.basic {
credentials { creds }
Expand All @@ -25,7 +25,7 @@ data class PasswordAuth(private val username: String, private val password: Stri
}

data class TokenAuth(private val token: String) : ConfluenceAuth {
override fun create(auth: Auth) {
override fun create(auth: AuthConfig) {
auth.bearer {
loadTokens { BearerTokens(token, "") }
sendWithoutRequest { true }
Expand Down

0 comments on commit 2e6f841

Please sign in to comment.