org.springframework.social.facebook.web
Class DisconnectController

java.lang.Object
  extended by org.springframework.social.facebook.web.DisconnectController

@Controller
@RequestMapping(value="/disconnect/facebook")
public class DisconnectController
extends Object

Spring MVC controller for handling deauthorization callbacks from Facebook as described at https://developers.facebook.com/docs/authentication/. Handles a POST request to /disconnect/facebook with a single signed_request parameter, extracts the Facebook user ID from the signed_request, then removes all connections for the given Facebook user.


Constructor Summary
DisconnectController(org.springframework.social.connect.UsersConnectionRepository usersConnectionRepository, String applicationSecret)
          Constructs a DisconnectController.
 
Method Summary
 ResponseEntity<String> disconnect(String signedRequest)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisconnectController

public DisconnectController(org.springframework.social.connect.UsersConnectionRepository usersConnectionRepository,
                            String applicationSecret)
Constructs a DisconnectController.

Parameters:
usersConnectionRepository - the current user's UsersConnectionRepository needed to persist connections; must be a proxy to a request-scoped bean
applicationSecret - the application's secret as assigned by Facebook at registration time. Used to validate signed_request.
Method Detail

disconnect

@RequestMapping(method=POST)
public ResponseEntity<String> disconnect(@RequestParam(value="signed_request")
                                                                  String signedRequest)