diff --git a/build.gradle b/build.gradle index 51d42b93..b78ca334 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { springKafkaVersion = '3.2.4' jacksonModuleKotlinVersion = '2.18.1' cxfVersion = '3.3.4' - tokenSupportVersion = '4.1.4' + tokenSupportVersion = '5.0.11' } } diff --git a/src/main/kotlin/no/nav/eessi/pensjon/config/RestTemplateConfig.kt b/src/main/kotlin/no/nav/eessi/pensjon/config/RestTemplateConfig.kt index a6cac526..178aaef4 100644 --- a/src/main/kotlin/no/nav/eessi/pensjon/config/RestTemplateConfig.kt +++ b/src/main/kotlin/no/nav/eessi/pensjon/config/RestTemplateConfig.kt @@ -87,8 +87,8 @@ class RestTemplateConfig( ): ClientHttpRequestInterceptor { return ClientHttpRequestInterceptor { request: HttpRequest, body: ByteArray?, execution: ClientHttpRequestExecution -> val response = oAuth2AccessTokenService.getAccessToken(clientProperties) - request.headers.setBearerAuth(response.accessToken!!) - val tokenChunks = response.accessToken!!.split(".") + request.headers.setBearerAuth(response.access_token!!) + val tokenChunks = response.access_token!!.split(".") val tokenBody = tokenChunks[1] logger.debug("subject: " + JWTClaimsSet.parse(Base64.getDecoder().decode(tokenBody).decodeToString()).subject) execution.execute(request, body!!)