From cf7e538e9365977a26fd0e3ca55813d93c754286 Mon Sep 17 00:00:00 2001 From: Craig Walls Date: Mon, 22 Aug 2011 14:34:39 -0500 Subject: [PATCH] Reference doc updates --- docs/src/reference/docbook/connecting.xml | 11 +++++--- docs/src/reference/docbook/overview.xml | 2 ++ .../src/reference/docbook/serviceprovider.xml | 26 ++++++++++++++++++- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/docs/src/reference/docbook/connecting.xml b/docs/src/reference/docbook/connecting.xml index e0feb953d..014e4f3ec 100644 --- a/docs/src/reference/docbook/connecting.xml +++ b/docs/src/reference/docbook/connecting.xml @@ -540,25 +540,28 @@ public class SocialConfig { { - void preConnect(ConnectionFactory connectionFactory, WebRequest request); + MultiValueMap preConnect(ConnectionFactory connectionFactory, WebRequest request); void postConnect(Connection connection, WebRequest request); }]]> - The preConnect() method will be called by ConnectController just before redirecting the browser to the provider's authorization page. + The preConnect() method will be called by ConnectController just before redirecting the browser to the provider's authorization page. + It has a return type of MultiValueMap<String, String> which can contain parameters to be passed on the request when ConnectController redirects to the provider's authorization URL. + If it has no parameters to contribute to the authorization URL, it may return null. postConnect() will be called immediately after a connection has been persisted linking the user's local account with the provider profile. - For example, suppose that after connecting a user account with their Twitter profile , you want to immediately post a tweet about that connection to the user's Twitter timeline. + For example, suppose that after connecting a user account with their Twitter profile you want to immediately post a tweet about that connection to the user's Twitter timeline. To accomplish that, you might write the following connection interceptor: { - public void preConnect(ConnectionFactory provider, WebRequest request) { + public MultiValueMap preConnect(ConnectionFactory provider, WebRequest request) { // nothing to do + return null; } public void postConnect(Connection connection, WebRequest request) { diff --git a/docs/src/reference/docbook/overview.xml b/docs/src/reference/docbook/overview.xml index 802dd0144..6f31bade7 100644 --- a/docs/src/reference/docbook/overview.xml +++ b/docs/src/reference/docbook/overview.xml @@ -326,9 +326,11 @@ git clone git://github.com/SpringSource/spring-social-samples.git spring-social-quickstart - Designed to get you up and running quickly. + spring-social-quickstart-30x - Designed to get you up and running quickly as well as using Spring Social with Spring 3.0.x. spring-social-showcase - Illustrates most of Spring Social's features. spring-social-movies - Shows how to extend Spring Social to implement a new ServiceProvider and API binding. spring-social-twitter4j - Shows how to extend Spring Social and re-use an existing API binding. + spring-social-popup - Shows how to use Spring Social to drive a browser popup-based connection flow. \ No newline at end of file diff --git a/docs/src/reference/docbook/serviceprovider.xml b/docs/src/reference/docbook/serviceprovider.xml index db013b63b..5f881697a 100644 --- a/docs/src/reference/docbook/serviceprovider.xml +++ b/docs/src/reference/docbook/serviceprovider.xml @@ -464,9 +464,33 @@ public interface UsersConnectionRepository { JDBC-based persistence Spring Social provides a JdbcUsersConnectionRepository implementation capable of persisting connections to a RDBMS. - The database schema designed to back this repository is defined in JdbcUsersConnectionRepository.sql. + The database schema designed to back this repository is defined as follows: + + + + + + + For convenience is bootstrapping the schema from a running application, this schema definition is available in the spring-social-core module as a resource at the path /org/springframework/social/connect/jdbc/JdbcUsersConnectionRepository.sql. + + + The implementation also provides support for encrypting authorization credentials so they are not stored in plain-text. + The example code below demonstrates construction and usage of a JdbcUsersConnectionRepository: