當前位置: 首頁>>代碼示例>>Java>>正文


Java ConnectionFactoryLocator類代碼示例

本文整理匯總了Java中org.springframework.social.connect.ConnectionFactoryLocator的典型用法代碼示例。如果您正苦於以下問題:Java ConnectionFactoryLocator類的具體用法?Java ConnectionFactoryLocator怎麽用?Java ConnectionFactoryLocator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ConnectionFactoryLocator類屬於org.springframework.social.connect包,在下文中一共展示了ConnectionFactoryLocator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: userInfoTokenServices

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
@ConditionalOnMissingBean({ ConnectionFactoryLocator.class,
		ResourceServerTokenServices.class })
public UserInfoTokenServices userInfoTokenServices() {
	UserInfoTokenServices services = new UserInfoTokenServices(
			this.sso.getUserInfoUri(), this.sso.getClientId());
	services.setTokenType(this.sso.getTokenType());
	services.setRestTemplate(this.restTemplate);
	if (this.authoritiesExtractor != null) {
		services.setAuthoritiesExtractor(this.authoritiesExtractor);
	}
	if (this.principalExtractor != null) {
		services.setPrincipalExtractor(this.principalExtractor);
	}
	return services;
}
 
開發者ID:spring-projects,項目名稱:spring-security-oauth2-boot,代碼行數:17,代碼來源:ResourceServerTokenServicesConfiguration.java

示例2: springSocialUserInfo

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Test
public void springSocialUserInfo() {
	TestPropertyValues
			.of("security.oauth2.resource.userInfoUri:http://example.com",
					"spring.social.facebook.app-id=foo",
					"spring.social.facebook.app-secret=bar")
			.applyTo(this.environment);
	this.context = new SpringApplicationBuilder(SocialResourceConfiguration.class)
			.environment(this.environment).web(WebApplicationType.SERVLET).run();
	ConnectionFactoryLocator connectionFactory = this.context
			.getBean(ConnectionFactoryLocator.class);
	assertThat(connectionFactory).isNotNull();
	SpringSocialTokenServices services = this.context
			.getBean(SpringSocialTokenServices.class);
	assertThat(services).isNotNull();
}
 
開發者ID:spring-projects,項目名稱:spring-security-oauth2-boot,代碼行數:17,代碼來源:ResourceServerTokenServicesConfigurationTests.java

示例3: RedisUsersConnectionRepository

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
public RedisUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator, TextEncryptor textEncryptor, SocialRedisConnectionRepository socialRedisConnectionRepository) {
    Assert.notNull(connectionFactoryLocator);
    Assert.notNull(textEncryptor);
    Assert.notNull(socialRedisConnectionRepository);

    this.connectionFactoryLocator = connectionFactoryLocator;
    this.textEncryptor = textEncryptor;
    this.socialRedisConnectionRepository = socialRedisConnectionRepository;
}
 
開發者ID:Turbots,項目名稱:SpringOne2016,代碼行數:10,代碼來源:RedisUsersConnectionRepository.java

示例4: SocialController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
public SocialController(SocialService socialService, ProviderSignInUtils providerSignInUtils,
                        ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository,
                        SignInAdapter signInAdapter, ConnectSupport connectSupport, SessionStrategy sessionStrategy,
                        SocialConfigRepository socialConfigRepository) {
    this.socialService = socialService;
    this.providerSignInUtils = providerSignInUtils;
    this.connectionFactoryLocator = connectionFactoryLocator;
    this.usersConnectionRepository = usersConnectionRepository;
    this.signInAdapter = signInAdapter;
    this.connectSupport = connectSupport;
    this.sessionStrategy = sessionStrategy;
    this.socialConfigRepository = socialConfigRepository;
}
 
開發者ID:xm-online,項目名稱:xm-uaa,代碼行數:14,代碼來源:SocialController.java

示例5: socialTokenServices

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
@ConditionalOnBean(ConnectionFactoryLocator.class)
@ConditionalOnMissingBean(ResourceServerTokenServices.class)
public SpringSocialTokenServices socialTokenServices() {
	return new SpringSocialTokenServices(this.connectionFactory,
			this.sso.getClientId());
}
 
開發者ID:spring-projects,項目名稱:spring-security-oauth2-boot,代碼行數:8,代碼來源:ResourceServerTokenServicesConfiguration.java

示例6: connectController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
public ConnectController connectController(ConnectionFactoryLocator connectionFactoryLocator,
        ConnectionRepository connectionRepository) {

    ConnectController controller = new ConnectController(connectionFactoryLocator, connectionRepository);
    controller.setApplicationUrl(environment.getProperty("spring.application.url"));
    return controller;
}
 
