|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.social.connect.web.ConnectController
@Controller @RequestMapping(value="/connect") public class ConnectController
Generic UI controller for managing the account-to-service-provider connection flow.
Constructor Summary | |
---|---|
ConnectController(java.lang.String applicationUrl,
ConnectionFactoryLocator connectionFactoryLocator,
javax.inject.Provider<ConnectionRepository> connectionRepositoryProvider)
Constructs a ConnectController. |
Method Summary | |
---|---|
void |
addInterceptor(ConnectInterceptor<?> interceptor)
Adds a ConnectInterceptor to receive callbacks during the connection process. |
java.lang.String |
connect(java.lang.String providerId,
Model model)
Render the connect form for the service provider identified by {name} to the member as HTML in their web browser. |
java.lang.String |
connect(java.lang.String providerId,
WebRequest request)
Process a connect form submission by commencing the process of establishing a connection to the provider on behalf of the member. |
protected java.lang.String |
handleConnectToCustomConnectionFactory(ConnectionFactory<?> connectionFactory,
WebRequest request)
Hook method subclasses may override to create connections to providers of custom types other than OAuth1 or OAuth2. |
java.lang.String |
oauth1Callback(java.lang.String providerId,
java.lang.String token,
java.lang.String verifier,
WebRequest request)
Process the authorization callback from an OAuth 1 service provider. |
java.lang.String |
oauth2Callback(java.lang.String providerId,
java.lang.String code,
WebRequest request)
Process the authorization callback from an OAuth 2 service provider. |
java.lang.String |
removeConnections(java.lang.String providerId)
Remove all provider connections for a user account. |
java.lang.String |
removeConnections(java.lang.String providerId,
java.lang.String providerUserId)
Remove a single provider connection associated with a user account. |
void |
setInterceptors(java.util.List<ConnectInterceptor<?>> interceptors)
Configure the list of interceptors that should receive callbacks during the connection process. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@Inject public ConnectController(java.lang.String applicationUrl, ConnectionFactoryLocator connectionFactoryLocator, javax.inject.Provider<ConnectionRepository> connectionRepositoryProvider)
applicationUrl
- the base secure URL for this application, used to construct the callback URL passed to the service providers at the beginning of the connection process.connectionFactoryLocator
- the locator for ConnectionFactory
instances needed to establish connectionsconnectionRepositoryProvider
- the provider of the current user's ConnectionRepository
needed to persist connectionsMethod Detail |
---|
public void setInterceptors(java.util.List<ConnectInterceptor<?>> interceptors)
public void addInterceptor(ConnectInterceptor<?> interceptor)
@RequestMapping(value="/{providerId}", method=GET) public java.lang.String connect(@PathVariable java.lang.String providerId, Model model)
@RequestMapping(value="/{providerId}", method=POST) public java.lang.String connect(@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)
@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)
@RequestMapping(value="/{providerId}", method=DELETE) public java.lang.String removeConnections(@PathVariable java.lang.String providerId)
@RequestMapping(value="/{providerId}/{providerUserId}", method=DELETE) public java.lang.String removeConnections(@PathVariable java.lang.String providerId, @PathVariable java.lang.String providerUserId)
protected java.lang.String handleConnectToCustomConnectionFactory(ConnectionFactory<?> connectionFactory, WebRequest request)
IllegalStateException
indicating the custom ConnectionFactory
is not supported.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |