Skip to content

Commit

Permalink
Fixed accessToken variable
Browse files Browse the repository at this point in the history
  • Loading branch information
heinharaldsen committed Dec 13, 2024
1 parent 8e4218e commit ad74f1b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import com.netflix.graphql.dgs.codegen.gradle.GenerateJavaTask

plugins {
id("org.springframework.boot") version "3.3.2"
id("org.springframework.boot") version "3.4.0"
id("io.spring.dependency-management") version "1.1.6"
kotlin("jvm") version "2.0.10"
kotlin("plugin.spring") version "2.0.10"
kotlin("jvm") version "2.0.21"
kotlin("plugin.spring") version "2.0.21"
id("com.netflix.dgs.codegen") version "5.12.4"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
Expand All @@ -20,37 +20,37 @@ repositories {
}
}

val postgresVersion = "42.7.3"
val snakeYamlVersion = "2.2"
val diagnosekoderVersion = "1.2024.0"
val tokenSupportVersion = "5.0.1"
val testContainersVersion = "1.20.1"
val postgresVersion = "42.7.4"
val snakeYamlVersion = "2.3"
val diagnosekoderVersion = "1.2024.1"
val tokenSupportVersion = "5.0.11"
val testContainersVersion = "1.20.4"
val logstashLogbackEncoderVersion = "8.0"
val javaJwtVersion = "4.4.0"
val springBootResourceVersion = "3.3.2"
val springBootResourceVersion = "3.4.0"
val graphqlVersion = "20.2"
val kafkaClientsVersion = "3.8.0"
val kafkaClientsVersion = "3.9.0"
val syfoXmlCodegen = "2.0.1"
val springSecurityWebVersion = "6.3.1"
val springSecurityWebVersion = "6.4.1"
val okhttp3version = "4.12.0"
val jaxbApiVersion = "2.3.1"
val jaxbVersion = "2.4.0-b180830.0438"
val javaxActivationVersion = "1.1.1"
val javaTimeAdapterVersion = "1.1.3"
val graphqlDgsPlatformDependenciesVersion = "7.3.6"
val logbacksyslog4jVersion = "1.0.0"
val commonsCompressVersion = "1.27.0"
val commonsLang3Version = "3.16.0"
val httpClient5version = "5.2"
val commonsCompressVersion = "1.27.1"
val commonsLang3Version = "3.17.0"
val httpClient5version = "5.4.1"
val flywayVersion = "9.22.3"
val opentelemetryVersion = "2.3.0"
val opentelemetryVersion = "2.10.0"
val prometheusVersion = "0.16.0"
val mockkVersion = "1.13.10"
val mockkVersion = "1.13.13"
val kluentVersion = "1.73"
val coroutinesVersion = "1.8.1"
val coroutinesVersion = "1.9.0"
val coroutineReactorVersion = "1.9.0"
val hibernateVersion = "6.2.6.Final"
val jacksonDatatypeJsr310Version = "2.18.0"
val hibernateVersion = "6.6.3.Final"
val jacksonDatatypeJsr310Version = "2.18.1"
val mockitoKotlinVersion = "5.4.0"
dependencies {
implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:$graphqlDgsPlatformDependenciesVersion"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class AadRestTemplateConfiguration {
): ClientHttpRequestInterceptor {
return ClientHttpRequestInterceptor { request: HttpRequest, body: ByteArray, execution: ClientHttpRequestExecution ->
val response = oAuth2AccessTokenService.getAccessToken(clientProperties)
request.headers.setBearerAuth(response.accessToken!!)
request.headers.setBearerAuth(response.access_token!!)
execution.execute(request, body)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/no/nav/sykdig/config/M2MTokenService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class M2MTokenService(
?: throw RuntimeException("Client properties for $type not found")

val accessTokenResponse = oAuth2AccessTokenService.getAccessToken(clientProperties)
return accessTokenResponse.accessToken ?: throw RuntimeException("Failed to retrieve M2M access token")
return accessTokenResponse.access_token ?: throw RuntimeException("Failed to retrieve M2M access token")
}
}

0 comments on commit ad74f1b

Please sign in to comment.