org.springframework.social.connect.web
Class ProviderSignInAttempt
java.lang.Object
org.springframework.social.connect.web.ProviderSignInAttempt
- All Implemented Interfaces:
- java.io.Serializable
public class ProviderSignInAttempt
- extends java.lang.Object
- implements java.io.Serializable
Models an attempt to sign-in to the application using a provider user identity.
Instances are created when the provider sign-in process could not be completed because no local user is associated with the provider user.
This could happen because the user has not yet signed up with the application, or has not yet connected their local application identity with the their provider identity.
For the former scenario, callers should invoke addConnection(String)
post-signup to establish a connection between a new user account and the provider account.
For the latter, existing users should sign-in using their local application credentials and formally connect to the provider they also wish to authenticate with.
- Author:
- Keith Donald
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
SESSION_ATTRIBUTE
Name of the session attribute ProviderSignInAttempt instances are indexed under. |
Method Summary |
Connection<?> |
getConnection()
Get the connection to the provider user account the client attempted to sign-in as. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SESSION_ATTRIBUTE
public static final java.lang.String SESSION_ATTRIBUTE
- Name of the session attribute ProviderSignInAttempt instances are indexed under.
ProviderSignInAttempt
public ProviderSignInAttempt(Connection<?> connection,
ConnectionFactoryLocator connectionFactoryLocator,
UsersConnectionRepository connectionRepository)
getConnection
public Connection<?> getConnection()
- Get the connection to the provider user account the client attempted to sign-in as.
Using this connection you may fetch a
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."