From a98515e77a296c4ffecb5c2e9c5aa3149802f5b7 Mon Sep 17 00:00:00 2001 From: Jan-Olav Eide Date: Tue, 26 Nov 2024 16:08:55 +0100 Subject: [PATCH] =?UTF-8?q?set=20default=20va=C3=B8ue=20for=20matcher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/spring/oauth2/OAuth2ClientRequestInterceptor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/token-client-spring/src/main/kotlin/no/nav/security/token/support/client/spring/oauth2/OAuth2ClientRequestInterceptor.kt b/token-client-spring/src/main/kotlin/no/nav/security/token/support/client/spring/oauth2/OAuth2ClientRequestInterceptor.kt index aaff59f3..2351d364 100644 --- a/token-client-spring/src/main/kotlin/no/nav/security/token/support/client/spring/oauth2/OAuth2ClientRequestInterceptor.kt +++ b/token-client-spring/src/main/kotlin/no/nav/security/token/support/client/spring/oauth2/OAuth2ClientRequestInterceptor.kt @@ -21,7 +21,7 @@ import org.springframework.http.client.ClientHttpResponse */ class OAuth2ClientRequestInterceptor(private val properties: ClientConfigurationProperties, private val service: OAuth2AccessTokenService, - private val matcher: ClientConfigurationPropertiesMatcher) : ClientHttpRequestInterceptor { + private val matcher: ClientConfigurationPropertiesMatcher = object : ClientConfigurationPropertiesMatcher {}) : ClientHttpRequestInterceptor { override fun intercept(req: HttpRequest, body: ByteArray, execution: ClientHttpRequestExecution): ClientHttpResponse { matcher.findProperties(properties, req.uri)?.let { service.getAccessToken(it).access_token?.let { token -> req.headers.setBearerAuth(token) }