Package org.asynchttpclient
Interface SignatureCalculator
-
- All Known Implementing Classes:
OAuthSignatureCalculator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface SignatureCalculator
Interface that allows injecting signature calculator intoRequestBuilder
so that signature calculation and inclusion can be added as a pluggable component.- Since:
- 1.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
calculateAndAddSignature(Request request, RequestBuilderBase<?> requestBuilder)
Method called whenRequestBuilderBase.build()
method is called.
-
-
-
Method Detail
-
calculateAndAddSignature
void calculateAndAddSignature(Request request, RequestBuilderBase<?> requestBuilder)
Method called whenRequestBuilderBase.build()
method is called. Should first calculate signature information and then modify request (using passedRequestBuilder
) to add signature (usually as an HTTP header).- Parameters:
requestBuilder
- builder that can be used to modify request, usually by adding header that includes calculated signature. Be sure NOT to callRequestBuilderBase.build()
since this will cause infinite recursionrequest
- Request that is being built; needed to access content to be signed
-
-