{
InMemoryUsersConnectionRepository repository =
new InMemoryUsersConnectionRepository(connectionFactoryLocator);
+ repository.setConnectionSignUp(new ProviderUserIdConnectionSignUp());
return repository;
}
/**
- * Configure a {@link UserIdSource}, that is equivalent to the one, that is
- * created by Spring-Boot.
+ * Configure our new implementation of {@link UserIdSource}, that retrieves
+ * the current user from the {@link SecurityContext}.
*
* @return
* An instance of {@link AnonymousUserIdSource}.
*
- * @see {@link AnonymousUserIdSource}
+ * @see {@link SecurityContextUserIdSource}
+ * @see {@link SecurityContext}
+ * @see {@link UserCookieInterceptor}
*/
@Override
public UserIdSource getUserIdSource()
{
- return new AnonymousUserIdSource();
+ return new SecurityContextUserIdSource();
}