|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.social.connect.signin.web.ProviderSignInController
@Controller @RequestMapping(value="/signin") public class ProviderSignInController
Spring MVC Controller for handling the provider user sign-in flow.
Constructor Summary | |
---|---|
ProviderSignInController(java.lang.String applicationUrl,
javax.inject.Provider<ConnectionFactoryLocator> connectionFactoryLocatorProvider,
UsersConnectionRepository usersConnectionRepository,
javax.inject.Provider<ConnectionRepository> connectionRepositoryProvider,
SignInService signInService)
Creates a new provider sign-in controller. |
Method Summary | |
---|---|
java.lang.String |
oauth1Callback(java.lang.String providerId,
java.lang.String token,
java.lang.String verifier,
WebRequest request)
Process the authentication callback from an OAuth 1 service provider. |
java.lang.String |
oauth2Callback(java.lang.String providerId,
java.lang.String code,
WebRequest request)
Process the authentication callback from an OAuth 2 service provider. |
void |
setSignupUrl(java.lang.String signupUrl)
Overrides the default URL of the application's signup page ("/signup"). |
java.lang.String |
signin(java.lang.String providerId,
WebRequest request)
Process a sign-in form submission by commencing the process of establishing a connection to the provider on behalf of the user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@Inject public ProviderSignInController(java.lang.String applicationUrl, javax.inject.Provider<ConnectionFactoryLocator> connectionFactoryLocatorProvider, UsersConnectionRepository usersConnectionRepository, javax.inject.Provider<ConnectionRepository> connectionRepositoryProvider, SignInService signInService)
applicationUrl
- the base secure URL for this application, used to construct the callback URL passed to the service providers at the beginning of the sign-in process.connectionFactoryLocatorProvider
- the provider of the locator of connection factories
that can be used for sign-in;
A JSR330 Provider is injected here instead of the actual locator object to support the fact ProviderSignInAttempt
objects are session-scoped and thus require a Serializable reference to a ConnectionFactoryLocator
.
The injected Provider should be Serializable, otherwise NotSerializableException
instances could occur during the provider sign-in flow.usersConnectionRepository
- the global store for service provider connections across all local user accountsconnectionRepositoryProvider
- the provider of the current user's ConnectionRepository
instance;
A JSR 330 Provider is injected here instead of the actual repository object because repository instances are request-scoped and resolved based on the currently authenticated user.signInService
- an adapter between this controller and the local application's user sign-in system.Method Detail |
---|
@RequestMapping(value="/{providerId}", method=POST) public java.lang.String signin(@PathVariable java.lang.String providerId, WebRequest request)
@RequestMapping(value="/{providerId}", method=GET, params="oauth_token") public java.lang.String oauth1Callback(@PathVariable java.lang.String providerId, @RequestParam(value="oauth_token") java.lang.String token, @RequestParam(value="oauth_verifier",required=false) java.lang.String verifier, WebRequest request)
SignInService.signIn(String)
.
If not, redirects the user to a signup page to create a new account with ProviderSignInAttempt
context exposed in the HttpSession.
ProviderSignInAttempt
,
ProviderSignInUtils
@RequestMapping(value="/{providerId}", method=GET, params="code") public java.lang.String oauth2Callback(@PathVariable java.lang.String providerId, @RequestParam(value="code") java.lang.String code, WebRequest request)
SignInService.signIn(String)
.
If not, redirects the user to a signup page to create a new account with ProviderSignInAttempt
context exposed in the HttpSession.
ProviderSignInAttempt
,
ProviderSignInUtils
public void setSignupUrl(java.lang.String signupUrl)
signupUrl
- the URL of the signup page.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |