org.springframework.social.facebook.web
Class SignedRequestDecoder
java.lang.Object
org.springframework.social.facebook.web.SignedRequestDecoder
public class SignedRequestDecoder
- extends java.lang.Object
Utility class for extracting the payload of a signed request sent by Facebook.
- Author:
- Craig Walls
|
Method Summary |
java.util.Map<java.lang.String,?> |
decodeSignedRequest(java.lang.String signedRequest)
Decodes a signed request, returning the payload of the signed request as a Map |
|
decodeSignedRequest(java.lang.String signedRequest,
java.lang.Class<T> type)
Decodes a signed request, returning the payload of the signed request as a specified type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SignedRequestDecoder
public SignedRequestDecoder(java.lang.String secret)
- Parameters:
secret - the application secret used in creating and verifying the signature of the signed request.
decodeSignedRequest
public java.util.Map<java.lang.String,?> decodeSignedRequest(java.lang.String signedRequest)
throws SignedRequestException
- Decodes a signed request, returning the payload of the signed request as a Map
- Parameters:
signedRequest - the value of the signed_request parameter sent by Facebook.
- Returns:
- the payload of the signed request as a Map
- Throws:
SignedRequestException
decodeSignedRequest
public <T> T decodeSignedRequest(java.lang.String signedRequest,
java.lang.Class<T> type)
throws SignedRequestException
- Decodes a signed request, returning the payload of the signed request as a specified type.
- Parameters:
signedRequest - the value of the signed_request parameter sent by Facebook.type - the type to bind the signed_request to.
- Returns:
- the payload of the signed request as an object
- Throws:
SignedRequestException