|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository
public class JdbcUsersConnectionRepository
UsersConnectionRepository
that uses the JDBC API to persist connection data to a relational database.
The supporting schema is defined in JdbcMultiUserConnectionRepository.sql.
Constructor Summary | |
---|---|
JdbcUsersConnectionRepository(javax.sql.DataSource dataSource,
ConnectionFactoryLocator connectionFactoryLocator,
org.springframework.security.crypto.encrypt.TextEncryptor textEncryptor)
|
Method Summary | |
---|---|
ConnectionRepository |
createConnectionRepository(java.lang.String userId)
Create a single-user ConnectionRepository instance for the user assigned the given id. |
java.util.Set<java.lang.String> |
findUserIdsConnectedTo(java.lang.String providerId,
java.util.Set<java.lang.String> providerUserIds)
Find the ids of the users who are connected to the specific provider user accounts. |
java.util.List<java.lang.String> |
findUserIdsWithConnection(Connection<?> connection)
Find the ids for users that have the given Connection . |
void |
setConnectionSignUp(ConnectionSignUp connectionSignUp)
The command to execute to create a new local user profile in the event no user id could be mapped to a connection. |
void |
setTablePrefix(java.lang.String tablePrefix)
Sets a table name prefix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcUsersConnectionRepository(javax.sql.DataSource dataSource, ConnectionFactoryLocator connectionFactoryLocator, org.springframework.security.crypto.encrypt.TextEncryptor textEncryptor)
Method Detail |
---|
public void setConnectionSignUp(ConnectionSignUp connectionSignUp)
findUserIdsWithConnection(Connection)
public void setTablePrefix(java.lang.String tablePrefix)
tablePrefix
- the tablePrefix to setpublic java.util.List<java.lang.String> findUserIdsWithConnection(Connection<?> connection)
UsersConnectionRepository
Connection
.
Used to support the ProviderSignIn scenario where the user id returned is used to sign a local application user in using his or her provider account.
findUserIdsWithConnection
in interface UsersConnectionRepository
connection
- the service provider connection resulting from the provider sign-in attemptpublic java.util.Set<java.lang.String> findUserIdsConnectedTo(java.lang.String providerId, java.util.Set<java.lang.String> providerUserIds)
UsersConnectionRepository
findUserIdsConnectedTo
in interface UsersConnectionRepository
providerId
- the provider id, e.g. "facebook"providerUserIds
- the set of provider user ids e.g. ("125600", "131345", "54321").
public ConnectionRepository createConnectionRepository(java.lang.String userId)
UsersConnectionRepository
ConnectionRepository
instance for the user assigned the given id.
All operations on the returned repository instance are relative to the user.
createConnectionRepository
in interface UsersConnectionRepository
userId
- the id of the local user account.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |