org.springframework.social.connect.mem.InMemoryUsersConnectionRepository Java Examples

The following examples show how to use org.springframework.social.connect.mem.InMemoryUsersConnectionRepository. 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: 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 #2
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 #3
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 #4
Source File: SecurityConfig.java    From tutorials with MIT License 4 votes vote down vote up
private UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    return new InMemoryUsersConnectionRepository(connectionFactoryLocator);
}