From ca954bd54bb54ccdf3ec23316d20558ee327b71a Mon Sep 17 00:00:00 2001 From: nilsarne Date: Thu, 7 Nov 2024 13:43:46 +0100 Subject: [PATCH] Pakkeoppdateringer og tilpasning av kode etter oppdatering av tokensupport pakker --- arkiverer/pom.xml | 2 ++ .../arkivering/soknadsarkiverer/config/RestClientConfig.kt | 2 +- .../arkivering/soknadsarkiverer/config/SafMaskinClientConfig.kt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arkiverer/pom.xml b/arkiverer/pom.xml index 929eef81..146ecd99 100644 --- a/arkiverer/pom.xml +++ b/arkiverer/pom.xml @@ -66,11 +66,13 @@ org.jetbrains.kotlin kotlin-reflect + com.expediagroup graphql-kotlin-spring-client diff --git a/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt b/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt index f42bea18..aeec8320 100644 --- a/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt +++ b/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt @@ -123,7 +123,7 @@ class RestClientConfig { body: ByteArray, execution: ClientHttpRequestExecution ): ClientHttpResponse { - val token = tokenService.getToken()?.accessToken + val token = tokenService.getToken()?.access_token val callId = MDC.get(Constants.HEADER_CALL_ID) logger.info("Kaller service med callId: $callId") diff --git a/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/SafMaskinClientConfig.kt b/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/SafMaskinClientConfig.kt index 1c863ef2..2911289d 100644 --- a/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/SafMaskinClientConfig.kt +++ b/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/SafMaskinClientConfig.kt @@ -66,7 +66,7 @@ class SafMaskinClientConfig( it.header(NAV_CONSUMER_ID, applicationName) it.header( HttpHeaders.AUTHORIZATION, - "$BEARER${oAuth2AccessTokenService.getAccessToken(getClientProperties(oauth2Config))?.accessToken}", + "$BEARER${oAuth2AccessTokenService.getAccessToken(getClientProperties(oauth2Config)).access_token}", ) }