diff --git a/capsa-core/src/main/kotlin/digital/capsa/core/auth/ClientCredentials.kt b/capsa-core/src/main/kotlin/digital/capsa/core/auth/ClientCredentials.kt index f1dc948..a001fad 100644 --- a/capsa-core/src/main/kotlin/digital/capsa/core/auth/ClientCredentials.kt +++ b/capsa-core/src/main/kotlin/digital/capsa/core/auth/ClientCredentials.kt @@ -18,7 +18,9 @@ import org.springframework.web.client.RestClientException import org.springframework.web.client.RestTemplate @Configuration -class ClientCredentials { +class ClientCredentials( + private val restTemplate: RestTemplate +) { companion object { /* @@ -27,9 +29,6 @@ class ClientCredentials { var authTokenCache: MutableMap = mutableMapOf() } - @Autowired - private lateinit var restTemplate: RestTemplate - @Value("\${auth-token-service.host}") private lateinit var authTokenServiceHost: String