当前位置: 首页>>代码示例>>Java>>正文


Java ConnectionFactoryRegistry.addConnectionFactory方法代码示例

本文整理汇总了Java中org.springframework.social.connect.support.ConnectionFactoryRegistry.addConnectionFactory方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionFactoryRegistry.addConnectionFactory方法的具体用法?Java ConnectionFactoryRegistry.addConnectionFactory怎么用?Java ConnectionFactoryRegistry.addConnectionFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.social.connect.support.ConnectionFactoryRegistry的用法示例。


在下文中一共展示了ConnectionFactoryRegistry.addConnectionFactory方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");
  }
 
开发者ID:xm-online,项目名称:xm-uaa,代码行数:11,代码来源:CustomSocialUsersConnectionRepositoryIntTest.java

示例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;
}
 
开发者ID:kevindeyne,项目名称:simple-facebook-integration-spring-sec,代码行数:9,代码来源:WebSecurityConfig.java

示例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");
}
 
开发者ID:priitl,项目名称:p2p-webtv,代码行数:9,代码来源:CustomSocialUsersConnectionRepositoryTest.java

示例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;
}
 
开发者ID:MikhailErofeev,项目名称:mars-calendar,代码行数:15,代码来源:SocialConfig.java

示例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;
}
 
开发者ID:raynor08,项目名称:10Service,代码行数:13,代码来源:SocialConfig.java

示例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;
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:21,代码来源:GoogleConfiguration.java

示例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;
}
 
开发者ID:mqprichard,项目名称:spring-greenhouse-clickstart,代码行数:17,代码来源:SocialConfig.java

示例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;
}
 
开发者ID:martinlau,项目名称:unidle-old,代码行数:12,代码来源:SocialConfiguration.java

示例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;
}
 
开发者ID:spring-io,项目名称:sagan,代码行数:14,代码来源:SecurityConfig.java


注:本文中的org.springframework.social.connect.support.ConnectionFactoryRegistry.addConnectionFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。