[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 03/03: [pos] config endpoint does not need authent
From: |
gnunet |
Subject: |
[taler-taler-android] 03/03: [pos] config endpoint does not need authentication |
Date: |
Tue, 21 Jul 2020 20:07:08 +0200 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a commit to branch master
in repository taler-android.
commit 4bd0b7a75344b08cf5f84c360a28fc3f575b8501
Author: Torsten Grote <t@grobox.de>
AuthorDate: Tue Jul 21 15:05:32 2020 -0300
[pos] config endpoint does not need authentication
---
merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt | 8 ++------
.../src/main/java/net/taler/merchantpos/config/ConfigManager.kt | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt
b/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt
index 656b093..3406f78 100644
--- a/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt
+++ b/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt
@@ -21,17 +21,13 @@ import io.ktor.client.engine.okhttp.OkHttp
import io.ktor.client.features.json.JsonFeature
import io.ktor.client.features.json.serializer.KotlinxSerializer
import io.ktor.client.request.get
-import io.ktor.client.request.header
-import io.ktor.http.HttpHeaders.Authorization
class MerchantApi(private val httpClient: HttpClient) {
constructor() : this(getDefaultHttpClient())
- suspend fun getConfig(baseUrl: String, apiKey: String = "sandbox"):
ConfigResponse {
- return httpClient.get("$baseUrl/config") {
- header(Authorization, "ApiKey $apiKey")
- }
+ suspend fun getConfig(baseUrl: String): ConfigResponse {
+ return httpClient.get("$baseUrl/config")
}
}
diff --git
a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
index a7aff18..3f45e32 100644
---
a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
+++
b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
@@ -122,7 +122,7 @@ class ConfigManager(
}
scope.launch(Dispatchers.IO) {
- val configResponse = api.getConfig(merchantConfig.baseUrl,
merchantConfig.apiKey)
+ val configResponse = api.getConfig(merchantConfig.baseUrl)
onMerchantConfigReceived(config, json, merchantConfig,
configResponse)
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.