Here is my current configuration
In the middle tier configuration in xml
In my web app. we use Java @Configuration withCode:<context:property-placeholder location="classpath:META-INF/spring/social.properties"/> <facebook:config app-id="${facebook.clientId}" app-secret="${facebook.clientSecret}" app-namespace="${facebook.appNameSpace}" /> <twitter:config app-id="${twitter.consumerKey}" app-secret="${twitter.consumerSecret}"/> <social:jdbc-connection-repository /> <bean id="userIdSource" class="org.springframework.social.config.xml.SpringSecurityAuthenticationNameUserIdSource" />
OK. So I guess I have to define one. But I can't find a real full example in the documentation. I copiedCode:@Configuration public class SocialConfig { @Autowired SpringSecuritySignInAdapter springSecuritySignInAdapter; @Autowired ConnectionFactoryLocator connectionFactoryLocator; @Autowired ConnectionRepository connectionRepository; @Autowired UsersConnectionRepository usersConnectionRepository; @Bean public ConnectController connectController() { ConnectController connectController = new ConnectController(connectionFactoryLocator, connectionRepository); return connectController; } @Bean public ProviderSignInController providerSignInController() { return new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, springSecuritySignInAdapter); } }
But of course it doesn't know what security.encryptPassword means. And the docs don't explain what should go there. I understand that the first one should be that the password be encrypted. But that is a per user thing, not something we can put in a .properties file to load in.Code:<bean id="textEncryptor" class="org.springframework.security.crypto.encrypt.Encryptors" factory-method="text"> <constructor-arg value="${security.encryptPassword}" /> <constructor-arg value="${security.encryptSalt}" /> </bean>
Sorry, I know this has to be really easy and I am just being stupid on my part. (Trust me that happens often)
Thanks
Mark


Reply With Quote
