Closed Zane-XY closed 9 years ago
it seems the ConnectionFactoryLocator
is configured in spring-social-config
@Bean
public ConnectionFactoryLocator connectionFactoryLocator() {
if (securityEnabled) {
SecurityEnabledConnectionFactoryConfigurer cfConfig = new SecurityEnabledConnectionFactoryConfigurer();
for (SocialConfigurer socialConfigurer : socialConfigurers) {
socialConfigurer.addConnectionFactories(cfConfig, environment);
}
return cfConfig.getConnectionFactoryLocator();
} else {
DefaultConnectionFactoryConfigurer cfConfig = new DefaultConnectionFactoryConfigurer();
for (SocialConfigurer socialConfigurer : socialConfigurers) {
socialConfigurer.addConnectionFactories(cfConfig, environment);
}
return cfConfig.getConnectionFactoryLocator();
}
}
in the current
spring-social-showcase-boot
, I didn't seeConnectionFactoryLocator
is configured anywhere, but in the latest code, theProviderSignInUtils
constructor has changed towhich means I need a
ConnectionFactoryLocator
andUsersConnectionRepository
bean to createProviderSignInUtils
.The recommended way of configure
ConnectionFactoryLocator
shown from the current reference:duplicates the codes with spring-boot's autoconfigure class, like
TwitterAutoConfiguration
FacebookAutoConfiguration
in the reading properties part, should aConnectionFactoryLocator
be configured when it detects the spring-social configuration in the application.properties?It should also be useful to expose the $provider$ConnectionFactory bean created in the
SocialAutoConfigurerAdapter
subclasses:then we can create
ConnectionFactoryRegistry
by just wiring existing factories.