public class ProviderSignInUtils extends Object
Constructor and Description |
---|
ProviderSignInUtils(ConnectionFactoryLocator connectionFactoryLocator,
UsersConnectionRepository connectionRepository) |
ProviderSignInUtils(SessionStrategy sessionStrategy,
ConnectionFactoryLocator connectionFactoryLocator,
UsersConnectionRepository connectionRepository) |
Modifier and Type | Method and Description |
---|---|
void |
doPostSignUp(String userId,
RequestAttributes request)
Add the connection to the provider user the client attempted to sign-in with to the new local user's set of connections.
|
Connection<?> |
getConnectionFromSession(RequestAttributes request)
Get the connection to the provider user the client attempted to sign-in as.
|
public ProviderSignInUtils(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository connectionRepository)
public ProviderSignInUtils(SessionStrategy sessionStrategy, ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository connectionRepository)
public Connection<?> getConnectionFromSession(RequestAttributes request)
provider user profile
and use that to pre-populate a local user registration/signup form.
You can also lookup the id of the provider and use that to display a provider-specific user-sign-in-attempt flash message e.g. "Your Facebook Account is not connected to a Local account. Please sign up."
Must be called before handlePostSignUp() or else the sign-in attempt will have been cleared from the session.
Returns null if no provider sign-in has been attempted for the current user session.request
- the current request attributes, used to extract sign-in attempt information from the current user sessionpublic void doPostSignUp(String userId, RequestAttributes request)
userId
- the local application's user IDrequest
- the current request attributes, used to extract sign-in attempt information from the current user session