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 java.lang.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.
- Author:
- habuma
|
Constructor Summary |
DisconnectController(org.springframework.social.connect.UsersConnectionRepository usersConnectionRepository,
java.lang.String applicationSecret)
Constructs a DisconnectController. |
|
Method Summary |
org.springframework.http.ResponseEntity<java.lang.String> |
disconnect(java.lang.String signedRequest)
|
| 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,
java.lang.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 org.springframework.http.ResponseEntity<java.lang.String> disconnect(@RequestParam(value="signed_request")
java.lang.String signedRequest)