Skip to content

Commit fe03022

Browse files
committed
register default inteceptor
1 parent a87a4c2 commit fe03022

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

token-client-spring/src/main/kotlin/no/nav/security/token/support/client/spring/oauth2/OAuth2ClientConfiguration.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ class OAuth2ClientConfiguration : ImportAware {
3131
attrs = requireNotNull(fromMap(meta.getAnnotationAttributes(EnableOAuth2Client::class.java.name, false))) { "@EnableOAuth2Client is not present on importing class ${meta.className}" }
3232
}
3333

34+
@Bean
35+
fun oAuth2ClientRequestInterceptor(properties: ClientConfigurationProperties, service: OAuth2AccessTokenService) = OAuth2ClientRequestInterceptor(properties, service)
36+
37+
3438
@Bean
3539
fun oAuth2AccessTokenService(bearerTokenResolver: JwtBearerTokenResolver, client: OAuth2HttpClient) =
3640
if (attrs?.getBoolean("cacheEnabled") == true) {

token-validation-spring/src/main/kotlin/no/nav/security/token/support/spring/EnableJwtTokenValidationConfiguration.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class EnableJwtTokenValidationConfiguration (private val env: Environment) : Web
5151
attrs = fromMap(meta.getAnnotationAttributes(EnableJwtTokenValidation::class.java.name, false)) ?: throw IllegalArgumentException("@EnableJwtTokenValidation is not present on importing class ${meta.className}")
5252
}
5353

54+
5455
//TO-DO remove support for global proxy - should be set per issuer config
5556
@Bean
5657
fun oidcResourceRetriever() = ProxyAwareResourceRetriever(configuredProxy(), env.getProperty("https.plaintext", Boolean::class.java, false))

0 commit comments

Comments
 (0)