Class SignedRequestBuilder
java.lang.Object
com.yoti.api.client.spi.remote.call.SignedRequestBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the signed request with specified optionswithBaseUrl(String baseUrl) Proceed building the signed request with specific base urlwithEndpoint(String endpoint) Proceed building the signed request with a specific endpointwithHeader(String name, String value) Proceed building the signed request with a specific headerwithHttpMethod(String httpMethod) Proceed building the signed request with a specific HTTP methodwithKeyPair(KeyPair keyPair) Proceed building the signed request with a specific key pairwithMultipartBinaryBody(String name, byte[] payload, org.apache.http.entity.ContentType contentType, String fileName) Adds a binary body to the multipart request.withMultipartBoundary(String multipartBoundary) Sets the boundary to be used on the multipart requestwithPayload(byte[] payload) Proceed building the signed request with a specific payloadwithQueryParameter(String name, String value) Proceed building the signed request with a specific query parameter
-
Method Details
-
withKeyPair
Proceed building the signed request with a specific key pair- Parameters:
keyPair- the key pair- Returns:
- the updated builder
-
withBaseUrl
Proceed building the signed request with specific base url- Parameters:
baseUrl- the base url- Returns:
- the updated builder
-
withEndpoint
Proceed building the signed request with a specific endpoint- Parameters:
endpoint- the endpoint- Returns:
- the updated builder
-
withPayload
Proceed building the signed request with a specific payload- Parameters:
payload- the payload- Returns:
- the update builder
-
withQueryParameter
Proceed building the signed request with a specific query parameter- Parameters:
name- the name of the query parametervalue- the value of the query parameter- Returns:
- the updated builder
-
withHeader
Proceed building the signed request with a specific header- Parameters:
name- the name of the headervalue- the value of the header- Returns:
- the updated builder
-
withHttpMethod
Proceed building the signed request with a specific HTTP method- Parameters:
httpMethod- the HTTP method- Returns:
- the updated builder
- Throws:
IllegalArgumentException
-
withMultipartBoundary
Sets the boundary to be used on the multipart request- Parameters:
multipartBoundary- the multipart boundary- Returns:
- the updated builder
-
withMultipartBinaryBody
public SignedRequestBuilder withMultipartBinaryBody(String name, byte[] payload, org.apache.http.entity.ContentType contentType, String fileName) Adds a binary body to the multipart request.Note: the Signed Request must be specified with a boundary also in order to make use of the Multipart request
- Parameters:
name- the name of the binary bodypayload- the payload of the binary bodycontentType- the content type of the binary bodyfileName- the filename of the binary body- Returns:
- the updated builder
-
build
public SignedRequest build() throws GeneralSecurityException, UnsupportedEncodingException, URISyntaxExceptionBuild the signed request with specified options- Returns:
- the signed request
- Throws:
GeneralSecurityExceptionUnsupportedEncodingExceptionURISyntaxException
-