Skip to content

Commit

Permalink
Don't create StupsTokenComponent when not needed
Browse files Browse the repository at this point in the history
When the application already supplies a NakadiPublishingClient
or NakadiClient bean, we don't need our own authentication setup.

This was already meant to be skipped, but I guess we misunderstood
how nested configuration classes work – they don't inherit their
outer classes' conditions.
  • Loading branch information
ePaul committed Aug 15, 2023
1 parent 132d2bc commit 3bbdf4d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public NakadiPublishingClient nakadiProducerPublishingClient(AccessTokenProvider
}

@ConditionalOnClass(name = "org.zalando.stups.tokens.Tokens")
@ConditionalOnMissingBean({NakadiPublishingClient.class, NakadiClient.class})
@Configuration
static class StupsTokenConfiguration {
@Bean(destroyMethod = "stop")
Expand Down

0 comments on commit 3bbdf4d

Please sign in to comment.