org.springframework.social.connect.signin.web
Class ProviderSignInAttempt

java.lang.Object
  extended by org.springframework.social.connect.signin.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() 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.

See Also:
Serialized Form

Constructor Summary
ProviderSignInAttempt(Connection<?> connection, javax.inject.Provider<ConnectionFactoryLocator> connectionFactoryLocatorProvider, javax.inject.Provider<ConnectionRepository> connectionRepositoryProvider)
           
 
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
 

Constructor Detail

ProviderSignInAttempt

public ProviderSignInAttempt(Connection<?> connection,
                             javax.inject.Provider<ConnectionFactoryLocator> connectionFactoryLocatorProvider,
                             javax.inject.Provider<ConnectionRepository> connectionRepositoryProvider)
Method Detail

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."