Consider adding support for OAUTH2 by auto-configuring CredentialsProvider
and CredentialsRefreshService
beans (if present and unique) into the RabbitConnectionFactoryBean
.
2.4.x only; requires this PR to be merged: https://github.com/spring-projects/spring-amqp/pull/1212
Comment From: mbhave
@garyrussell Does that mean Spring Boot would autoconfigure the CredentialsProvider
and CredentialsRefreshService
beans or are you suggesting we set them on the RabbitConnectionFactoryBean
only if a user provides them?
Comment From: garyrussell
@mbhave I was just thinking that Boot should detect the presence of the @Bean
s and wire them in.
That said, there is only one (non-standard) implementation OAuth2ClientCredentialsGrantCredentialsProvider
provided by RabbitMQ (and a DefaultCredentialsRefreshService
) so I suppose we could configure them.
But I think it would be more flexible just to detect the beans - that way, the user can provide his/her own implementation.