Hello guys i try to integrate social in my application. I read reference manual but i do not understand some things there. So i try to signin via Facebook using implementing of SignInAdapter and with signInController. SignInController redirect me to facebook and there i authorize than it go to my redirect URL with error = provider. It is not possible to debug this and to see where is problem. When in conncetionRepository i change constructor arguments to #{request.getParametr('username')} it hangs and for many times connect to facebook and it happense nothing. if i use static parametr there something like "qwerty" it will show me error=provider. here is my config and can you tell what is #{request.getPrincipal.username}. What sould be there in request params?
Why my signInController do not redirect me to signUp page?>
Here is my configs:Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" default-lazy-init="true"> <bean id="connectionFactoryLocator" class="org.springframework.social.connect.support.ConnectionFactoryRegistry"> <property name="connectionFactories"> <list> <bean class="org.springframework.social.facebook.connect.FacebookConnectionFactory"> <constructor-arg value="${facebook.appId}" /> <constructor-arg value="${facebook.appSecret}" /> </bean> </list> </property> </bean> <bean id="usersConnectionRepository" class="org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository"> <constructor-arg ref="dataSource" /> <constructor-arg ref="connectionFactoryLocator" /> <constructor-arg ref="textEncryptor" /> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/shop" /> <property name="username" value="root" /> <property name="password" value="root" /> </bean> <bean id="connectionRepository" factory-method="createConnectionRepository" factory-bean="usersConnectionRepository" scope="request"> <constructor-arg value="#{request.getParameter('username')}" /> <!-- <constructor-arg value="igor" /> --> <aop:scoped-proxy proxy-target-class="false" /> </bean> <bean class="org.springframework.social.connect.web.ProviderSignInController"> <constructor-arg ref="connectionFactoryLocator"/> <constructor-arg ref="connectionRepository" /> <constructor-arg ref="simpleSignInAdapter" /> <property name="applicationUrl" value="${application.url}" /> <property name="signUpUrl" value="/signup" /> </bean> <bean id="simpleSignInAdapter" class="com.social.SimpleSignInAdapter" /> <bean class="org.springframework.social.connect.web.ConnectController"> <constructor-arg ref="connectionFactoryLocator" /> <constructor-arg ref="connectionRepository" /> <property name="applicationUrl" value="${application.url}" /> </bean> <bean id="textEncryptor" class="org.springframework.security.crypto.encrypt.Encryptors" factory-method="noOpText" /> </beans>
p.s. I want to build my application like spring social showcase to (merge) to combine my server user account with facebook userAcc.
p.p.s Sorry for my English....


Reply With Quote
. Now it work properly. And I start to integrate it in my existing login system... As i see here 