開發者ID:Microsoft,項目名稱:MTC_Labrat,代碼行數:9,代碼來源:SocialConfiguration.java

示例7: providerSignInController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
public ProviderSignInController providerSignInController(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository, SignInAdapter signInAdapter) {
	ProviderSignInController signInController =
		new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, signInAdapter);
	signInController.setSignUpUrl("/registration");
	return signInController;
}
 
開發者ID:codenergic,項目名稱:theskeleton,代碼行數:8,代碼來源:SocialConfig.java

示例8: getUsersConnectionRepository

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    CustomSocialUsersConnectionRepository usersConnectionRepository = new CustomSocialUsersConnectionRepository(
        socialUserConnectionRepository, connectionFactoryLocator);
    usersConnectionRepository.setConnectionSignUp(new ImplicitConnectionSignUp(userRepository, authorityRepository, passwordEncoder, sentryProperties));
    return usersConnectionRepository;
}
 
開發者ID:quanticc,項目名稱:sentry,代碼行數:8,代碼來源:SocialConfiguration.java

示例9: connectController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
public ConnectController connectController(ConnectionFactoryLocator locator,
		ConnectionRepository repository) {
	ConnectController controller = new ConnectController(locator, repository);
	controller.setApplicationUrl("http://localhost:8080");
	return controller;
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:8,代碼來源:LinkedInConfiguration.java

示例10: connectController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
public ConnectController connectController(
		ConnectionFactoryLocator factoryLocator,
		ConnectionRepository repository) {

	ConnectController controller = new ConnectController(
		factoryLocator, repository);
	controller.setApplicationUrl("http://localhost:8080");
	return controller;
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:11,代碼來源:GitHubConfiguration.java

示例11: providerSignInController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
public ProviderSignInController providerSignInController(ConnectionFactoryLocator connectionFactoryLocator,
                                                         UsersConnectionRepository usersConnectionRepository) {
    ProviderSignInController controller = new ProviderSignInController(connectionFactoryLocator,
            usersConnectionRepository, signInAdapter());
    controller.setApplicationUrl(applicationUrl);
    return controller;
}
 
開發者ID:mintster,項目名稱:nixmash-blog,代碼行數:9,代碼來源:SocialConfig.java

示例12: getUsersConnectionRepository

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return new JdbcUsersConnectionRepository(
            dataSource,
            connectionFactoryLocator,
            /**
             * The TextEncryptor object encrypts the authorization details of the connection. In
             * our example, the authorization details are stored as plain text.
             * DO NOT USE THIS IN PRODUCTION.
             */
            Encryptors.noOpText()
    );
}
 
開發者ID:eduyayo,項目名稱:gamesboard,代碼行數:14,代碼來源:SocialContext.java

示例13: SignupController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Inject
public SignupController(AccountRepository accountRepository, 
	                    ConnectionFactoryLocator connectionFactoryLocator,
	                    UsersConnectionRepository connectionRepository) {
	this.accountRepository = accountRepository;
	this.providerSignInUtils = new ProviderSignInUtils(connectionFactoryLocator, connectionRepository);
}
 
開發者ID:Itema-as,項目名稱:dawn-marketplace-server,代碼行數:8,代碼來源:SignupController.java

示例14: connectController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
@ConditionalOnMissingBean(ConnectController.class)
public ConnectController connectController(
		ConnectionFactoryLocator factoryLocator,
		ConnectionRepository repository) {
	ConnectController controller = new ConnectController(factoryLocator,
			repository);
	if (!CollectionUtils.isEmpty(this.connectInterceptors)) {
		controller.setConnectInterceptors(this.connectInterceptors);
	}
	if (!CollectionUtils.isEmpty(this.disconnectInterceptors)) {
		controller.setDisconnectInterceptors(this.disconnectInterceptors);
	}
	return controller;
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:16,代碼來源:SocialWebAutoConfiguration.java

示例15: signInController

import org.springframework.social.connect.ConnectionFactoryLocator; //導入依賴的package包/類
@Bean
@ConditionalOnBean(SignInAdapter.class)
@ConditionalOnMissingBean
public ProviderSignInController signInController(
		ConnectionFactoryLocator factoryLocator,
		UsersConnectionRepository usersRepository, SignInAdapter signInAdapter) {
	ProviderSignInController controller = new ProviderSignInController(
			factoryLocator, usersRepository, signInAdapter);
	if (!CollectionUtils.isEmpty(this.signInInterceptors)) {
		controller.setSignInInterceptors(this.signInInterceptors);
	}
	return controller;
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:14,代碼來源:SocialWebAutoConfiguration.java


注:本文中的org.springframework.social.connect.ConnectionFactoryLocator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。