org.springframework.social.connect.UsersConnectionRepository Java Examples

The following examples show how to use org.springframework.social.connect.UsersConnectionRepository. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SocialConfig.java    From JiwhizBlogWeb with Apache License 2.0 5 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    MongoUsersConnectionRepositoryImpl repository = new MongoUsersConnectionRepositoryImpl(
            userSocialConnectionRepository, (SocialAuthenticationServiceLocator)connectionFactoryLocator, Encryptors.noOpText());
    repository.setConnectionSignUp(autoConnectionSignUp());
    return repository;
}
 
Example #2
Source File: SocialWebAutoConfiguration.java    From spring-security-oauth2-boot with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #3
Source File: Application.java    From spring-social-wechat-sample with Apache License 2.0 5 votes vote down vote up
@Bean
public ProviderSignInController providerSignInController(ConnectionFactoryLocator connectionFactoryLocator,
		UsersConnectionRepository usersConnectionRepository, WechatSignInAdapter wechatSignInAdapter) {
	((InMemoryUsersConnectionRepository) usersConnectionRepository)
			.setConnectionSignUp((Connection<?> connection) -> connection.getKey().getProviderUserId());
	return new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, wechatSignInAdapter);
}
 
Example #4
Source File: FebsSocialWebAutoConfiguration.java    From FEBS-Security with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #5
Source File: SocialConfig.java    From paascloud-master with Apache License 2.0 5 votes vote down vote up
/**
 * Gets users connection repository.
 *
 * @param connectionFactoryLocator the connection factory locator
 *
 * @return the users connection repository
 */
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
	JdbcUsersConnectionRepository repository = new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, Encryptors.noOpText());
	repository.setTablePrefix("pc_uac_");
	if (connectionSignUp != null) {
		repository.setConnectionSignUp(connectionSignUp);
	}
	return repository;
}
 
Example #6
Source File: OpenIdAuthenticationSecurityConfig.java    From paascloud-master with Apache License 2.0 5 votes vote down vote up
@Autowired
public OpenIdAuthenticationSecurityConfig(AuthenticationSuccessHandler pcAuthenticationSuccessHandler, AuthenticationFailureHandler pcAuthenticationFailureHandler, SocialUserDetailsService userDetailsService, UsersConnectionRepository usersConnectionRepository) {
	this.pcAuthenticationSuccessHandler = pcAuthenticationSuccessHandler;
	this.pcAuthenticationFailureHandler = pcAuthenticationFailureHandler;
	this.userDetailsService = userDetailsService;
	this.usersConnectionRepository = usersConnectionRepository;
}
 
Example #7
Source File: SocialConfig.java    From pre with GNU General Public License v3.0 5 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    PreJdbcUsersConnectionRepository repository = new PreJdbcUsersConnectionRepository(dataSource,
            connectionFactoryLocator, Encryptors.noOpText());
    repository.setTablePrefix("social_");
    return repository;
}
 
Example #8
Source File: SocialAutoConfiguration.java    From cola with MIT License 5 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
	JpaUsersConnectRepository repository = new JpaUsersConnectRepository(userConnectionRepository,
			connectionFactoryLocator, Encryptors.noOpText());
	if (connectionSignUp != null) {
		repository.setConnectionSignUp(connectionSignUp);
	}
	return repository;
}
 
Example #9
Source File: SecurityConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
// @Primary
public ProviderSignInController providerSignInController() {
    ConnectionFactoryLocator connectionFactoryLocator = connectionFactoryLocator();
    UsersConnectionRepository usersConnectionRepository = getUsersConnectionRepository(connectionFactoryLocator);
    ((InMemoryUsersConnectionRepository) usersConnectionRepository).setConnectionSignUp(facebookConnectionSignup);
    return new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, new FacebookSignInAdapter());
}
 
Example #10
Source File: AcAuthenticationProvider.java    From cola with MIT License 5 votes vote down vote up
public AcAuthenticationProvider(SocialUserDetailsService userDetailsService,
								ConnectionFactoryLocator connectionFactoryLocator,
								UsersConnectionRepository usersConnectionRepository) {
	this.userDetailsService = userDetailsService;
	this.connectionFactoryLocator = connectionFactoryLocator;
	this.usersConnectionRepository = usersConnectionRepository;
}
 
