public class OAuthSignatureCalculator extends java.lang.Object implements SignatureCalculator
SignatureCalculator
that delegates to OAuthSignatureCalculatorInstance
s.Constructor and Description |
---|
OAuthSignatureCalculator(ConsumerKey consumerAuth,
RequestToken userAuth) |
Modifier and Type | Method and Description |
---|---|
void |
calculateAndAddSignature(Request request,
RequestBuilderBase<?> requestBuilder)
Method called when
RequestBuilderBase.build() method is called. |
public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth)
consumerAuth
- Consumer key to use for signature calculationuserAuth
- Request/access token to use for signature calculationpublic void calculateAndAddSignature(Request request, RequestBuilderBase<?> requestBuilder)
SignatureCalculator
RequestBuilderBase.build()
method is called.
Should first calculate signature information and then modify request
(using passed RequestBuilder
) to add signature (usually as
an HTTP header).calculateAndAddSignature
in interface SignatureCalculator
request
- Request that is being built; needed to access content to
be signedrequestBuilder
- builder that can be used to modify request, usually
by adding header that includes calculated signature. Be sure NOT to
call RequestBuilderBase.build()
since this will cause infinite recursionCopyright © 2018. All Rights Reserved.