Java Code Examples for org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository

The following examples show how to use org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository. These examples are extracted from open source projects. 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 Project: paascloud-master   Source File: SocialConfig.java    License: 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 2
Source Project: Spring-Security-Third-Edition   Source File: SocialConfig.java    License: MIT License 5 votes vote down vote up
/**
 * Configuring a {@link ProviderSignInController} to intercept OAuth2
 * requests that will be used to initiate an OAuth2 handshake with the specified
 * OAuth2 provider.
 * @return
 */
@Bean
public ProviderSignInController providerSignInController() {

    ((JdbcUsersConnectionRepository) usersConnectionRepository)
            .setConnectionSignUp(providerConnectionSignup);

    return new ProviderSignInController(
            connectionFactoryLocator,
            usersConnectionRepository,
            authSignInAdapter());
}
 
Example 3
Source Project: Spring-Security-Third-Edition   Source File: SocialConfig.java    License: MIT License 5 votes vote down vote up
@Bean
public ProviderSignInController providerSignInController() {
    ((JdbcUsersConnectionRepository) usersConnectionRepository)
            .setConnectionSignUp(providerConnectionSignup);

    return new ProviderSignInController(
            connectionFactoryLocator,
            usersConnectionRepository,
            authSignInAdapter());
}
 
Example 4
Source Project: Spring-Security-Third-Edition   Source File: SocialConfig.java    License: MIT License 5 votes vote down vote up
@Bean
public ProviderSignInController providerSignInController() {
    ((JdbcUsersConnectionRepository) usersConnectionRepository)
            .setConnectionSignUp(providerConnectionSignup);

    return new ProviderSignInController(
            connectionFactoryLocator,
            usersConnectionRepository,
            authSignInAdapter());
}
 
Example 5
Source Project: AIDR   Source File: SocialConfig.java    License: 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 6
Source Project: FEBS-Security   Source File: FebsSocialConfig.java    License: 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 7
/**
 *
 * @param connectionFactoryLocator
 * @return
 */
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    TextEncryptor textEncryptor = Encryptors.noOpText();
    return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, textEncryptor);
}
 
Example 8
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    TextEncryptor textEncryptor = Encryptors.noOpText();
    return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, textEncryptor);
}
 
Example 9
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    TextEncryptor textEncryptor = Encryptors.noOpText();
    return new JdbcUsersConnectionRepository(dataSource, connectionFactoryLocator, textEncryptor);
}
 
Example 10
Source Project: lemonaid   Source File: DatabaseSocialConfigurer.java    License: 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 11
@Override
public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    JdbcUsersConnectionRepository repository = new JdbcUsersConnectionRepository(dataSource,connectionFactoryLocator, Encryptors.noOpText());
    repository.setConnectionSignUp(new AccountConnectionSignUpService(usersDao));
    return repository;
}