Skip to content

Commit

Permalink
Revert "use restTemplate bean in client credentials"
Browse files Browse the repository at this point in the history
This reverts commit 23b05e6.
  • Loading branch information
BacicaFlorinTelus committed Oct 14, 2021
1 parent cc1e745 commit 1e85c97
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import digital.capsa.core.logger
import java.time.ZonedDateTime
import javax.xml.bind.DatatypeConverter
import org.slf4j.MDC
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpEntity
Expand All @@ -27,9 +26,6 @@ class ClientCredentials {
var authTokenCache: MutableMap<String, AuthToken> = mutableMapOf()
}

@Autowired
private lateinit var restTemplate: RestTemplate

@Value("\${auth-token-service.host}")
private lateinit var authTokenServiceHost: String

Expand Down Expand Up @@ -109,7 +105,7 @@ class ClientCredentials {
params.add("scope", scope)

return try {
restTemplate.exchange(
RestTemplate().exchange(
authTokenServiceBaseUri,
HttpMethod.POST,
HttpEntity(params, requestHeaders),
Expand Down

0 comments on commit 1e85c97

Please sign in to comment.