@@ -30,7 +30,7 @@ class RestTemplateConfig(
30
30
private val clientConfigurationProperties : ClientConfigurationProperties ,
31
31
private val oAuth2AccessTokenService : OAuth2AccessTokenService ? ,
32
32
private val meterRegistry : MeterRegistry ,
33
- ) {
33
+ ) {
34
34
private val logger = LoggerFactory .getLogger(RestTemplateConfig ::class .java)
35
35
36
36
init {
@@ -81,7 +81,7 @@ class RestTemplateConfig(
81
81
fun fagmodulOidcRestTemplate (): RestTemplate = opprettRestTemplate(fagmodulUrl, " fagmodul-credentials" )
82
82
83
83
@Bean
84
- fun bestemSakOidcRestTemplate (): RestTemplate = opprettRestTemplate(bestemSakUrl, " proxy -credentials" )
84
+ fun bestemSakOidcRestTemplate (): RestTemplate = opprettRestTemplate(bestemSakUrl, " pensjon -credentials" )
85
85
86
86
@Bean
87
87
fun navansattRestTemplate (): RestTemplate ? = opprettRestTemplate(navansattUrl, " navansatt-credentials" )
@@ -114,17 +114,17 @@ class RestTemplateConfig(
114
114
115
115
private fun opprettRestTemplate (url : String , oAuthKey : String ) : RestTemplate {
116
116
return RestTemplateBuilder ()
117
- .rootUri(url)
118
- .errorHandler(DefaultResponseErrorHandler ())
119
- .additionalInterceptors(
120
- RequestIdHeaderInterceptor (),
121
- IOExceptionRetryInterceptor (),
122
- RequestCountInterceptor (meterRegistry),
123
- bearerTokenInterceptor(clientProperties(oAuthKey), oAuth2AccessTokenService!! )
124
- )
125
- .build().apply {
126
- requestFactory = BufferingClientHttpRequestFactory (SimpleClientHttpRequestFactory ())
127
- }
117
+ .rootUri(url)
118
+ .errorHandler(DefaultResponseErrorHandler ())
119
+ .additionalInterceptors(
120
+ RequestIdHeaderInterceptor (),
121
+ IOExceptionRetryInterceptor (),
122
+ RequestCountInterceptor (meterRegistry),
123
+ bearerTokenInterceptor(clientProperties(oAuthKey), oAuth2AccessTokenService!! )
124
+ )
125
+ .build().apply {
126
+ requestFactory = BufferingClientHttpRequestFactory (SimpleClientHttpRequestFactory ())
127
+ }
128
128
}
129
129
130
130
private fun buildRestTemplate (url : String ): RestTemplate {
0 commit comments