org.springframework.social.facebook.web
Class DisconnectController
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 beanapplicationSecret
- the application's secret as assigned by Facebook at registration time. Used to validate signed_request.
disconnect
@RequestMapping(method=POST)
public ResponseEntity<String> disconnect(@RequestParam(value="signed_request")
String signedRequest)