本文整理汇总了Java中org.springframework.social.connect.support.ConnectionFactoryRegistry类的典型用法代码示例。如果您正苦于以下问题:Java ConnectionFactoryRegistry类的具体用法?Java ConnectionFactoryRegistry怎么用?Java ConnectionFactoryRegistry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConnectionFactoryRegistry类属于org.springframework.social.connect.support包,在下文中一共展示了ConnectionFactoryRegistry类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Before
public void setUp() {
socialUserConnectionRepository.deleteAll();
connectionFactoryRegistry = new ConnectionFactoryRegistry();
connectionFactory = new TestFacebookConnectionFactory();
connectionFactoryRegistry.addConnectionFactory(connectionFactory);
usersConnectionRepository = new CustomSocialUsersConnectionRepository(socialUserConnectionRepository, connectionFactoryRegistry);
connectionRepository = usersConnectionRepository.createConnectionRepository("1");
}
示例2: connectionFactoryLocator
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
public ConnectionFactoryLocator connectionFactoryLocator() {
ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
registry.addConnectionFactory(new FacebookConnectionFactory(
environment.getProperty("facebook.clientId"),
environment.getProperty("facebook.clientSecret")));
return registry;
}
示例3: setUp
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Before
public void setUp() {
connectionFactoryRegistry = new ConnectionFactoryRegistry();
connectionFactory = new TestFacebookConnectionFactory();
connectionFactoryRegistry.addConnectionFactory(connectionFactory);
usersConnectionRepository = new CustomSocialUsersConnectionRepository(socialUserConnectionRepository, connectionFactoryRegistry);
connectionRepository = usersConnectionRepository.createConnectionRepository("1");
}
示例4: connectionFactoryLocator
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
@Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES)
public ConnectionFactoryLocator connectionFactoryLocator() {
ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
final GoogleConnectionFactory gcf = new GoogleConnectionFactory(
environment.getProperty("google.consumerKey"),
environment.getProperty("google.consumerSecret"));
registry.addConnectionFactory(gcf);
final TwitterConnectionFactory tcf = new TwitterConnectionFactory
(environment.getProperty("twitter.consumerKey"),
environment.getProperty("twitter.consumerSecret"));
registry.addConnectionFactory(tcf);
return registry;
}
示例5: connectionFactoryLocator
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
public ConnectionFactoryLocator connectionFactoryLocator() {
ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
registry.addConnectionFactory(new FacebookConnectionFactory(config.getFacebookClientId(),
config.getFacebookClientSecrect()));
registry.addConnectionFactory(new TwitterConnectionFactory(config.getTwitterClientId(),
config.getTwitterClientSecret()));
return registry;
}
示例6: connectionFactoryLocator
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
/**
* When a new provider is added to the app, register its
* {@link ConnectionFactory} here.
*
* @see GoogleConnectionFactory
*/
@Bean
public ConnectionFactoryLocator connectionFactoryLocator () {
ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry ();
registry.addConnectionFactory (new GoogleConnectionFactory (key, secret) {
{
setScope ("https://www.googleapis.com/auth/userinfo.profile" +
";https://www.googleapis.com/auth/userinfo.email" +
";https://www.googleapis.com/auth/plus.me" +
";https://www.googleapis.com/auth/plus.login" +
";https://www.googleapis.com/auth/plus.circles.read");
}
});
return registry;
}
示例7: connectionFactoryLocator
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
/**
* The locator for SaaS provider connection factories.
* When support for a new provider is added to Greenhouse, simply register the corresponding {@link ConnectionFactory} here.
* The current Environment is used to lookup the credentials assigned to the Greenhouse application by each provider during application registration.
* This bean is defined as a scoped-proxy so it can be serialized in support of {@link ProviderSignInAttempt provier sign-in attempts}.
*/
@Bean
@Scope(value="singleton", proxyMode=ScopedProxyMode.INTERFACES)
public ConnectionFactoryLocator connectionFactoryLocator() {
ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
registry.addConnectionFactory(new TwitterConnectionFactory(environment.getProperty("twitter.consumerKey"), environment.getProperty("twitter.consumerSecret")));
registry.addConnectionFactory(new FacebookConnectionFactory(environment.getProperty("facebook.appId"), environment.getProperty("facebook.appSecret")));
registry.addConnectionFactory(new LinkedInConnectionFactory(environment.getProperty("linkedin.consumerKey"), environment.getProperty("linkedin.consumerSecret")));
registry.addConnectionFactory(new TripItConnectionFactory(environment.getProperty("tripit.consumerKey"), environment.getProperty("tripit.consumerSecret")));
return registry;
}
示例8: connectionFactoryLocator
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
public ConnectionFactoryLocator connectionFactoryLocator() {
ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
registry.addConnectionFactory(new FacebookConnectionFactory(facebookClientId,
facebookSecret));
registry.addConnectionFactory(new TwitterConnectionFactory(twitterConsumerKey,
twitterConsumerSecret));
return registry;
}
示例9: providerSignInController
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
public ProviderSignInController providerSignInController(GitHubConnectionFactory connectionFactory,
ConnectionFactoryRegistry registry,
InMemoryUsersConnectionRepository repository) {
registry.addConnectionFactory(connectionFactory);
repository.setConnectionSignUp(new RemoteUsernameConnectionSignUp());
ProviderSignInController controller =
new ProviderSignInController(registry, repository, new GithubAuthenticationSigninAdapter(
SIGNIN_SUCCESS_PATH, signInService));
controller.setSignInUrl("/signin?error=access_denied");
return controller;
}
示例10: connectionFactoryRegistry
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
public ConnectionFactoryRegistry connectionFactoryRegistry() {
return new ConnectionFactoryRegistry();
}
示例11: connectionFactoryRegistry
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
public ConnectionFactoryRegistry connectionFactoryRegistry() {
return new ConnectionFactoryRegistry();
}
示例12: inMemoryUsersConnectionRepository
import org.springframework.social.connect.support.ConnectionFactoryRegistry; //导入依赖的package包/类
@Bean
public InMemoryUsersConnectionRepository inMemoryUsersConnectionRepository(ConnectionFactoryRegistry registry) {
return new InMemoryUsersConnectionRepository(registry);
}