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

The following examples show how to use org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository. 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 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 #2
Source File: SocialConfig.java    From Spring-Security-Third-Edition with 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 File: SocialConfig.java    From Spring-Security-Third-Edition with 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 File: SocialConfig.java    From Spring-Security-Third-Edition with 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 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 #6
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 #7
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 #8
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 #9
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 #10
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 #11
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;
}