Skip to content

Commit

Permalink
set default vaøue for matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Olav Eide committed Nov 26, 2024
1 parent 252ab9b commit a98515e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit a98515e

Please sign in to comment.