Package si.mazi.rescu
Class HmacPostBodyDigest
java.lang.Object
si.mazi.rescu.HmacPostBodyDigest
- All Implemented Interfaces:
ParamsDigest
public final class HmacPostBodyDigest extends Object implements ParamsDigest
This may be used as the value of a @HeaderParam, @QueryParam or @PathParam to create a digest of the post body (composed of @FormParam's). Don't use as the value of a @FormParam, it will probably cause an infinite loop.
This may be used for REST APIs where some parameters' values must be digests of other parameters. An example is the MtGox API v1, where the Rest-Sign header parameter must be a digest of the request body (which is composed of @FormParams).
-
Field Summary
Fields Modifier and Type Field Description static StringCHARSET_UTF_8 -
Method Summary
Modifier and Type Method Description static HmacPostBodyDigestcreateInstance(String secretKeyBase64)StringdigestParams(RestInvocation restInvocation)
-
Field Details
-
CHARSET_UTF_8
- See Also:
- Constant Field Values
-
-
Method Details
-
createInstance
public static HmacPostBodyDigest createInstance(String secretKeyBase64) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
digestParams
- Specified by:
digestParamsin interfaceParamsDigest
-