Example #11
Source File: SocialConfig.java    From AIDR with GNU Affero General Public License v3.0 5 votes vote down vote up
@Bean
public UsersConnectionRepository usersConnectionRepository() {    	
	JdbcUsersConnectionRepository jdbcUsersConnectionRepository = new JdbcUsersConnectionRepository(dataSource, 
    		connectionFactoryLocator, 
    		textEncryptor());
	jdbcUsersConnectionRepository.setConnectionSignUp(userConnectionSignUp);
	return jdbcUsersConnectionRepository;
}
 
Example #12
Source File: SocialConfig.java    From lolibox with Apache License 2.0 4 votes vote down vote up
@Bean
public ProviderSignInController providerSignInController(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository) {
    return new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, new SimpleSignInAdapter(new HttpSessionRequestCache()));
}
 
Example #13
Source File: SocialConfig.java    From lolibox with Apache License 2.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return new JpaUsersConnectionRepository(jpaTemplate, connectionFactoryLocator, Encryptors.noOpText());
}
 
Example #14
Source File: SocialConfig.java    From blog-social-login-with-spring-social with Apache License 2.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    JdbcUsersConnectionRepository repository = new JdbcUsersConnectionRepository(dataSource,connectionFactoryLocator, Encryptors.noOpText());
    repository.setConnectionSignUp(new AccountConnectionSignUpService(usersDao));
    return repository;
}
 
Example #15
Source File: _SocialConfiguration.java    From jhipster-ribbon-hystrix with GNU General Public License v3.0 4 votes vote down vote up
@Bean
public ProviderSignInUtils getProviderSignInUtils(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository) {
    return new ProviderSignInUtils(connectionFactoryLocator, usersConnectionRepository);
}
 
Example #16
Source File: _SocialConfiguration.java    From jhipster-ribbon-hystrix with GNU General Public License v3.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return new CustomSocialUsersConnectionRepository(socialUserConnectionRepository, connectionFactoryLocator);
}
 
Example #17
Source File: DatabaseSocialConfigurer.java    From lemonaid with MIT License 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    TextEncryptor textEncryptor = Encryptors.noOpText();
    return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, textEncryptor);
}
 
Example #18
Source File: DatabaseSocialConfigurer.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    TextEncryptor textEncryptor = Encryptors.noOpText();
    return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, textEncryptor);
}
 
Example #19
Source File: DatabaseSocialConfigurer.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    TextEncryptor textEncryptor = Encryptors.noOpText();
    return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, textEncryptor);
}
 
Example #20
Source File: SecurityConfig.java    From tutorials with MIT License 4 votes vote down vote up
private UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return new InMemoryUsersConnectionRepository(connectionFactoryLocator);
}
 
Example #21
Source File: DatabaseSocialConfigurer.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
/**
 *
 * @param connectionFactoryLocator
 * @return
 */
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    TextEncryptor textEncryptor = Encryptors.noOpText();
    return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, textEncryptor);
}
 
Example #22
Source File: FebsSocialConfig.java    From FEBS-Security with Apache License 2.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    JdbcUsersConnectionRepository jdbcUsersConnectionRepository = new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, Encryptors.noOpText());
    jdbcUsersConnectionRepository.setTablePrefix("t_");
    return jdbcUsersConnectionRepository;
}
 
Example #23
Source File: GoogleConfigurerAdapter.java    From OAuth-2.0-Cookbook with MIT License 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(
		ConnectionFactoryLocator connectionFactoryLocator) {
	return new InMemoryUsersConnectionRepository(connectionFactoryLocator);
}
 
Example #24
Source File: OpenIdAuthenticationConfiguration.java    From cola with MIT License 4 votes vote down vote up
@Bean
public OpenIdAuthenticationProvider openIdAuthenticationProvider(SocialUserDetailsService socialUserDetailsService,
																 UsersConnectionRepository usersConnectionRepository) {
	return new OpenIdAuthenticationProvider(socialUserDetailsService, usersConnectionRepository);
}
 
Example #25
Source File: WeixinAuthConfig.java    From pre with GNU General Public License v3.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return null;
}
 
Example #26
Source File: QQAutoConfig.java    From pre with GNU General Public License v3.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return null;
}
 
Example #27
Source File: GiteeAutoAuthConfig.java    From pre with GNU General Public License v3.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return null;
}
 
Example #28
Source File: GithubAutoAuthConfig.java    From pre with GNU General Public License v3.0 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return null;
}
 
Example #29
Source File: WechatMpConnectionConfiguration.java    From cola with MIT License 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
	return null;
}
 
Example #30
Source File: QQConnectConfiguration.java    From cola with MIT License 4 votes vote down vote up
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
	return null;
}